Commit c66c548e authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

modesetting: Call glamor_finish from drmmode_crtc_set_mode



This makes sure any pending drawing to a new scanout buffer will be
visible from the start.

This makes the finish call in drmmode_copy_fb superfluous, so remove it.
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 06ef320e
...@@ -755,6 +755,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) ...@@ -755,6 +755,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_ptr drmmode = drmmode_crtc->drmmode;
ScreenPtr screen = crtc->scrn->pScreen;
drmModeModeInfo kmode; drmModeModeInfo kmode;
int output_count = 0; int output_count = 0;
uint32_t *output_ids = NULL; uint32_t *output_ids = NULL;
...@@ -765,6 +766,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) ...@@ -765,6 +766,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y)) if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
return 1; return 1;
#ifdef GLAMOR_HAS_GBM
/* Make sure any pending drawing will be visible in a new scanout buffer */
if (drmmode->glamor)
glamor_finish(screen);
#endif
if (ms->atomic_modeset) { if (ms->atomic_modeset) {
drmModeAtomicReq *req = drmModeAtomicAlloc(); drmModeAtomicReq *req = drmModeAtomicAlloc();
Bool active; Bool active;
...@@ -1419,7 +1426,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) ...@@ -1419,7 +1426,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
#ifdef GLAMOR_HAS_GBM #ifdef GLAMOR_HAS_GBM
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
ScreenPtr pScreen = xf86ScrnToScreen(pScrn); ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
modesettingPtr ms = modesettingPTR(pScrn);
PixmapPtr src, dst; PixmapPtr src, dst;
int fbcon_id = 0; int fbcon_id = 0;
GCPtr gc; GCPtr gc;
...@@ -1457,8 +1463,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) ...@@ -1457,8 +1463,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
FreeScratchGC(gc); FreeScratchGC(gc);
glamor_finish(pScreen);
pScreen->canDoBGNoneRoot = TRUE; pScreen->canDoBGNoneRoot = TRUE;
if (drmmode->fbcon_pixmap) if (drmmode->fbcon_pixmap)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment