[igt-dev] [PATCH i-g-t] tests/kms_psr: Check for available modesetting support
Chris Wilson
chris at chris-wilson.co.uk
Sat Nov 7 11:15:44 UTC 2020
Check that there is a valid output/mode combo before trying to
dereference them.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2212
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
tests/kms_psr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index af81a259b..bb18e563a 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -411,8 +411,11 @@ static void setup_test_plane(data_t *data, int test_plane)
static void test_setup(data_t *data)
{
+ igt_require(data->mode);
+ igt_require(data->output);
if (data->op_psr_mode == PSR_MODE_2)
igt_require(data->supports_psr2);
+
psr_enable_if_enabled(data);
setup_test_plane(data, data->test_plane_id);
igt_assert(psr_wait_entry_if_enabled(data));
--
2.29.2
More information about the igt-dev
mailing list