summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
authorSultan Alsawaf <sultan@kerneltoast.com>2022-12-26 01:17:04 -0800
committersfan5 <sfan5@live.de>2022-12-27 13:07:33 +0100
commit4a2aa36674a3989d6567ebe1d3c3f8c6c889d906 (patch)
treeb68f053d4693374df129b7ea1f45d0d351639710 /video/out/x11_common.c
parentd8ae14653a8d86e31b4d9a90615a25c7b7fd7d10 (diff)
downloadmpv-4a2aa36674a3989d6567ebe1d3c3f8c6c889d906.tar.bz2
mpv-4a2aa36674a3989d6567ebe1d3c3f8c6c889d906.tar.xz
x11: add modesetting to the xpresent whitelist
Since the modesetting driver now has TearFree support with integration into xpresent, it's important that xpresent is used with the modesetting driver to get the correct vsync timing when a frame is delayed by one vblank interval due to a pending page-flip enqueued by a different entity. The modesetting driver ensures that the xpresent extension reports the correct presentation timing when TearFree is used; mpv just needs to listen to it. Add the modesetting driver to the xpresent whitelist so mpv can get the correct presentation completion timing when modesetting TearFree is used. This is also helpful for when xpresent performs page flips directly in the modesetting driver and a natural delay in the display pipeline causes a page flip to be delayed by one vblank interval or more.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index b6c191d376..37149148b9 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -436,11 +436,12 @@ static void xrandr_read(struct vo_x11_state *x11)
bstr_lower(provider_name);
int amd = bstr_find0(provider_name, "amd");
int intel = bstr_find0(provider_name, "intel");
+ int modesetting = bstr_find0(provider_name, "modesetting");
int nouveau = bstr_find0(provider_name, "nouveau");
int nvidia = bstr_find0(provider_name, "nvidia");
int radeon = bstr_find0(provider_name, "radeon");
x11->has_mesa = x11->has_mesa || amd >= 0 || intel >= 0 ||
- nouveau >= 0 || radeon >= 0;
+ modesetting >= 0 || nouveau >= 0 || radeon >= 0;
x11->has_nvidia = x11->has_nvidia || nvidia >= 0;
XRRFreeProviderInfo(info);
}