backend-drm: Check for the atomic tearing capability
Check if our drm device supports atomic async page flips. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
974a707add
commit
9203d98f8b
@ -298,6 +298,8 @@ struct drm_device {
|
|||||||
|
|
||||||
bool atomic_modeset;
|
bool atomic_modeset;
|
||||||
|
|
||||||
|
bool tearing_supported;
|
||||||
|
|
||||||
bool aspect_ratio_supported;
|
bool aspect_ratio_supported;
|
||||||
|
|
||||||
int32_t cursor_width;
|
int32_t cursor_width;
|
||||||
|
@ -42,6 +42,10 @@
|
|||||||
#include "pixel-formats.h"
|
#include "pixel-formats.h"
|
||||||
#include "presentation-time-server-protocol.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[] = {
|
struct drm_property_enum_info plane_type_enums[] = {
|
||||||
[WDRM_PLANE_TYPE_PRIMARY] = {
|
[WDRM_PLANE_TYPE_PRIMARY] = {
|
||||||
.name = "Primary",
|
.name = "Primary",
|
||||||
@ -1639,6 +1643,11 @@ init_kms_caps(struct drm_device *device)
|
|||||||
|
|
||||||
drmSetClientCap(device->drm.fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
|
drmSetClientCap(device->drm.fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
|
||||||
|
|
||||||
|
ret = drmGetCap(device->drm.fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap);
|
||||||
|
if (ret != 0)
|
||||||
|
cap = 0;
|
||||||
|
device->tearing_supported = cap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* KMS support for hardware planes cannot properly synchronize
|
* KMS support for hardware planes cannot properly synchronize
|
||||||
* without nuclear page flip. Without nuclear/atomic, hw plane
|
* without nuclear page flip. Without nuclear/atomic, hw plane
|
||||||
|
Loading…
Reference in New Issue
Block a user