From 5ca1a47e2342007107f55566a692e8b7935997fe Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 8 Aug 2012 20:27:37 -0500 Subject: [PATCH] compositor-drm: handle vblanks on secondary crtc Signed-off-by: Rob Clark --- src/compositor-drm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index cde6d5d5..e3cf134a 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -116,6 +116,7 @@ struct drm_output { char *name; uint32_t crtc_id; + int pipe; uint32_t connector_id; drmModeCrtcPtr original_crtc; @@ -407,6 +408,9 @@ drm_output_repaint(struct weston_output *output_base, weston_log("setplane failed: %d: %s\n", ret, strerror(errno)); + if (output->pipe > 0) + vbl.request.type |= DRM_VBLANK_SECONDARY; + /* * Queue a vblank signal so we know when the surface * becomes active on the display or has been replaced. @@ -1365,6 +1369,7 @@ create_output_for_connector(struct drm_compositor *ec, output->name = strdup(name); output->crtc_id = resources->crtcs[i]; + output->pipe = i; ec->crtc_allocator |= (1 << output->crtc_id); output->connector_id = connector->connector_id; ec->connector_allocator |= (1 << output->connector_id);