[PATCH] radeon: enable hawaii accel conditionally (v3)

Andreas Boll andreas.boll.dev at gmail.com
Fri Aug 1 12:55:40 PDT 2014


From: Alex Deucher <alexdeucher at gmail.com>

Only if the kernel has the new CP firmware.

v2: check value of ACCEL_WORKING2
v3 (Andreas Boll):
 - check for value 2 or 3 of ACCEL_WORKING2
 - update man page

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com> (v2)
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Andreas Boll <andreas.boll.dev at gmail.com>
---
 man/radeon.man   | 3 +--
 src/radeon_kms.c | 9 ++++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/man/radeon.man b/man/radeon.man
index 802f6c2..7dde040 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -229,8 +229,7 @@ Selects software cursor.  The default is
 Enables or disables all hardware acceleration.
 .br
 The default is
-.B on
-except for HAWAII.
+.B on.
 .TP
 .BI "Option \*qZaphodHeads\*q \*q" string \*q
 Specify the RandR output(s) to use with zaphod mode for a particular driver
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 707d0c7..b92ae90 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -400,8 +400,12 @@ static Bool RADEONIsAccelWorking(ScrnInfoPtr pScrn)
         }
         return FALSE;
     }
-    if (tmp)
+    if (info->ChipFamily == CHIP_FAMILY_HAWAII) {
+        if (tmp == 2 || tmp == 3)
+            return TRUE;
+    } else if (tmp) {
         return TRUE;
+    }
     return FALSE;
 }
 
@@ -499,8 +503,7 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn)
 	info->is_fast_fb = TRUE;
     }
 
-    if (!xf86ReturnOptValBool(info->Options, OPTION_ACCEL,
-			     info->ChipFamily != CHIP_FAMILY_HAWAII) ||
+    if (!xf86ReturnOptValBool(info->Options, OPTION_ACCEL, TRUE) ||
 	(!RADEONIsAccelWorking(pScrn))) {
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "GPU accel disabled or not working, using shadowfb for KMS\n");
-- 
2.0.1



More information about the xorg-driver-ati mailing list