summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drmmode_display.c6
-rw-r--r--src/radeon.h5
-rw-r--r--src/radeon_kms.c6
3 files changed, 14 insertions, 3 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;
diff --git a/src/radeon.h b/src/radeon.h
index 73744115..2cb188e1 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -634,6 +634,11 @@ Bool radeon_dri3_screen_init(ScreenPtr screen);
/* radeon_kms.c */
Bool radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id);
+void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
+ , RegionPtr pBSRegion
+#endif
+ );
/* radeon_present.c */
Bool radeon_present_screen_init(ScreenPtr screen);
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 424f9f72..b3427c46 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1627,11 +1627,11 @@ static Bool RADEONCreateWindow_oneshot(WindowPtr pWin)
}
/* When the root window is mapped, set the initial modes */
-static void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
+void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
- , RegionPtr pBSRegion
+ , RegionPtr pBSRegion
#endif
- )
+ )
{
ScreenPtr pScreen = pWin->drawable.pScreen;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);