]> www.infradead.org Git - nvme.git/commitdiff
drm/amd/display: Fix dmub timeout after fams2 enabled
authorFangzhi Zuo <jerry.zuo@amd.com>
Thu, 20 Jun 2024 15:27:39 +0000 (11:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2024 20:10:35 +0000 (16:10 -0400)
Reset fams stream count upon stream removal, otherwise
fams2 state machine in dmub will get corrupted.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@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/dml2/dml21/dml21_wrapper.c

index c310354cd5fc0cf96ad17dd9228c2e01f1f4e6ed..9edcacdde6b7ca74f2630762275a0d4f1ab69ed6 100644 (file)
@@ -197,8 +197,13 @@ static bool dml21_mode_check_and_programming(const struct dc *in_dc, struct dc_s
        memset(&dml_ctx->v21.dml_to_dc_pipe_mapping, 0, sizeof(struct dml2_dml_to_dc_pipe_mapping));
        memset(&dml_ctx->v21.mode_programming.dml2_instance->scratch.build_mode_programming_locals.mode_programming_params, 0, sizeof(struct dml2_core_mode_programming_in_out));
 
-       if (!context || context->stream_count == 0)
+       if (!context)
+               return true;
+
+       if (context->stream_count == 0) {
+               dml21_build_fams2_programming(in_dc, context, dml_ctx);
                return true;
+       }
 
        /* scrub phantom's from current dc_state */
        dml_ctx->config.svp_pstate.callbacks.remove_phantom_streams_and_planes(in_dc, context);