[PATCH i-g-t 2/2] tests/intel/kms_psr: enable given psr mode only after checking enable_psr modparam
Kunal Joshi
kunal1.joshi at intel.com
Tue Jan 23 14:18:35 UTC 2024
don't enable a psr mode with psr_debug debugfs, instead check what's
the modparam value for i915_enable_psr
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
tests/intel/kms_psr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index 349671b00..521d4c708 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -497,16 +497,28 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
static bool psr_wait_entry_if_enabled(data_t *data)
{
+ if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
+ igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
+
return psr_wait_entry(data->debugfs_fd, data->op_psr_mode, data->output);
}
static bool psr_wait_update_if_enabled(data_t *data)
{
+ if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
+ igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
+
return psr_wait_update(data->debugfs_fd, data->op_psr_mode, data->output);
}
static bool psr_enable_if_enabled(data_t *data)
{
+ if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
+ igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
+
return psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode);
}
--
2.25.1
More information about the igt-dev
mailing list