xf86-video-ati: Branch 'master'

Jerome Glisse glisse at kemper.freedesktop.org
Mon Oct 5 06:54:33 PDT 2009


 src/radeon_kms.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 457646d734558672402b6bcd15cadb66741edbed
Author: Jerome Glisse <jglisse at redhat.com>
Date:   Mon Oct 5 15:52:42 2009 +0200

    kms: assume accel is working is info ioctl return -EINVAL
    
    -EINVAL should only happen if the info ioctl doesn't support
    the get accel query. This patch assume that on such case accel
    is working.

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index f51913e..faa6025 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -183,8 +183,15 @@ static Bool RADEONIsAccelWorking(ScrnInfoPtr pScrn)
     ginfo.request = 0x3;
     ginfo.value = (uintptr_t)&tmp;
     r = drmCommandWriteRead(info->dri->drmFD, DRM_RADEON_INFO, &ginfo, sizeof(ginfo));
-    if (r)
+    if (r) {
+        /* If kernel is too old before 2.6.32 than assume accel is working */
+        if (r == -EINVAL) {
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Kernel too old missing accel "
+                       "information, assuming accel is working\n");
+            return TRUE;
+        }
         return FALSE;
+    }
     if (tmp)
         return TRUE;
     return FALSE;
@@ -439,12 +446,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 		       (unsigned long long)mminfo.vram_visible);
 	}
     }
-#if 0
-    if (info->ChipFamily < CHIP_FAMILY_R600) {
-	info->useEXA = TRUE;
-	info->directRenderingEnabled = TRUE;
-    }
-#endif
     RADEONSetPitch(pScrn);
 
     /* Set display resolution */


More information about the xorg-commit mailing list