[PATCH xf86-video-amdgpu 3/9] Rename Option "NoAccel" to "Accel"

Michel Dänzer michel at daenzer.net
Wed Nov 11 01:30:49 PST 2015


From: Michel Dänzer <michel.daenzer at amd.com>

Removes the need for a double negation when forcing acceleration on.

Note that this change is backwards compatible, as the option parser
automagically handles the 'No' prefix.

(ported from radeon commit cc615d06db0332fc6e673b55632bcc7bf957b44b)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 man/amdgpu.man   | 7 +++----
 src/amdgpu_drv.h | 2 +-
 src/amdgpu_kms.c | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/man/amdgpu.man b/man/amdgpu.man
index 3373b63..4e95ead 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -44,12 +44,11 @@ are supported:
 Selects software cursor.  The default is
 .B off.
 .TP
-.BI "Option \*qNoAccel\*q \*q" boolean \*q
+.BI "Option \*qAccel\*q \*q" boolean \*q
 Enables or disables all hardware acceleration.
 .br
-The default is to
-.B enable
-hardware acceleration.
+The default is
+.B on.
 
 .TP
 .BI "Option \*qZaphodHeads\*q \*q" string \*q
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index 4797693..9acd202 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -133,7 +133,7 @@ struct _SyncFence;
 #endif
 
 typedef enum {
-	OPTION_NOACCEL,
+	OPTION_ACCEL,
 	OPTION_SW_CURSOR,
 	OPTION_PAGE_FLIP,
 #ifdef RENDER
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 054d478..084f625 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -60,7 +60,7 @@ extern SymTabRec AMDGPUChipsets[];
 static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen);
 
 const OptionInfoRec AMDGPUOptions_KMS[] = {
-	{OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE},
+	{OPTION_ACCEL, "Accel", OPTV_BOOLEAN, {0}, FALSE},
 	{OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE},
 	{OPTION_PAGE_FLIP, "EnablePageFlip", OPTV_BOOLEAN, {0}, FALSE},
 	{OPTION_SUBPIXEL_ORDER, "SubPixelOrder", OPTV_ANYSTR, {0}, FALSE},
@@ -562,7 +562,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
 {
 	AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
 
-	if (!xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, false)) {
+	if (xf86ReturnOptValBool(info->Options, OPTION_ACCEL, TRUE)) {
 		AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
 		Bool use_glamor = TRUE;
 #ifdef HAVE_GBM_BO_USE_LINEAR
-- 
2.6.2



More information about the xorg-driver-ati mailing list