[PATCH weston 2/3 v2] compositor-drm: Do not perform a modeset when the output has been leased

Marius Vlad marius-cristian.vlad at nxp.com
Mon Feb 12 14:54:30 UTC 2018


This removes the blanking period until the client takes "control" of the
output, resulting in a smoother transition between weston and lease client.

Signed-off-by: Marius Vlad <marius-cristian.vlad at nxp.com>
---
 libweston/compositor-drm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 253d0f7..98e3ba4 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -4115,8 +4115,10 @@ drm_output_disable(struct weston_output *base)
 	output->disable_pending = 0;
 
 	weston_log("Disabling output %s\n", output->base.name);
-	drmModeSetCrtc(b->drm.fd, output->crtc_id,
-		       0, 0, 0, 0, 0, NULL);
+	/* do not perform a modeset with a blank fb when leasing the output */
+	if (!base->lease)
+		drmModeSetCrtc(b->drm.fd, output->crtc_id,
+			       0, 0, 0, 0, 0, NULL);
 
 	drm_output_state_free(output->state_cur);
 	output->state_cur = drm_output_state_alloc(output, NULL);
-- 
2.9.3



More information about the wayland-devel mailing list