backend-drm: Make DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP inert

Until kernel mainline does merge the aysnc page flip ioctl, make the
whole bit look like it's unsupported. We can further switch it back when
it lands into the kernel.

Fixes: 9203d98f

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Marius Vlad 2023-07-18 13:51:15 +03:00
parent 4a26a28682
commit 3e4aff6af4

View file

@ -42,10 +42,6 @@
#include "pixel-formats.h"
#include "presentation-time-server-protocol.h"
#ifndef DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
#define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15
#endif
struct drm_property_enum_info plane_type_enums[] = {
[WDRM_PLANE_TYPE_PRIMARY] = {
.name = "Primary",
@ -1846,10 +1842,19 @@ init_kms_caps(struct drm_device *device)
drmSetClientCap(device->drm.fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
#if 0
/* FIXME: DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP isn't merged into mainline so
* we can't really use it at this point. Until then, make it so we
* don't support it. After it gets merged, we can flip this back such
* that we don't need to revert the entire tearing work, and we can
* still get it all back, when the capability is actually available in
* the kernel. */
ret = drmGetCap(device->drm.fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap);
if (ret != 0)
cap = 0;
device->tearing_supported = cap;
#endif
device->tearing_supported = 0;
weston_log("DRM: does not support async page flipping\n");
/*
* KMS support for hardware planes cannot properly synchronize