summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-03-02 10:33:35 -0500
committerAdam Jackson <ajax@redhat.com>2009-03-02 10:34:41 -0500
commitbd360e7517835626bee54bec968cdc78908c6545 (patch)
tree17c540612cbce3729d738484b2f01705265d0524
parent2d0aa553609a0e64fa4b2e755b9b1e244e5c3fa1 (diff)
KMS: Wire up output DPMS.
-rw-r--r--src/drmmode_display.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8128004e..d9ca16c7 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -506,7 +506,27 @@ drmmode_output_destroy(xf86OutputPtr output)
static void
drmmode_output_dpms(xf86OutputPtr output, int mode)
{
- return;
+ drmmode_output_private_ptr drmmode_output = output->driver_private;
+ drmModeConnectorPtr koutput = drmmode_output->mode_output;
+ drmmode_ptr drmmode = drmmode_output->drmmode;
+ int i;
+ drmModePropertyPtr props;
+
+ for (i = 0; i < koutput->count_props; i++) {
+ props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
+ if (!props)
+ continue;
+
+ if (!strcmp(props->name, "DPMS")) {
+ drmModeConnectorSetProperty(drmmode->fd,
+ drmmode_output->output_id,
+ props->prop_id,
+ mode);
+ drmModeFreeProperty(props);
+ return;
+ }
+ drmModeFreeProperty(props);
+ }
}
static const xf86OutputFuncsRec drmmode_output_funcs = {