From 1b34c5cd807252c478e5eb6a7c90dd983be4361e Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 9 Dec 2021 16:18:19 +0000 Subject: [PATCH] backend-drm: Remove unnecessary check in prepare_scanout_view We already guarantee this from the caller. Signed-off-by: Daniel Stone --- libweston/backend-drm/state-propose.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 8b361f1a..c2d6d3eb 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -307,6 +307,7 @@ drm_output_prepare_scanout_view(struct drm_output_state *output_state, assert(!b->sprites_are_broken); assert(b->atomic_modeset); assert(mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY); + assert(fb); /* If the surface buffer has an in-fence fd, but the plane doesn't * support fences, we can't place the buffer on this plane. */ @@ -317,12 +318,6 @@ drm_output_prepare_scanout_view(struct drm_output_state *output_state, return NULL; } - if (!fb) { - drm_debug(b, "\t\t\t\t[%s] not placing view %p on %s: " - " couldn't get fb\n", p_name, ev, p_name); - return NULL; - } - state = drm_output_state_get_plane(output_state, scanout_plane); /* The only way we can already have a buffer in the scanout plane is