summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-10-05 15:52:42 +0200
committerJerome Glisse <jglisse@redhat.com>2009-10-05 15:52:42 +0200
commit457646d734558672402b6bcd15cadb66741edbed (patch)
tree68bef4b98e9384b7693b6b743267c8ae5e481a6d
parent9d596562496863d65850306d2126d8df98464de4 (diff)
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.
-rw-r--r--src/radeon_kms.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index f51913e2..faa6025e 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 */