blob: 7994eb8c81fcb800f18541c3ee1106ba728610c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 0b5c47edcaf0e197f601fbf82bb3c52da8d93c87 Mon Sep 17 00:00:00 2001
From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
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 <leandro.ribeiro@collabora.com>
(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;
}
|