diff options
author | Eric Anholt <eric@anholt.net> | 2007-01-16 12:54:29 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-01-16 12:54:29 -0800 |
commit | 66c6427cc83e5e381932b0c10743cba4cb9ac883 (patch) | |
tree | 3736cd91468576429ef52b4e4fc637905185024b /src/i830_randr.c | |
parent | 45696aa29124e2852f94880642e70bb2e0cee827 (diff) |
Add a settable backlight property for LVDS.
This extends the output funcs to have a callback for when it's time to
configure properties, and another for when the server has changed a property
whose value isn't pending a mode set. (Pending properties are to be picked up
by the driver at mode_set time).
Diffstat (limited to 'src/i830_randr.c')
-rw-r--r-- | src/i830_randr.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/i830_randr.c b/src/i830_randr.c index 18f84c49..63888494 100644 --- a/src/i830_randr.c +++ b/src/i830_randr.c @@ -672,6 +672,23 @@ xf86RandR12CrtcSetGamma (ScreenPtr pScreen, return TRUE; } +static Bool +xf86RandR12OutputSetProperty (ScreenPtr pScreen, + RROutputPtr randr_output, + Atom property, + RRPropertyValuePtr value) +{ + xf86OutputPtr output = randr_output->devPrivate; + + /* If we don't have any property handler, then we don't care what the + * user is setting properties to. + */ + if (output->funcs->set_property == NULL) + return TRUE; + + return output->funcs->set_property(output, property, value); +} + /** * Given a list of xf86 modes and a RandR Output object, construct * RandR modes and assign them to the output @@ -861,6 +878,9 @@ xf86RandR12CreateObjects12 (ScreenPtr pScreen) strlen (output->name), output); RROutputAttachScreen (output->randr_output, pScreen); + + if (output->funcs->create_resources != NULL) + output->funcs->create_resources(output); } return TRUE; } @@ -897,6 +917,7 @@ xf86RandR12Init12 (ScreenPtr pScreen) rp->rrScreenSetSize = xf86RandR12ScreenSetSize; rp->rrCrtcSet = xf86RandR12CrtcSet; rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; + rp->rrOutputSetProperty = xf86RandR12OutputSetProperty; rp->rrSetConfig = NULL; pScrn->PointerMoved = xf86RandR12PointerMoved; if (!xf86RandR12CreateObjects12 (pScreen)) |