Commit 97f858d3 authored by Uday Kiran Pichika's avatar Uday Kiran Pichika Committed by Martin Peres
Browse files

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: default avatarUday Kiran Pichika <pichika.uday.kiran@intel.com>
parent ede2c32c
......@@ -139,6 +139,7 @@ static const OptionInfoRec Options[] = {
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
{OPTION_DOUBLE_SHADOW, "DoubleShadow", 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}
};
......@@ -1188,6 +1189,13 @@ PreInit(ScrnInfoPtr pScrn, int flags)
ms->drmmode.shadow_enable ? "YES" : "NO");
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 =
......
......@@ -56,6 +56,7 @@ typedef enum {
OPTION_ZAPHOD_HEADS,
OPTION_DOUBLE_SHADOW,
OPTION_ATOMIC,
OPTION_VARIABLE_REFRESH,
} modesettingOpts;
typedef struct
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment