summaryrefslogtreecommitdiff
path: root/libdrm/xf86drmMode.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-11-27 14:31:02 +1000
committerDave Airlie <airlied@redhat.com>2007-11-27 14:31:02 +1000
commitb3af2b59a77a6916ea7151236d3da9bde6a537fc (patch)
tree5d376ad9c6c4727dd7c8fdca4277c56b7d33cb85 /libdrm/xf86drmMode.h
parentf9ac54b0319b273de83a004d6cfdf46a3b9d6ced (diff)
drm/modesetting: add initial gettable properites code.
This allow the user to retrieve a list of properties for an output. Properties can either be 32-bit values or an enum with an associated name. Range properties are to be supported. This API is probably not all correct, I may make properties part of the general resource get when I think about it some more. So basically you can create properties and attached them to whatever outputs you want, so it should be possible to create some generics and just attach them to every output.
Diffstat (limited to 'libdrm/xf86drmMode.h')
-rw-r--r--libdrm/xf86drmMode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index be9d84af..5e966e95 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -70,6 +70,17 @@ typedef struct _drmModeRes {
typedef struct drm_mode_fb_cmd drmModeFB, *drmModeFBPtr;
+typedef struct _drmModeProperty {
+ unsigned int prop_id;
+ unsigned int flags;
+ unsigned char name[DRM_PROP_NAME_LEN];
+ int count_values;
+ uint32_t *values;
+ int count_enums;
+ struct drm_mode_property_enum *enums;
+
+} drmModePropertyRes, *drmModePropertyPtr;
+
typedef struct _drmModeCrtc {
unsigned int crtc_id;
unsigned int buffer_id; /**< FB id to connect to 0 = disconnect*/
@@ -121,6 +132,10 @@ typedef struct _drmModeOutput {
int count_modes;
uint32_t *modes; /**< List of modes ids */
+ int count_props;
+ uint32_t *props; /**< List of property ids */
+ uint32_t *prop_values; /**< List of property values */
+
} drmModeOutput, *drmModeOutputPtr;
@@ -207,3 +222,5 @@ extern int drmModeAttachMode(int fd, uint32_t outputId, uint32_t modeId);
*/
extern int drmModeDetachMode(int fd, uint32_t outputId, uint32_t modeId);
+extern drmModePropertyPtr drmModeGetProperty(int fd, uint32_t propertyId);
+extern void drmModeFreeProperty(drmModePropertyPtr ptr);