[PATCH weston] compositor-drm: handle vblanks on secondary crtc

Rob Clark rob.clark at linaro.org
Wed Aug 8 18:27:37 PDT 2012


From: Rob Clark <rob at ti.com>

Signed-off-by: Rob Clark <rob at ti.com>
---
 src/compositor-drm.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 8ea4965..80dccfc 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -100,6 +100,7 @@ struct drm_output {
 	struct weston_output   base;
 
 	uint32_t crtc_id;
+	int pipe;
 	uint32_t connector_id;
 	drmModeCrtcPtr original_crtc;
 
@@ -374,6 +375,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.
@@ -1285,6 +1289,7 @@ create_output_for_connector(struct drm_compositor *ec,
 	wl_list_init(&output->base.mode_list);
 
 	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);
-- 
1.7.9.5



More information about the wayland-devel mailing list