[igt-dev] [PATCH i-g-t 2/3] tests/kms_color: Do not mask LUT for non i915 drivers.

sunpeng.li at amd.com sunpeng.li at amd.com
Thu Apr 12 21:37:25 UTC 2018


From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>

---
 tests/kms_color.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index c312697..1e51917 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -165,7 +165,12 @@ static struct _drm_color_lut *coeffs_to_lut(data_t *data,
 	struct _drm_color_lut *lut;
 	uint32_t i;
 	uint32_t max_value = (1 << 16) - 1;
-	uint32_t mask = ((1 << color_depth) - 1) << 8;
+	uint32_t mask;
+
+	if (is_i915_device(data->drm_fd))
+		mask = ((1 << color_depth) - 1) << 8;
+	else
+		mask = max_value;
 
 	lut = malloc(sizeof(struct _drm_color_lut) * lut_size);
 
-- 
2.7.4



More information about the igt-dev mailing list