diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2012-05-15 17:09:01 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 06:11:13 -0400 |
commit | 7e3bdf4a6dca9eb153cc20d69d717308a68bec00 (patch) | |
tree | 48ae386340e926e9d84b7e5b750ac9f07da57392 /include/drm/drm_crtc.h | |
parent | afea2ad53f1fef0b57d0e59fa062f54797158b14 (diff) |
drm: create struct drm_object_properties and use it
For now, only connectors have it. In the future, all objects that need
properties should use it. Since the structure is referenced inside
struct drm_mode_object, we will be able to deal with object properties
without knowing the real type of the object.
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 036faec8a6fe..77606794308b 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -36,6 +36,7 @@ | |||
36 | struct drm_device; | 36 | struct drm_device; |
37 | struct drm_mode_set; | 37 | struct drm_mode_set; |
38 | struct drm_framebuffer; | 38 | struct drm_framebuffer; |
39 | struct drm_object_properties; | ||
39 | 40 | ||
40 | 41 | ||
41 | #define DRM_MODE_OBJECT_CRTC 0xcccccccc | 42 | #define DRM_MODE_OBJECT_CRTC 0xcccccccc |
@@ -50,6 +51,13 @@ struct drm_framebuffer; | |||
50 | struct drm_mode_object { | 51 | struct drm_mode_object { |
51 | uint32_t id; | 52 | uint32_t id; |
52 | uint32_t type; | 53 | uint32_t type; |
54 | struct drm_object_properties *properties; | ||
55 | }; | ||
56 | |||
57 | #define DRM_OBJECT_MAX_PROPERTY 16 | ||
58 | struct drm_object_properties { | ||
59 | uint32_t ids[DRM_OBJECT_MAX_PROPERTY]; | ||
60 | uint64_t values[DRM_OBJECT_MAX_PROPERTY]; | ||
53 | }; | 61 | }; |
54 | 62 | ||
55 | /* | 63 | /* |
@@ -451,7 +459,6 @@ struct drm_encoder_funcs { | |||
451 | }; | 459 | }; |
452 | 460 | ||
453 | #define DRM_CONNECTOR_MAX_UMODES 16 | 461 | #define DRM_CONNECTOR_MAX_UMODES 16 |
454 | #define DRM_CONNECTOR_MAX_PROPERTY 16 | ||
455 | #define DRM_CONNECTOR_LEN 32 | 462 | #define DRM_CONNECTOR_LEN 32 |
456 | #define DRM_CONNECTOR_MAX_ENCODER 3 | 463 | #define DRM_CONNECTOR_MAX_ENCODER 3 |
457 | 464 | ||
@@ -520,8 +527,7 @@ enum drm_connector_force { | |||
520 | * @funcs: connector control functions | 527 | * @funcs: connector control functions |
521 | * @user_modes: user added mode list | 528 | * @user_modes: user added mode list |
522 | * @edid_blob_ptr: DRM property containing EDID if present | 529 | * @edid_blob_ptr: DRM property containing EDID if present |
523 | * @property_ids: property tracking for this connector | 530 | * @properties: property tracking for this connector |
524 | * @property_values: value pointers or data for properties | ||
525 | * @polled: a %DRM_CONNECTOR_POLL_<foo> value for core driven polling | 531 | * @polled: a %DRM_CONNECTOR_POLL_<foo> value for core driven polling |
526 | * @dpms: current dpms state | 532 | * @dpms: current dpms state |
527 | * @helper_private: mid-layer private data | 533 | * @helper_private: mid-layer private data |
@@ -565,8 +571,7 @@ struct drm_connector { | |||
565 | 571 | ||
566 | struct list_head user_modes; | 572 | struct list_head user_modes; |
567 | struct drm_property_blob *edid_blob_ptr; | 573 | struct drm_property_blob *edid_blob_ptr; |
568 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; | 574 | struct drm_object_properties properties; |
569 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; | ||
570 | 575 | ||
571 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ | 576 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ |
572 | 577 | ||