summaryrefslogtreecommitdiff
path: root/shared-core
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 /shared-core
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 'shared-core')
-rw-r--r--shared-core/drm.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 55675d2f..9219b456 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -897,6 +897,7 @@ struct drm_mm_init_arg {
#define DRM_DISPLAY_INFO_LEN 32
#define DRM_OUTPUT_NAME_LEN 32
#define DRM_DISPLAY_MODE_LEN 32
+#define DRM_PROP_NAME_LEN 32
#define DRM_MODE_TYPE_BUILTIN (1<<0)
#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN)
@@ -976,6 +977,32 @@ struct drm_mode_get_output {
int count_modes;
unsigned int __user *modes; /**< list of modes it supports */
+ int count_props;
+ unsigned int __user *props;
+ unsigned int __user *prop_values;
+};
+
+#define DRM_MODE_PROP_PENDING (1<<0)
+#define DRM_MODE_PROP_RANGE (1<<1)
+#define DRM_MODE_PROP_IMMUTABLE (1<<2)
+#define DRM_MODE_PROP_ENUM (1<<3) // enumerated type with text strings
+
+struct drm_mode_property_enum {
+ uint32_t value;
+ unsigned char name[DRM_PROP_NAME_LEN];
+};
+
+struct drm_mode_get_property {
+
+ unsigned int prop_id;
+ unsigned int flags;
+ unsigned char name[DRM_PROP_NAME_LEN];
+
+ int count_values;
+ uint32_t __user *values;
+
+ int count_enums;
+ struct drm_mode_property_enum *enums;
};
struct drm_mode_fb_cmd {
@@ -1096,6 +1123,8 @@ struct drm_mode_mode_cmd {
#define DRM_IOCTL_MODE_RMMODE DRM_IOWR(0xA8, unsigned int)
#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xAA, struct drm_mode_mode_cmd)
+
+#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAB, struct drm_mode_get_property)
/*@}*/
/**