[PATCH 2/5] drm/amd/display: hook up program_tg for dcn401

Melissa Wen mwen at igalia.com
Wed Apr 30 14:20:08 UTC 2025


In this version, the global sync programming differs and needs an
specific function call slightly different from the commonly used
dcn20_program_tg. Hook up dcn401_program_tg only for dcn401.

Signed-off-by: Melissa Wen <mwen at igalia.com>
---
 .../gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c    | 9 ++++-----
 .../gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h    | 4 ++++
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index c8c8a17ff183..06190c73c22c 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -2191,11 +2191,10 @@ static unsigned int dcn401_calculate_vready_offset_for_group(struct pipe_ctx *pi
 	return vready_offset;
 }
 
-static void dcn401_program_tg(
-	struct dc *dc,
-	struct pipe_ctx *pipe_ctx,
-	struct dc_state *context,
-	struct dce_hwseq *hws)
+void dcn401_program_tg(struct dc *dc,
+		       struct pipe_ctx *pipe_ctx,
+		       struct dc_state *context,
+		       struct dce_hwseq *hws)
 {
 	pipe_ctx->stream_res.tg->funcs->program_global_sync(
 		pipe_ctx->stream_res.tg,
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h
index ce65b4f6c672..26c350efb1c2 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h
@@ -93,6 +93,10 @@ void dcn401_reset_back_end_for_pipe(
 void dcn401_reset_hw_ctx_wrap(
 		struct dc *dc,
 		struct dc_state *context);
+void dcn401_program_tg(struct dc *dc,
+		       struct pipe_ctx *pipe_ctx,
+		       struct dc_state *context,
+		       struct dce_hwseq *hws);
 void dcn401_program_pipe(
 	struct dc *dc,
 	struct pipe_ctx *pipe_ctx,
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c
index fe7aceb2f510..65c551895ac9 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c
@@ -101,6 +101,7 @@ static const struct hw_sequencer_funcs dcn401_funcs = {
 	.program_outstanding_updates = dcn401_program_outstanding_updates,
 	.wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates,
 	.detect_pipe_changes = dcn401_detect_pipe_changes,
+	.program_tg = dcn401_program_tg,
 	.enable_plane = dcn20_enable_plane,
 	.update_dchubp_dpp = dcn20_update_dchubp_dpp,
 	.post_unlock_reset_opp = dcn20_post_unlock_reset_opp,
-- 
2.47.2



More information about the dri-devel mailing list