From f99dea7db00dd46aa96eaed3a61dff9c956fd86f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 11 Dec 2007 15:56:48 +1000 Subject: modesetting: fixup property setting and add connector property --- libdrm/xf86drmMode.c | 18 ++++++++++++++++++ libdrm/xf86drmMode.h | 2 ++ 2 files changed, 20 insertions(+) (limited to 'libdrm') 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); -- cgit v1.2.3