diff --git a/src/i830_lvds.c b/src/i830_lvds.c index ef8fa4a..5fbb2ae 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -851,6 +851,32 @@ i830_lvds_set_property(xf86OutputPtr output, Atom property, } #endif /* RANDR_12_INTERFACE */ +#ifdef RANDR_13_INTERFACE +static Bool +i830_lvds_get_property(xf86OutputPtr output, Atom property) +{ + ScrnInfoPtr pScrn = output->scrn; + I830Ptr pI830 = I830PTR(pScrn); + I830OutputPrivatePtr intel_output = output->driver_private; + struct i830_lvds_priv *dev_priv = intel_output->dev_priv; + + /* + * Only need to update properties that might change out from under + * us. The others will be cached by the randr core code. + */ + if (property == backlight_atom) { + int val; + val = dev_priv->get_backlight(output); + dev_priv->backlight_duty_cycle = val; + return RRChangeOutputProperty(output->randr_output, backlight_atom, + XA_INTEGER, 32, PropModeReplace, 1, &val, + FALSE, TRUE); + } + + return TRUE; +} +#endif /* RANDR_13_INTERFACE */ + static const xf86OutputFuncsRec i830_lvds_output_funcs = { .create_resources = i830_lvds_create_resources, .dpms = i830_lvds_dpms, @@ -866,6 +892,9 @@ static const xf86OutputFuncsRec i830_lvds_output_funcs = { #ifdef RANDR_12_INTERFACE .set_property = i830_lvds_set_property, #endif +#ifdef RANDR_13_INTERFACE + .get_property = i830_lvds_get_property, +#endif .destroy = i830_lvds_destroy };