diff options
author | Quanxian Wang <quanxian.wang@intel.com> | 2014-09-25 04:04:11 +0200 |
---|---|---|
committer | Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> | 2014-09-25 04:04:11 +0200 |
commit | e54320a932898e57be56b7e2ecdfde45f9f234ce (patch) | |
tree | 5e6766b7ec39b8764c6d12b51e46a9fd5ad403cc | |
parent | 64f3550381fa6c32f98b59d726ba5396f763dff5 (diff) | |
download | weston-e54320a932898e57be56b7e2ecdfde45f9f234ce.tar.gz weston-e54320a932898e57be56b7e2ecdfde45f9f234ce.tar.bz2 weston-e54320a932898e57be56b7e2ecdfde45f9f234ce.zip |
compositor-drm: Work around page flip not setting tiling mode on BYTsubmit/tizen_common/20141127.123634submit/tizen_common/20141119.172306submit/tizen_common/20141118.142721submit/tizen_common/20141118.114838submit/tizen/20141119.162904accepted/tizen/common/20141127.132314accepted/tizen/common/20141121.104003sandbox/mbachmann/weston160
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 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; } |