summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-03 18:18:04 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-03 18:18:04 +0000
commit18ae7722dbdf6ab61560962ed6ca8d39f353b1f9 (patch)
tree0073f4e5ac9ad30305c71d5cfb34a96f3d179686 /src/sna/sna_driver.c
parent57d0cc82d851b95d4e3b1821287dd3ffd1cf6e3b (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.c12
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);