summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/amdgpu.man7
-rw-r--r--src/amdgpu_drv.h1
-rw-r--r--src/amdgpu_kms.c14
3 files changed, 16 insertions, 6 deletions
diff --git a/man/amdgpu.man b/man/amdgpu.man
index d280197..0233445 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -62,9 +62,10 @@ For example:
Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q
will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
.TP
-.BI "Option \*qDRI3\*q \*q" boolean \*q
-Enable the DRI3 extension. The default is
-.B off.
+.BI "Option \*qDRI\*q \*q" integer \*q
+Define the maximum level of DRI to enable. Valid values are 2 for DRI2 or 3 for DRI3.
+The default is
+.B 2 for DRI2.
.TP
.BI "Option \*qEnablePageFlip\*q \*q" boolean \*q
Enable DRI2 page flipping. The default is
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index 3a8144f..82dd05b 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -142,6 +142,7 @@ typedef enum {
OPTION_ZAPHOD_HEADS,
OPTION_ACCEL_METHOD,
OPTION_DRI3,
+ OPTION_DRI,
OPTION_SHADOW_PRIMARY,
OPTION_TEAR_FREE,
} AMDGPUOpts;
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 1cc945e..5aa8397 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -66,7 +66,8 @@ const OptionInfoRec AMDGPUOptions_KMS[] = {
{OPTION_SUBPIXEL_ORDER, "SubPixelOrder", OPTV_ANYSTR, {0}, FALSE},
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
{OPTION_ACCEL_METHOD, "AccelMethod", OPTV_STRING, {0}, FALSE},
- { OPTION_DRI3, "DRI3", OPTV_BOOLEAN, {0}, FALSE },
+ {OPTION_DRI3, "DRI3", OPTV_BOOLEAN, {0}, FALSE},
+ {OPTION_DRI, "DRI", OPTV_INTEGER, {0}, FALSE},
{OPTION_SHADOW_PRIMARY, "ShadowPrimary", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_TEAR_FREE, "TearFree", OPTV_BOOLEAN, {0}, FALSE},
{-1, NULL, OPTV_NONE, {0}, FALSE}
@@ -1016,6 +1017,7 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
int subPixelOrder = SubPixelUnknown;
MessageType from;
Bool value;
+ int driLevel;
char *s;
void *front_ptr;
int ret;
@@ -1106,10 +1108,15 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
#endif
value = FALSE;
+ from = X_DEFAULT;
if (xf86GetOptValBool(info->Options, OPTION_DRI3, &value))
from = X_CONFIG;
- else
- from = X_DEFAULT;
+
+ if (xf86GetOptValInteger(info->Options, OPTION_DRI, &driLevel) &&
+ (driLevel == 2 || driLevel == 3)) {
+ from = X_CONFIG;
+ value = driLevel == 3;
+ }
if (value) {
value = amdgpu_sync_init(pScreen) &&
@@ -1119,6 +1126,7 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
if (!value)
from = X_WARNING;
}
+
xf86DrvMsg(pScrn->scrnIndex, from, "DRI3 %sabled\n", value ? "en" : "dis");
pScrn->vtSema = TRUE;