[i-g-t V2 22/44] tests/color: Add XE support
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon Mar 27 16:09:04 UTC 2023
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/chamelium/kms_chamelium_color.c | 5 +++--
tests/kms_color.c | 12 ++++++------
tests/kms_color_helper.c | 2 +-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
index b7c84ae4d..782921bad 100644
--- a/tests/chamelium/kms_chamelium_color.c
+++ b/tests/chamelium/kms_chamelium_color.c
@@ -680,12 +680,13 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.drm_fd))
- data.devid = intel_get_drm_devid(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
igt_require(data.display.is_atomic);
+ if (is_intel_device(data.drm_fd))
+ data.devid = intel_get_drm_devid(data.drm_fd);
+
igt_chamelium_allow_fsm_handling = false;
/* we need to initalize chamelium after igt_display_require */
diff --git a/tests/kms_color.c b/tests/kms_color.c
index cd03c1354..c14f7de26 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -499,11 +499,11 @@ static bool test_pipe_ctm(data_t *data,
disable_gamma(primary->pipe);
/*
- * Only program LUT's for i915, but not for max CTM as limitation of
+ * Only program LUT's for intel, 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 (is_i915_device(data->drm_fd) && memcmp(before, after, sizeof(color_t))) {
+ if (is_intel_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));
@@ -813,7 +813,7 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
0.0, 1.0, 0.0,
1.0, 0.0, 1.0 };
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
igt_require_f((intel_display_ver(data->devid) >= 11),
"At least GEN 11 is required to validate Deep-color.\n");
@@ -833,7 +833,7 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
igt_output_set_prop_value(output, IGT_CONNECTOR_MAX_BPC, 10);
igt_output_set_pipe(output, p);
- if (is_i915_device(data->drm_fd) &&
+ if (is_intel_device(data->drm_fd) &&
!igt_max_bpc_constraint(&data->display, p, output, 10))
continue;
@@ -1054,11 +1054,11 @@ igt_main
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- if (is_i915_device(data.drm_fd))
- data.devid = intel_get_drm_devid(data.drm_fd);
kmstest_set_vt_graphics_mode();
igt_display_require(&data.display, data.drm_fd);
+ if (is_intel_device(data.drm_fd))
+ data.devid = intel_get_drm_devid(data.drm_fd);
}
igt_subtest_group
diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 2f9950f80..b01c38ef6 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -181,7 +181,7 @@ struct drm_color_lut *coeffs_to_lut(data_t *data,
uint32_t max_value = (1 << 16) - 1;
uint32_t mask;
- if (is_i915_device(data->drm_fd))
+ if (is_intel_device(data->drm_fd))
mask = ((1 << color_depth) - 1) << (16 - color_depth);
else
mask = max_value;
--
2.40.0
More information about the Intel-gfx-trybot
mailing list