[PATCH i-g-t] tests/intel/kms_ccs: add suspend tests
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed Oct 30 16:06:18 UTC 2024
Add testing for suspend/resume while compressed framebuffer is on screen.
Test use only XR24 and P016 formats for testing.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
tests/intel/kms_ccs.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index a5d3ff5e6..c785244f4 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -96,6 +96,7 @@
* arg[1]:
*
* @crc-primary-basic: Primary plane CRC compatibility
+ * @crc-primary-suspend: Primary plane CRC after suspend
* @crc-sprite-planes-basic: Sprite plane CRC compatability
* @random-ccs-data: Random CCS data
*
@@ -159,6 +160,7 @@ enum test_flags {
TEST_BAD_AUX_STRIDE = 1 << 7,
TEST_RANDOM = 1 << 8,
TEST_ALL_PLANES = 1 << 9,
+ TEST_SUSPEND = 1 << 10,
};
#define TEST_BAD_CCS_PLANE (TEST_NO_AUX_BUFFER | TEST_BAD_CCS_HANDLE | \
@@ -252,6 +254,7 @@ static const struct {
{TEST_BAD_CCS_HANDLE, "ccs-on-another-bo", "Test CCS with different BO with given modifier"},
{TEST_BAD_AUX_STRIDE, "bad-aux-stride", "Test with bad AUX stride with given CCS modifier"},
{TEST_CRC | TEST_ALL_PLANES, "crc-sprite-planes-basic", "Test sprite plane CRC compatibility with given CCS modifier"},
+ {TEST_CRC | TEST_SUSPEND, "crc-primary-suspend", "Test primary plane CRC with suspend on XR24 and P016 formats"},
};
/*
@@ -817,8 +820,13 @@ static bool try_config(data_t *data, enum test_fb_flags fb_flags,
ret = igt_display_try_commit2(display, data->commit);
- if (ret == 0 && !(fb_flags & TEST_BAD_ROTATION_90) && crc)
+ if (ret == 0 && !(fb_flags & TEST_BAD_ROTATION_90) && crc) {
+ if (data->flags & TEST_SUSPEND && fb_flags & FB_COMPRESSED)
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
igt_pipe_crc_collect_crc(data->pipe_crc, crc);
+ }
igt_debug_wait_for_keypress("ccs");
@@ -846,6 +854,11 @@ static int test_ccs(data_t *data)
igt_crc_t crc, ref_crc;
enum test_fb_flags fb_flags = 0;
+ if (data->flags & TEST_SUSPEND &&
+ !(data->format == DRM_FORMAT_XRGB8888 ||
+ data->format == DRM_FORMAT_P016))
+ return 0;
+
igt_info("Testing format " IGT_FORMAT_FMT " / modifier " IGT_MODIFIER_FMT "\n",
IGT_FORMAT_ARGS(data->format), IGT_MODIFIER_ARGS(data->ccs_modifier));
--
2.45.2
More information about the igt-dev
mailing list