summaryrefslogtreecommitdiff
path: root/xf86drmMode.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-25 12:19:43 +0100
committerSimon Ser <contact@emersion.fr>2021-03-31 07:42:15 +0000
commit6d821612d9a4bc4f61d64040a1852a4f139bd28a (patch)
treedd29b4ec87804c8ed718f113b1ece712d3aaab92 /xf86drmMode.h
parentf5abbc30336198002ff2777284c8ad8816d08757 (diff)
downloaddrm-6d821612d9a4bc4f61d64040a1852a4f139bd28a.tar.gz
xf86drmMode: introduce drmModeGetPropertyType
We already have drm_property_type_is, but it's needlessly complicated and doesn't cover all use-cases (requires the caller to provide a type). Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'xf86drmMode.h')
-rw-r--r--xf86drmMode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xf86drmMode.h b/xf86drmMode.h
index 72696782..4bde6e35 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -151,6 +151,11 @@ static __inline int drm_property_type_is(drmModePropertyPtr property,
return property->flags & type;
}
+static inline uint32_t drmModeGetPropertyType(const drmModePropertyRes *prop)
+{
+ return prop->flags & (DRM_MODE_PROP_LEGACY_TYPE | DRM_MODE_PROP_EXTENDED_TYPE);
+}
+
typedef struct _drmModeCrtc {
uint32_t crtc_id;
uint32_t buffer_id; /**< FB id to connect to 0 = disconnect */