summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-graphics/drm/files/0002-modetest-call-drmModeCrtcSetGamma-only-if-add_proper.patch
blob: 9d2eff7df0a68767b1e409559a1c30a4b2faf80b (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
From ab7aa7563e3b044f84f123f0ed59b370ff0af3f5 Mon Sep 17 00:00:00 2001
From: Rohit Visavalia <rohit.visavalia@xilinx.com>
Date: Mon, 24 Feb 2020 03:35:58 -0800
Subject: [PATCH 2/5] modetest: call drmModeCrtcSetGamma() only if
 add_property_optional returns true

gamma is a optional property then also it prints error message, so
set gamma only if add_property_optional() returns true.

Upstream-Status: Pending

Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com>
---
 tests/modetest/modetest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 2c83bd0..3e73505 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1142,7 +1142,7 @@ static void set_gamma(struct device *dev, unsigned crtc_id, unsigned fourcc)
 
 	add_property_optional(dev, crtc_id, "DEGAMMA_LUT", 0);
 	add_property_optional(dev, crtc_id, "CTM", 0);
-	if (!add_property_optional(dev, crtc_id, "GAMMA_LUT", blob_id)) {
+	if (add_property_optional(dev, crtc_id, "GAMMA_LUT", blob_id)) {
 		uint16_t r[256], g[256], b[256];
 
 		for (i = 0; i < 256; i++) {
-- 
2.7.4