[PATCH weston 2/4] compositor-drm: Only request vblank events if needed
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Fri Nov 9 04:19:03 PST 2012
If the sprite is disabled and we're not enabling it on the next frame,
nothing is done in the vblank handler, so there's no need to ask for a
vblank event.
---
src/compositor-drm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index ee57bf0..3a7d432 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -391,7 +391,8 @@ drm_output_repaint(struct weston_output *output_base,
.request.sequence = 1,
};
- if (!drm_sprite_crtc_supported(output_base, s->possible_crtcs))
+ if ((!s->fb_id && !s->pending_fb_id) ||
+ !drm_sprite_crtc_supported(output_base, s->possible_crtcs))
continue;
ret = drmModeSetPlane(compositor->drm.fd, s->plane_id,
--
1.7.10.4
More information about the wayland-devel
mailing list