summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-04-17 18:32:31 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2017-04-17 18:32:31 +0900
commit4c91f36d3058180b5a2d6a23e9b82f5c933d8716 (patch)
tree3e12378a7002de650879661477eb06b9d6e30ad8 /src/drmmode_display.c
parentd6c29250dbc293c932ca14997eb23399610b106d (diff)
Don't set modes before RADEONWindowExposures_oneshot is called
The root window contents may be undefined before that, so we don't want to show anything yet. Fixes a crash on startup with rotation and virtual resolution set in xorg.conf. Bugzilla: https://bugs.freedesktop.org/100276 Fixes: cc9d6b7db9c2 ("Move DPMS check from radeon_scanout_do_update to radeon_scanout_flip") (Ported from amdgpu commit 981bac185cfd74ae50dffc28f57cf34623a9595f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9911c0a6..84e7ef96 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -833,6 +833,12 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
int fb_id;
drmModeModeInfo kmode;
+ /* The root window contents may be undefined before the WindowExposures
+ * hook is called for it, so bail if we get here before that
+ */
+ if (pScreen->WindowExposures == RADEONWindowExposures_oneshot)
+ return FALSE;
+
saved_mode = crtc->mode;
saved_x = crtc->x;
saved_y = crtc->y;