From 83090de0340e020c75cca9f28e74cf5413dabd04 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 29 Oct 2021 12:54:08 +0200 Subject: backend/drm: avoid creating empty FB_DAMAGE_CLIPS prop drmModeCreatePropertyBlob cannot create zero-sized blobs, that fails with EINVAL. Closes: https://github.com/swaywm/wlroots/issues/3297 --- backend/drm/atomic.c | 1 + 1 file changed, 1 insertion(+) (limited to 'backend') diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index 70f55aff..53487914 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -201,6 +201,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn, uint32_t fb_damage_clips = 0; if ((state->base->committed & WLR_OUTPUT_STATE_DAMAGE) && + pixman_region32_not_empty((pixman_region32_t *)&state->base->damage) && crtc->primary->props.fb_damage_clips != 0) { int rects_len; const pixman_box32_t *rects = pixman_region32_rectangles( -- cgit v1.2.3