]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Fix 'failed to blank crtc!'
authorWen Chen <Wen.Chen3@amd.com>
Mon, 2 Jun 2025 20:37:08 +0000 (16:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jun 2025 13:55:49 +0000 (09:55 -0400)
[why]
DCN35 is having “DC: failed to blank crtc!” when running HPO
test cases. It's caused by not having sufficient udelay time.

[how]
Replace the old wait_for_blank_complete function with fsleep function to
sleep just until the next frame should come up. This way it doesn't poll
in case the pixel clock or other clock was bugged or until vactive and
the vblank are hit again.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Wen Chen <Wen.Chen3@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c

index 6a00f0984ce183cc618b3e18dac85f8b8635f7bc..7f9b6c4bf889ee9e25aa53aa4fce40e0ba36c640 100644 (file)
@@ -956,7 +956,7 @@ enum dc_status dcn20_enable_stream_timing(
                return DC_ERROR_UNEXPECTED;
        }
 
-       hws->funcs.wait_for_blank_complete(pipe_ctx->stream_res.opp);
+       fsleep(stream->timing.v_total * (stream->timing.h_total * 10000u / stream->timing.pix_clk_100hz));
 
        params.vertical_total_min = stream->adjust.v_total_min;
        params.vertical_total_max = stream->adjust.v_total_max;