diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 3417cab..cea496d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -313,6 +313,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, int fb_id; drmModeModeInfo kmode; unsigned int pitch = scrn->displayWidth * intel->cpp; + struct drm_intel_bo *fb_bo; if (drmmode->fb_id == 0) { ret = drmModeAddFB(drmmode->fd, @@ -336,6 +337,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->y = y; crtc->rotation = rotation; + fb_bo = intel->front_buffer->bo; + output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) { ret = FALSE; @@ -376,7 +379,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, fb_id = drmmode_crtc->rotate_fb_id; x = 0; y = 0; + fb_bo = drmmode_crtc->rotate_bo; } + /* Wait rendering to fb object complete before actual modesetting */ + drm_intel_gem_start_gtt_access(fb_bo, 1); + ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, x, y, output_ids, output_count, &kmode); if (ret)