From 0b5c47edcaf0e197f601fbf82bb3c52da8d93c87 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Tue, 24 Sep 2024 10:08:51 -0300 Subject: [PATCH 3/4] 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 (cherry picked from commit 8b83bb5cebe64b672e978dc3423afe97d6178b7e) --- libweston/backend-drm/fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/libweston/backend-drm/fb.c +++ b/libweston/backend-drm/fb.c @@ -742,7 +742,7 @@ drm_fb_get_from_paint_node(struct drm_ou 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; }