[igt-dev] [i-g-t] tests/kms_invalid_mode: Use primary plane to set the framebuffer
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Fri Oct 7 15:46:30 UTC 2022
Use primary plane to set the framebuffer.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_invalid_mode.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
index f1c38669..aa7f2b15 100644
--- a/tests/kms_invalid_mode.c
+++ b/tests/kms_invalid_mode.c
@@ -184,6 +184,7 @@ test_output(data_t *data)
struct igt_fb fb;
int ret;
drmModeModeInfo *mode;
+ igt_plane_t *primary;
igt_display_reset(&data->display);
igt_output_set_pipe(output, data->pipe);
@@ -192,6 +193,9 @@ test_output(data_t *data)
DRM_FORMAT_MOD_LINEAR,
&fb);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_plane_set_fb(primary, &fb);
+
for_each_connector_mode(output) {
mode = &output->config.connector->modes[j__];
igt_require(data->adjust_mode(data, mode));
@@ -200,9 +204,11 @@ test_output(data_t *data)
igt_assert(ret == -EINVAL);
}
+ /* Cleanup */
igt_remove_fb(data->drm_fd, &fb);
+ igt_plane_set_fb(primary, NULL);
igt_output_override_mode(output, NULL);
- /*unset_all_crtcs*/
+ igt_output_set_pipe(output, PIPE_NONE);
igt_display_commit(&data->display);
}
--
2.37.3
More information about the igt-dev
mailing list