summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelissa Wen <mwen@igalia.com>2022-12-22 23:41:24 -0100
committerMelissa Wen <mwen@igalia.com>2023-01-03 11:12:15 -0100
commit8cce332bdc50d2b20d553d7a0221737f4399d031 (patch)
treeab734ffb0c3cf4c18183760cb6e831482816b9d9
parent305e8d105abf033cb850d1fb118e5cbfb6c9cd40 (diff)
tests/kms_color: disable degamma/gamma by default for CTM tests
The DRM color mgmt doc states "Each of the properties are optional" so CTM test should not depend on degamma/gamma properties to run. Also, setting each property individually is the way that atomic degamma/gamma tests work. However, from previous discussions around 64d0ff72 [1], i915 seems to need degamma/gamma settings around the CTM property (except for the max CTM cases). Therefore, remove dependency on degamma/gamma support from CTM tests and only set them for i915 (keeping the skip for max CTM cases). [1] https://patchwork.freedesktop.org/patch/296122/?series=58412&rev=9 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Alex Hung <alex.hung@amd.com>
-rw-r--r--tests/kms_color.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/kms_color.c b/tests/kms_color.c
index d016cefb4..e0c6a8bf2 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -493,12 +493,15 @@ static bool test_pipe_ctm(data_t *data,
igt_assert(fb_modeset_id);
igt_plane_set_fb(primary, &fb_modeset);
+ disable_degamma(primary->pipe);
+ disable_gamma(primary->pipe);
+
/*
- * Don't program LUT's for max CTM cases, as limitation of
+ * Only program LUT's for i915, but not for max CTM as limitation of
* representing intermediate values between 0 and 1.0 causes
* rounding issues and inaccuracies leading to crc mismatch.
*/
- if (memcmp(before, after, sizeof(color_t))) {
+ if (is_i915_device(data->drm_fd) && memcmp(before, after, sizeof(color_t))) {
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
@@ -507,10 +510,6 @@ static bool test_pipe_ctm(data_t *data,
set_degamma(data, primary->pipe, degamma_linear);
set_gamma(data, primary->pipe, gamma_linear);
- } else {
- /* Disable Degamma and Gamma for ctm max test */
- disable_degamma(primary->pipe);
- disable_gamma(primary->pipe);
}
disable_ctm(primary->pipe);