diff options
author | Quanxian Wang <quanxian.wang@intel.com> | 2014-09-25 04:04:11 +0200 |
---|---|---|
committer | Boram Park <boram1288.park@samsung.com> | 2015-11-06 11:47:14 +0900 |
commit | f85d80e892eab8f6cf628c7abe4734ee8cb6ae66 (patch) | |
tree | 55796a8bb904fb32cf6ce1396004711a91e74986 | |
parent | f00273e974436ec7364d8b60fa02972e7bb97875 (diff) | |
download | weston-f85d80e892eab8f6cf628c7abe4734ee8cb6ae66.tar.gz weston-f85d80e892eab8f6cf628c7abe4734ee8cb6ae66.tar.bz2 weston-f85d80e892eab8f6cf628c7abe4734ee8cb6ae66.zip |
compositor-drm: Work around page flip not setting tiling mode on BYT
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 90378e7c..4829ff34 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]; @@ -614,7 +615,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, @@ -624,6 +626,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, @@ -2788,8 +2791,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; } |