sna: Cancel the backlight change if set-property(DPMS) fails
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Jan 2014 12:51:00 +0000 (12:51 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Jan 2014 12:51:00 +0000 (12:51 +0000)
commitb99c8cbefdd8fec686ad81fbffebb70d43880779
treeb43a10dbd11eba147de6166262eb90b803735bfc
parent47effa1854e331643302146db238e6b092de8a9a
sna: Cancel the backlight change if set-property(DPMS) fails

If the kernel reports an error from setting the DPMS property, we need
to undo the local changes and propagate back the error to the caller.
Although the latter is prevented by the RandR API, we can at least
restore the backlight.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_display.c