summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-12-11 15:56:48 +1000
committerDave Airlie <airlied@linux.ie>2007-12-11 15:56:48 +1000
commitf99dea7db00dd46aa96eaed3a61dff9c956fd86f (patch)
tree74e3c6321c3403c54c81619eb20bb64c9dbc35d3 /libdrm
parent3b6786e3e6523b1ceca3645ea4c6081f170d2134 (diff)
modesetting: fixup property setting and add connector property
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c18
-rw-r--r--libdrm/xf86drmMode.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 7e2683ea..726c55ab 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -214,6 +214,8 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
int drmModeRmFB(int fd, uint32_t bufferId)
{
return ioctl(fd, DRM_IOCTL_MODE_RMFB, &bufferId);
+
+
}
drmModeFBPtr drmModeGetFB(int fd, uint32_t buf)
@@ -511,3 +513,19 @@ void drmModeFreePropertyBlob(drmModePropertyBlobPtr ptr)
drmFree(ptr->data);
drmFree(ptr);
}
+
+int drmModeOutputSetProperty(int fd, uint32_t output_id, uint32_t property_id,
+ uint64_t value)
+{
+ struct drm_mode_output_set_property osp;
+ int ret;
+
+ osp.output_id = output_id;
+ osp.prop_id = property_id;
+ osp.value = value;
+
+ if (ret = ioctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp))
+ return ret;
+
+ return 0;
+}
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index 6fcf6a19..05b61bc8 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -223,3 +223,5 @@ extern void drmModeFreeProperty(drmModePropertyPtr ptr);
extern drmModePropertyBlobPtr drmModeGetPropertyBlob(int fd, uint32_t blob_id);
extern void drmModeFreePropertyBlob(drmModePropertyBlobPtr ptr);
+extern int drmModeOutputSetProperty(int fd, uint32_t output_id, uint32_t property_id,
+ uint64_t value);