From 52dd9663af891e050ab88363eb275b74019c0da2 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Tue, 24 Sep 2024 10:08:51 -0300 Subject: [PATCH] drm: fix issue with enum being wrongly used FAILURE_REASONS_ADD_FB_FAILED is defined as (1 << 3), so when we are accumulating "failure reasons" in a variable we don't need to do the bit shift again. This results in an issue, because (1 << FAILURE_REASONS_ADD_FB_FAILED) results in (1 << (1 << 3)) == (1 << 8). Signed-off-by: Leandro Ribeiro Upstream-Status: Backport --- libweston/backend-drm/fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/backend-drm/fb.c b/libweston/backend-drm/fb.c index 8c200b88..09436e62 100644 --- a/libweston/backend-drm/fb.c +++ b/libweston/backend-drm/fb.c @@ -743,7 +743,7 @@ drm_fb_get_from_paint_node(struct drm_output_state *state, fb = drm_fb_get_from_bo(bo, device, is_opaque, BUFFER_CLIENT); if (!fb) { pnode->try_view_on_plane_failure_reasons |= - (1 << FAILURE_REASONS_ADD_FB_FAILED); + FAILURE_REASONS_ADD_FB_FAILED; gbm_bo_destroy(bo); goto unsuitable; }