xf86-video-amdgpu: Branch 'master'
Michel Dänzer
daenzer at kemper.freedesktop.org
Mon Apr 17 09:30:42 UTC 2017
src/amdgpu_drv.h | 5 +++++
src/amdgpu_kms.c | 6 +++---
src/drmmode_display.c | 6 ++++++
3 files changed, 14 insertions(+), 3 deletions(-)
New commits:
commit 981bac185cfd74ae50dffc28f57cf34623a9595f
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Thu Mar 23 18:51:38 2017 +0900
Don't set modes before AMDGPUWindowExposures_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: ad53635af150 ("Move DPMS check from amdgpu_scanout_do_update to
amdgpu_scanout_flip")
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index 532d99d..e5c44dc 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -315,6 +315,11 @@ Bool amdgpu_dri3_screen_init(ScreenPtr screen);
/* amdgpu_kms.c */
Bool amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id);
+void AMDGPUWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0)
+ , RegionPtr pBSRegion
+#endif
+ );
/* amdgpu_present.c */
Bool amdgpu_present_screen_init(ScreenPtr screen);
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index c4ac90d..0182cbe 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1258,11 +1258,11 @@ static Bool AMDGPUCreateWindow_oneshot(WindowPtr pWin)
}
/* When the root window is mapped, set the initial modes */
-static void AMDGPUWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion
+void AMDGPUWindowExposures_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);
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f58d28f..5e0c413 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -779,6 +779,12 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
drmModeModeInfo kmode;
uint32_t bo_handle;
+ /* 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 == AMDGPUWindowExposures_oneshot)
+ return FALSE;
+
saved_mode = crtc->mode;
saved_x = crtc->x;
saved_y = crtc->y;
More information about the xorg-commit
mailing list