[igt-dev] [PATCH i-g-t 4/4] tests/kms_plane_multiple: Disable CRTC if no planes

Anson Jacob Anson.Jacob at amd.com
Fri Jun 18 14:28:55 UTC 2021


From: Victor Lu <victorchengchi.lu at amd.com>

[why]
amdgpu will reject commits where the CRTC is enabled and there are no
active planes.

[how]
Disable the CRTC when committing with no active planes.

Signed-off-by: Victor Lu <victorchengchi.lu at amd.com>
Acked-by: Anson Jacob <Anson.Jacob at amd.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
Cc: Harry Wentland <harry.wentland at amd.com>
Cc: Mark Yacoub <markyacoub at google.com>
---
 tests/kms_plane_multiple.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 4424b864b2d6..805c2a2130d7 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -315,6 +315,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 		for_each_plane_on_pipe(&data->display, pipe, plane)
 			igt_plane_set_fb(plane, NULL);
 
+		/* Disable CRTC if no active planes */
+		igt_output_set_pipe(output, PIPE_NONE);
 		igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 		for (int x = 0; x < c; x++)
@@ -344,6 +346,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 		for_each_plane_on_pipe(&data->display, pipe, plane)
 			igt_plane_set_fb(plane, NULL);
 
+		/* Disable CRTC if no active planes */
+		igt_output_set_pipe(output, PIPE_NONE);
 		igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 		for (int x = 0; x < c; x++)
-- 
2.25.1



More information about the igt-dev mailing list