modesetting: Allow users to opt-in VRR support
Fetch VariableRefresh option value from X conf file for modesetting backend DDX driver. This option defaults to false, and must be set to "true" in conf file for variable refresh support in the DDX driver. Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
This commit is contained in:
parent
ede2c32ce1
commit
97f858d336
|
@ -139,6 +139,7 @@ static const OptionInfoRec Options[] = {
|
||||||
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
|
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
|
||||||
{OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
|
{OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
|
||||||
{OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
|
{OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
|
||||||
|
{OPTION_VARIABLE_REFRESH, "VariableRefresh", OPTV_BOOLEAN, {0}, FALSE},
|
||||||
{-1, NULL, OPTV_NONE, {0}, FALSE}
|
{-1, NULL, OPTV_NONE, {0}, FALSE}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1188,6 +1189,13 @@ PreInit(ScrnInfoPtr pScrn, int flags)
|
||||||
ms->drmmode.shadow_enable ? "YES" : "NO");
|
ms->drmmode.shadow_enable ? "YES" : "NO");
|
||||||
|
|
||||||
ms->drmmode.shadow_enable2 = msShouldDoubleShadow(pScrn, ms);
|
ms->drmmode.shadow_enable2 = msShouldDoubleShadow(pScrn, ms);
|
||||||
|
} else {
|
||||||
|
if (!pScrn->is_gpu) {
|
||||||
|
MessageType from = xf86GetOptValBool(ms->drmmode.Options, OPTION_VARIABLE_REFRESH,
|
||||||
|
&ms->vrr_support) ? X_CONFIG : X_DEFAULT;
|
||||||
|
xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: %sabled\n",
|
||||||
|
ms->vrr_support ? "en" : "dis");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ms->drmmode.pageflip =
|
ms->drmmode.pageflip =
|
||||||
|
|
|
@ -56,6 +56,7 @@ typedef enum {
|
||||||
OPTION_ZAPHOD_HEADS,
|
OPTION_ZAPHOD_HEADS,
|
||||||
OPTION_DOUBLE_SHADOW,
|
OPTION_DOUBLE_SHADOW,
|
||||||
OPTION_ATOMIC,
|
OPTION_ATOMIC,
|
||||||
|
OPTION_VARIABLE_REFRESH,
|
||||||
} modesettingOpts;
|
} modesettingOpts;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
Loading…
Reference in New Issue