From: Ovidiu Bunea <[email protected]>

[Why & How]
Currently, init_pipes() is the only interface responsible for
initializing the OPP->MPCC resource for all pipes. However, during
seamless boot transitions, init_pipes() is skipped and we transition
directly to an ODM2:1 config where we end up programming the default SW
struct state of mpc_tree_params, which is 0. This results in a config
where both HUBP0 & HUBP1 are being fed into the same OPP inst, 0 in this
case.

This is purely a case of programming incorrect SW state initialization
values into HW, so fix this by initializing mpc_tree_params with the
correct instances during resource construct.

Reviewed-by: Michael Strauss <[email protected]>
Signed-off-by: Ovidiu Bunea <[email protected]>
Signed-off-by: Ray Wu <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c 
b/drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
index 881b8da656b2..8486175a3b56 100644
--- a/drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
+++ b/drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
@@ -455,6 +455,8 @@ void dcn20_opp_construct(struct dcn20_opp *oppn20,
        oppn20->base.ctx = ctx;
        oppn20->base.inst = inst;
        oppn20->base.funcs = &dcn20_opp_funcs;
+       oppn20->base.mpc_tree_params.opp_id = inst;
+       oppn20->base.mpc_tree_params.opp_list = NULL;
 
        oppn20->regs = regs;
        oppn20->opp_shift = opp_shift;
-- 
2.43.0

Reply via email to