summaryrefslogtreecommitdiff
path: root/kde-plasma/kwin/files/kwin-5.25.4-drm-fix-blob-updating.patch
blob: 282913620c7b4af64ef97c07b4faf08d404cc9e0 (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
30
31
32
33
34
35
36
37
38
From 9a81567777f94e2e6c1a121f1d86dd2bdea83adf Mon Sep 17 00:00:00 2001
From: Xaver Hugl <xaver.hugl@gmail.com>
Date: Thu, 4 Aug 2022 15:36:26 +0200
Subject: [PATCH] backends/drm: fix blob updating

Two things about the code were wrong:
1. m_current is used in updateBlob() but was only updated afterwards
2. the assumption that the property having the same ID means it has the
same blob contents is not always true

BUG: 449285


(cherry picked from commit 97939ceae864aef2f50e117496f548555877b4ea)
---
 src/backends/drm/drm_property.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/backends/drm/drm_property.cpp b/src/backends/drm/drm_property.cpp
index c9f7718abd..cee80d043a 100644
--- a/src/backends/drm/drm_property.cpp
+++ b/src/backends/drm/drm_property.cpp
@@ -112,10 +112,8 @@ bool DrmProperty::needsCommit() const
 
 void DrmProperty::setCurrent(uint64_t value)
 {
-    if (m_current != value) {
-        updateBlob();
-        m_current = value;
-    }
+    m_current = value;
+    updateBlob();
 }
 
 uint64_t DrmProperty::current() const
-- 
GitLab