From 457646d734558672402b6bcd15cadb66741edbed Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 5 Oct 2009 15:52:42 +0200 Subject: 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. --- src/radeon_kms.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 */ -- cgit v1.2.3