summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuanxian Wang <quanxian.wang@intel.com>2014-09-25 04:04:11 +0200
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-09-25 04:04:11 +0200
commite54320a932898e57be56b7e2ecdfde45f9f234ce (patch)
tree5e6766b7ec39b8764c6d12b51e46a9fd5ad403cc
parent64f3550381fa6c32f98b59d726ba5396f763dff5 (diff)
downloadweston-e54320a932898e57be56b7e2ecdfde45f9f234ce.tar.gz
weston-e54320a932898e57be56b7e2ecdfde45f9f234ce.tar.bz2
weston-e54320a932898e57be56b7e2ecdfde45f9f234ce.zip
The page flip ioctl() doesn't switch the tiling mode on BYT. That causes cause display corruption when doing the renderer switch, since the dumb buffer is untiled and the back buffers used by the GL renderer are use X tiling. Change-Id: I2f03ac44c1aa15e15b5a2a394932e94af2654124 Author: Quanxian Wang <quanxian.wang@intel.com> Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-rw-r--r--src/compositor-drm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 11219233..6732c1b0 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -167,6 +167,7 @@ struct drm_output {
int vblank_pending;
int page_flip_pending;
int destroy_pending;
+ int force_modeset;
struct gbm_surface *surface;
struct gbm_bo *cursor_bo[2];
@@ -613,7 +614,8 @@ drm_output_repaint(struct weston_output *output_base,
mode = container_of(output->base.current_mode, struct drm_mode, base);
if (!output->current ||
- output->current->stride != output->next->stride) {
+ output->current->stride != output->next->stride ||
+ output->force_modeset) {
ret = drmModeSetCrtc(compositor->drm.fd, output->crtc_id,
output->next->fb_id, 0, 0,
&output->connector_id, 1,
@@ -623,6 +625,7 @@ drm_output_repaint(struct weston_output *output_base,
goto err_pageflip;
}
output_base->set_dpms(output_base, WESTON_DPMS_ON);
+ output->force_modeset = 0;
}
if (drmModePageFlip(compositor->drm.fd, output->crtc_id,
@@ -2727,8 +2730,11 @@ switch_to_gl_renderer(struct drm_compositor *c)
assert(0);
}
- wl_list_for_each(output, &c->base.output_list, base.link)
+ wl_list_for_each(output, &c->base.output_list, base.link) {
+ /* Workaround page flip not setting the tiling mode on BYT */
+ output->force_modeset = 1;
drm_output_init_egl(output, c);
+ }
c->use_pixman = 0;
}