[PATCH i-g-t 3/3] tests/intel/kms_dirtyfb: Check features after rendering
Jouni Högander
jouni.hogander at intel.com
Mon Jul 1 05:13:01 UTC 2024
Check each feature after rendering and flush. Also add new check for
possible PSR errors.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
tests/intel/kms_dirtyfb.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
index 75047ec63..35df9be3b 100644
--- a/tests/intel/kms_dirtyfb.c
+++ b/tests/intel/kms_dirtyfb.c
@@ -145,7 +145,7 @@ static void enable_feature(data_t *data)
}
}
-static void check_feature(data_t *data)
+static void check_feature_enabled(data_t *data)
{
switch (data->feature) {
case FEATURE_NONE:
@@ -171,6 +171,33 @@ static void check_feature(data_t *data)
}
}
+static void check_feature(data_t *data)
+{
+ switch (data->feature) {
+ case FEATURE_NONE:
+ break;
+ case FEATURE_FBC:
+ igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+ data->pipe),
+ "FBC disabled\n");
+ /* TODO: Add compression check here */
+ break;
+ case FEATURE_PSR:
+ igt_assert_f(psr_wait_entry(data->debugfs_fd, PSR_MODE_1, data->output),
+ "No PSR entry\n");
+ psr_sink_error_check(data->debugfs_fd, PSR_MODE_1, data->output);
+ break;
+ case FEATURE_DRRS:
+ igt_assert_f(!intel_is_drrs_inactive(data->drm_fd, data->pipe),
+ "DRRS INACTIVE\n");
+ break;
+ case FEATURE_DEFAULT:
+ break;
+ default:
+ igt_assert(false);
+ }
+}
+
static void disable_features(data_t *data)
{
intel_fbc_disable(data->drm_fd);
@@ -232,7 +259,7 @@ static void prepare(data_t *data)
igt_display_commit2(&data->display, COMMIT_ATOMIC);
- check_feature(data);
+ check_feature_enabled(data);
}
static void cleanup(data_t *data)
@@ -298,6 +325,8 @@ static void run_test(data_t *data)
igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
igt_assert_crc_equal(&crc, &data->ref_crc);
+ check_feature(data);
+
igt_spin_free(data->drm_fd, spin);
intel_bb_destroy(ibb);
intel_buf_destroy(src);
--
2.34.1
More information about the igt-dev
mailing list