diff options
author | Rob Clark <robdclark@gmail.com> | 2014-05-30 17:34:01 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-06-04 05:22:53 +0200 |
commit | 5ea22f24d77b511d68c4ecaf4e6fd5d6ab462b8f (patch) | |
tree | e6c3287bee5fec51e3deb8b905c156926c6a8985 /include/uapi/drm | |
parent | drm: helpers to find mode objects (diff) | |
download | linux-5ea22f24d77b511d68c4ecaf4e6fd5d6ab462b8f.tar.xz linux-5ea22f24d77b511d68c4ecaf4e6fd5d6ab462b8f.zip |
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.h | 13 |
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 { #define DRM_MODE_PROP_BLOB (1<<4) #define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ +/* non-extended types: legacy bitmask, one bit per type: */ +#define DRM_MODE_PROP_LEGACY_TYPE ( \ + DRM_MODE_PROP_RANGE | \ + DRM_MODE_PROP_ENUM | \ + DRM_MODE_PROP_BLOB | \ + DRM_MODE_PROP_BITMASK) + +/* extended-types: rather than continue to consume a bit per type, + * grab a chunk of the bits to use as integer type id. + */ +#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 +#define DRM_MODE_PROP_TYPE(n) ((n) << 6) + struct drm_mode_property_enum { __u64 value; char name[DRM_PROP_NAME_LEN]; |