Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [i-g-t, v2 1/2] tests/amdgpu/amd_dp_dsc: Do not disable DSC for high bw panels
@ 2026-09-03 19:24 George Zhang
  2026-09-03 19:24 ` [i-g-t, v2 2/2] tests/amdgpu/amd_dp_dsc: Reset link settings after subtest George Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: George Zhang @ 2026-09-03 19:24 UTC (permalink / raw)
  To: igt-dev; +Cc: Fangzhi Zuo, Ivan Lipski, Alex Hung, Harry Wentland, George Zhang

The test previously attempted to disable DSC even on high bandwidth
panels. This would erroneously fail the dsc_enable test even though DSC
is on.

Fix this by checking what mode the panel defaults to when set to
automatic. If DSC is on, then do not attempt to force it off later.

Signed-off-by: George Zhang <george.zhang@amd.com>
---
 tests/amdgpu/amd_dp_dsc.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/tests/amdgpu/amd_dp_dsc.c b/tests/amdgpu/amd_dp_dsc.c
index dc71e903e..690a6c39d 100644
--- a/tests/amdgpu/amd_dp_dsc.c
+++ b/tests/amdgpu/amd_dp_dsc.c
@@ -137,6 +137,9 @@ static void test_dsc_enable(data_t *data)
 		igt_output_set_crtc(output,
 				    crtc);
 		igt_plane_set_fb(data->primary[crtc->crtc_index], &ref_fb);
+
+		/* Make sure we are in automatic mode before we start */
+		igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_AUTOMATIC);
 		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
 
 		test_conn_cnt++;
@@ -153,8 +156,12 @@ static void test_dsc_enable(data_t *data)
 		/* Check if DSC is enabled */
 		dsc_on = igt_amd_read_dsc_clock_status(data->fd, output->name) == 1;
 
-		/* Revert DSC to automatic state */
-		igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_FORCE_OFF);
+		/**
+		 * We can only force off if the panel is capable of running with DSC disabled.
+		 * If DSC was ON in automatic mode, we cannot (and should not) force it OFF.
+		 */
+		if (!dsc_before)
+			igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_FORCE_OFF);
 
 		igt_plane_set_fb(data->primary[crtc->crtc_index], &ref_fb);
 		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
@@ -286,6 +293,7 @@ static void test_dsc_slice_dimensions_change(data_t *data)
 		igt_output_set_crtc(output,
 				    crtc);
 		igt_plane_set_fb(data->primary[crtc->crtc_index], &ref_fb);
+		igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_AUTOMATIC);
 		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
 
 		test_conn_cnt++;
@@ -316,8 +324,12 @@ static void test_dsc_slice_dimensions_change(data_t *data)
 							     ref_fb);
 		}
 
-		/* Force disable DSC */
-		igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_FORCE_OFF);
+		/**
+		 * We can only force off if the panel is capable of running with DSC disabled.
+		 * If DSC was ON in automatic mode, we cannot (and should not) force it OFF.
+		 */
+		if (!dsc_before)
+			igt_amd_write_dsc_clock_en(data->fd, output->name, DSC_FORCE_OFF);
 
 		igt_plane_set_fb(data->primary[crtc->crtc_index], &ref_fb);
 		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
-- 
2.55.0


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

end of thread, other threads:[~2026-09-04 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 19:24 [i-g-t, v2 1/2] tests/amdgpu/amd_dp_dsc: Do not disable DSC for high bw panels George Zhang
2026-09-03 19:24 ` [i-g-t, v2 2/2] tests/amdgpu/amd_dp_dsc: Reset link settings after subtest George Zhang
2026-09-03 20:51   ` Alex Hung
2026-09-03 20:50 ` [i-g-t,v2 1/2] tests/amdgpu/amd_dp_dsc: Do not disable DSC for high bw panels Alex Hung
2026-09-03 22:12 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,v2,1/2] " Patchwork
2026-09-03 22:22 ` ✓ i915.CI.BAT: " Patchwork
2026-09-04 10:49 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-04 14:10 ` ✓ i915.CI.Full: " Patchwork

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