History

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.

Rob Clark committed 12 years ago

Commit 5ea22f21 parent a2b34e23 files · +47 −9Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/drm/drm_mode.h+13−0
@@ -252,6 +252,19 @@ struct drm_mode_get_connector { · 251 unmodified lines
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];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t