summaryrefslogtreecommitdiff
path: root/xf86drmMode.h
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-10-12 12:16:44 -0400
committerRob Clark <robclark@freedesktop.org>2014-11-24 19:56:50 -0500
commitfb4177046de19730a784c3c16e4b73aab0ec6e41 (patch)
tree7801e10d14aa85d38b94fd868b7124587f22ad28 /xf86drmMode.h
parentc2c0346e1f5ddec4f6497d7c6359157c5f32d442 (diff)
update signed/object prop types
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'xf86drmMode.h')
-rw-r--r--xf86drmMode.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/xf86drmMode.h b/xf86drmMode.h
index b260af7c..856a6bb0 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -240,6 +240,15 @@ typedef struct _drmModeProperty {
uint32_t *blob_ids; /* store the blob IDs */
} drmModePropertyRes, *drmModePropertyPtr;
+static inline int drm_property_type_is(drmModePropertyPtr property,
+ uint32_t type)
+{
+ /* instanceof for props.. handles extended type vs original types: */
+ if (property->flags & DRM_MODE_PROP_EXTENDED_TYPE)
+ return (property->flags & DRM_MODE_PROP_EXTENDED_TYPE) == type;
+ return property->flags & type;
+}
+
typedef struct _drmModeCrtc {
uint32_t crtc_id;
uint32_t buffer_id; /**< FB id to connect to 0 = disconnect */