Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_dp_dsc: Bug fix for DP on Pipe A
@ 2021-05-13  9:07 Karthik B S
  2021-05-13 10:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Karthik B S @ 2021-05-13  9:07 UTC (permalink / raw)
  To: igt-dev

DSC is not supported on Pipe A for external DP on Gen11 platforms.
But as this check is within update_display(), we still call test_cleanup().
This bug is seen here as the pipe wasn't set properly for this output.

To fix this, moving the check outside update_display() so that we do not
call test_cleanup if we didn't even run the test.

Also, moved the fb creation and removal outside the loop for_each_pipe(),
since it seems redundant within the loop.

Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/3466

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_dp_dsc.c | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index 60ed3855..2446fd82 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -168,7 +168,6 @@ static void test_cleanup(data_t *data)
 						    DRM_PLANE_TYPE_PRIMARY);
 		igt_plane_set_fb(primary, NULL);
 		igt_display_commit(&data->display);
-		igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
 	}
 }
 
@@ -185,15 +184,8 @@ static void kms_dp_dsc_exit_handler(int sig)
 static void update_display(data_t *data, enum dsc_test_type test_type)
 {
 	igt_plane_t *primary;
-	data->mode = igt_output_get_mode(data->output);
 	data->connector = data->output->config.connector;
 
-	if (data->connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
-	    data->pipe == PIPE_A) {
-		igt_debug("DSC not supported on Pipe A on external DP\n");
-		return;
-	}
-
 	/* Disable the output first */
 	igt_output_set_pipe(data->output, PIPE_NONE);
 	igt_display_commit(&data->display);
@@ -206,11 +198,6 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		force_dp_dsc_enable(data);
 
 		igt_output_set_pipe(data->output, data->pipe);
-		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
-				      data->mode->vdisplay,
-				      DRM_FORMAT_XRGB8888,
-				      LOCAL_DRM_FORMAT_MOD_NONE,
-				      &data->fb_test_pattern);
 		primary = igt_output_get_plane_type(data->output,
 						    DRM_PLANE_TYPE_PRIMARY);
 
@@ -241,7 +228,23 @@ static void run_test(data_t *data, igt_output_t *output,
 {
 	enum pipe pipe;
 
+	data->mode = igt_output_get_mode(data->output);
+	igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
+			      data->mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
 	for_each_pipe(&data->display, pipe) {
+		if (is_i915_device(data->drm_fd)) {
+			uint32_t devid = intel_get_drm_devid(data->drm_fd);
+
+			if (data->connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
+			    data->pipe == PIPE_A && IS_GEN11(devid)) {
+				igt_debug("DSC not supported on Pipe A on external DP in Gen11 platforms\n");
+				continue;
+			}
+		}
 
 		if (igt_pipe_connector_valid(pipe, output)) {
 			data->pipe = pipe;
@@ -250,6 +253,8 @@ static void run_test(data_t *data, igt_output_t *output,
 			test_cleanup(data);
 		}
 	}
+
+	igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
 }
 
 igt_main
-- 
2.22.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-17 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-13  9:07 [igt-dev] [PATCH i-g-t] tests/kms_dp_dsc: Bug fix for DP on Pipe A Karthik B S
2021-05-13 10:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-13 14:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-17  4:22   ` Karthik B S
2021-05-17 15:22     ` Vudum, Lakshminarayana
2021-05-13 19:05 ` [igt-dev] [PATCH i-g-t] " Navare, Manasi
2021-05-17  5:49 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2021-05-17 15:14 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox