diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-08-06 16:27:01 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-08-07 11:40:45 +0900 |
commit | 3791fceabf2cb037467dc41c15364e9f9ec1e47e (patch) | |
tree | 2227e95e2427c476804884998de20b88b28daab8 | |
parent | 4e3dfa69e4630df2e0ec0f5b81d61159757c4664 (diff) |
Wait for scanout BO initialization to finish before setting mode
This should avoid intermittent artifacts which could sometimes be visible
when setting a new scanout pixmap, e.g. on server startup or when
changing resolutions.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/drmmode_display.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index a7690131..efc35f02 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -467,6 +467,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) FreeScratchGC(gc); radeon_cs_flush_indirect(pScrn); + radeon_bo_wait(info->front_bo); pScreen->canDoBGNoneRoot = TRUE; destroy_pixmap_for_fbcon(pScrn); @@ -757,6 +758,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, x = y = 0; radeon_scanout_update_handler(pScrn, 0, 0, crtc); + radeon_bo_wait(drmmode_crtc->scanout[0].bo); } } ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, @@ -1959,6 +1961,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) FreeScratchGC(gc); info->accel_state->force = force; radeon_cs_flush_indirect(scrn); + radeon_bo_wait(info->front_bo); for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; |