summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/amdgpu.man3
-rw-r--r--src/amdgpu_kms.c4
-rw-r--r--src/drmmode_display.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/man/amdgpu.man b/man/amdgpu.man
index 54b5bd4..4ec2074 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -81,7 +81,8 @@ on. If this option is set, the default value of the property is 'on' or 'off'
accordingly. If this option isn't set, the default value of the property is
.B auto,
which means that TearFree is on for rotated outputs, outputs with RandR
-transforms applied and for RandR 1.4 secondary outputs, otherwise off.
+transforms applied, for RandR 1.4 secondary outputs and if 'VariableRefresh'
+is enabled, otherwise it's off.
.TP
.BI "Option \*qVariableRefresh\*q \*q" boolean \*q
Enables support for enabling variable refresh on the Screen's CRTCs
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 1f049c9..882dc33 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1655,6 +1655,10 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
from = xf86GetOptValBool(info->Options, OPTION_VARIABLE_REFRESH,
&info->vrr_support) ? X_CONFIG : X_DEFAULT;
+ if (info->vrr_support && !info->tear_free)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Enabling VariableRefresh while TearFree is disabled can cause instability!\n");
+
xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: %sabled\n",
info->vrr_support ? "en" : "dis");
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 00247ac..8244b92 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -593,6 +593,7 @@ drmmode_crtc_update_tear_free(xf86CrtcPtr crtc)
(drmmode_output->tear_free == 2 &&
(crtc->scrn->pScreen->isGPU ||
info->shadow_primary ||
+ info->vrr_support ||
crtc->transformPresent || crtc->rotation != RR_Rotate_0))) {
drmmode_crtc->tear_free = TRUE;
return;