diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-03 18:18:04 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-03 18:18:04 +0000 |
commit | 18ae7722dbdf6ab61560962ed6ca8d39f353b1f9 (patch) | |
tree | 0073f4e5ac9ad30305c71d5cfb34a96f3d179686 /src/sna/sna_driver.c | |
parent | 57d0cc82d851b95d4e3b1821287dd3ffd1cf6e3b (diff) |
sna: Wrap xf86DPMSSet
We need to wrap xf86DPMSSet() so that we can reintialize our bookkeeping
and auxiliary planes after disabling/re-enabling CRTC during DPMS
operations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r-- | src/sna/sna_driver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index abcc8ba1..4454b327 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -300,6 +300,16 @@ static Bool sna_save_screen(ScreenPtr screen, int mode) return TRUE; } +static void sna_dpms_set(ScrnInfoPtr scrn, int mode, int flags) +{ + DBG(("%s(mode=%d, flags=%d)\n", __FUNCTION__, mode)); + if (!scrn->vtSema) + return; + + xf86DPMSSet(scrn, mode, flags); + sna_crtc_config_notify(xf86ScrnToScreen(scrn)); +} + static void sna_selftest(void) { sna_damage_selftest(); @@ -1107,7 +1117,7 @@ sna_screen_init(SCREEN_INIT_ARGS_DECL) CMAP_PALETTED_TRUECOLOR)) return FALSE; - xf86DPMSInit(screen, xf86DPMSSet, 0); + xf86DPMSInit(screen, sna_dpms_set, 0); sna_video_init(sna, screen); sna_dri_init(sna, screen); |