From b48b6aa8dece79cd8e65b81598a626b815d1ea6c Mon Sep 17 00:00:00 2001 From: zeising Date: Fri, 13 Dec 2013 12:05:07 +0000 Subject: Add patch from dumbbell to fix autoloading of kernel driver. git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@1327 058c260c-8361-11dd-a0ac-aa2bafec7d09 --- .../xf86-video-ati/files/extra-src__radeon_kms.c | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c b/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c index c8ed568..9de83f0 100644 --- a/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c +++ b/x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c @@ -1,6 +1,15 @@ --- src/radeon_kms.c.orig 2013-08-07 10:44:09.000000000 +0200 -+++ src/radeon_kms.c 2013-08-31 01:20:44.370468797 +0200 -@@ -270,7 +270,7 @@ ++++ src/radeon_kms.c 2013-08-31 19:29:11.369001510 +0200 +@@ -30,6 +30,8 @@ + + #include + #include ++#include ++#include + /* Driver data structures */ + #include "radeon.h" + #include "radeon_reg.h" +@@ -270,7 +272,7 @@ radeon_dirty_update(ScreenPtr screen) { RegionPtr region; @@ -9,12 +18,20 @@ if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return; -@@ -606,7 +606,7 @@ +@@ -606,6 +608,16 @@ dev->domain, dev->bus, dev->dev, dev->func); #endif -- info->dri2.drm_fd = drmOpen("radeon", busid); -+ info->dri2.drm_fd = drmOpen("radeonkms", busid); ++ err = kldload("radeonkms"); ++ if (err == -1 && errno != EEXIST) { ++ ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, ++ "[drm] Failed to load kernel module for %s: %s\n", ++ busid, strerror(errno)); ++ free(busid); ++ return FALSE; ++ } ++ + info->dri2.drm_fd = drmOpen("radeon", busid); if (info->dri2.drm_fd == -1) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, -- cgit v1.2.3