aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/drm
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-05-30 11:34:01 -0400
committerDave Airlie <airlied@redhat.com>2014-06-03 23:22:53 -0400
commit5ea22f24d77b511d68c4ecaf4e6fd5d6ab462b8f (patch)
treee6c3287bee5fec51e3deb8b905c156926c6a8985 /include/uapi/drm
parenta2b34e226ac9fbd20179091fad0ee1a24ad48669 (diff)
drm: add extended property types
If we continue to use bitmask for type, we will quickly run out of room to add new types. Split this up so existing part of bitmask range continues to function as before, but reserve a chunk of the remaining space for an integer type-id. Wrap this all up in some type-check helpers to keep the backwards-compat uglyness contained. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/uapi/drm')
-rw-r--r--include/uapi/drm/drm_mode.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 719add464f95..caeaa6f7ebde 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -252,6 +252,19 @@ struct drm_mode_get_connector {
252#define DRM_MODE_PROP_BLOB (1<<4) 252#define DRM_MODE_PROP_BLOB (1<<4)
253#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ 253#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */
254 254
255/* non-extended types: legacy bitmask, one bit per type: */
256#define DRM_MODE_PROP_LEGACY_TYPE ( \
257 DRM_MODE_PROP_RANGE | \
258 DRM_MODE_PROP_ENUM | \
259 DRM_MODE_PROP_BLOB | \
260 DRM_MODE_PROP_BITMASK)
261
262/* extended-types: rather than continue to consume a bit per type,
263 * grab a chunk of the bits to use as integer type id.
264 */
265#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0
266#define DRM_MODE_PROP_TYPE(n) ((n) << 6)
267
255struct drm_mode_property_enum { 268struct drm_mode_property_enum {
256 __u64 value; 269 __u64 value;
257 char name[DRM_PROP_NAME_LEN]; 270 char name[DRM_PROP_NAME_LEN];