summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2021-10-01 08:49:10 +0200
committerPovilas Kanapickas <povilas@radix.lt>2021-10-08 09:24:00 +0000
commit017ce263376aa64a495c4d71a140a24b1dff7054 (patch)
tree1c52f2245389c717b65f097d34165005ae242473
parent66e5a5bb12c58413a4d71781c5a7f63f675bfe55 (diff)
modesetting: Handle mixed VRR and non-VRR display setups better.
In a setup with both VRR capable and non-VRR capable displays, it was so far inconsistent if the driver would allow use of VRR support or not, as "is_connector_vrr_capable" was set to whatever the capabilities of the last added drm output were. Iow. the plugging order of monitors determined the outcome. Fix this: Now if at least one display is VRR capable, the driver will treat an X-Screen as capable for VRR, plugging order no longer matters. Tested with a dual-display setup with one VRR monitor and one non-VRR monitor. This is also beneficial with the new Option "AsyncFlipSecondaries". When we are at it, also add some so far missing description of the "VariableRefresh" driver option, copied from amdgpu-ddx. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c2
-rw-r--r--hw/xfree86/drivers/modesetting/modesetting.man7
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 5dfdd30db..21c9222e1 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -3309,7 +3309,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
}
}
- ms->is_connector_vrr_capable =
+ ms->is_connector_vrr_capable |=
drmmode_connector_check_vrr_capable(drmmode->fd,
drmmode_output->output_id);
return 1;
diff --git a/hw/xfree86/drivers/modesetting/modesetting.man b/hw/xfree86/drivers/modesetting/modesetting.man
index bb948380b..71790011e 100644
--- a/hw/xfree86/drivers/modesetting/modesetting.man
+++ b/hw/xfree86/drivers/modesetting/modesetting.man
@@ -71,6 +71,13 @@ One of \*qglamor\*q or \*qnone\*q. Default: glamor.
Enable DRI3 page flipping. The default is
.B on.
.TP
+.BI "Option \*qVariableRefresh\*q \*q" boolean \*q
+Enables support for enabling variable refresh on the Screen's CRTCs
+when an suitable application is flipping via the Present extension.
+.br
+The default is
+.B off.
+.TP
.BI "Option \*qAsyncFlipSecondaries\*q \*q" boolean \*q
Use async flips for secondary video outputs on multi-display setups. If a screen
has multiple displays attached and DRI3 page flipping is used, then only one of