drm/amd/display: Move OPP mpc tree initialization to hw_init
authorEric Bernstein <eric.bernstein@amd.com>
Fri, 24 Nov 2017 22:51:34 +0000 (17:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2017 15:57:50 +0000 (10:57 -0500)
Move OPP initialization of mpc tree parameters to hw_init function.

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h

index 7ec87fcb22bedb1eed4a166e696eea3a899f2176..f0be2b872668ab9830770f41780925f80577082e 100644 (file)
@@ -782,6 +782,8 @@ static void dcn10_init_hw(struct dc *dc)
                hubp->opp_id = 0xf;
                hubp->power_gated = false;
 
+               dc->res_pool->opps[i]->mpc_tree_params.opp_id = dc->res_pool->opps[i]->inst;
+               dc->res_pool->opps[i]->mpc_tree_params.opp_list = NULL;
                dc->res_pool->opps[i]->mpcc_disconnect_pending[i] = true;
                pipe_ctx->stream_res.opp = dc->res_pool->opps[i];
 
index 20d78cf46ab0144b7d6ef02c863845f8482fb7cd..5f078868676cd5a7f82dc82d2c912dbfb8825bcd 100644 (file)
@@ -330,18 +330,11 @@ void dcn10_opp_construct(struct dcn10_opp *oppn10,
        const struct dcn10_opp_shift *opp_shift,
        const struct dcn10_opp_mask *opp_mask)
 {
-       int i;
 
        oppn10->base.ctx = ctx;
        oppn10->base.inst = inst;
        oppn10->base.funcs = &dcn10_opp_funcs;
 
-       oppn10->base.mpc_tree_params.opp_id = inst;
-       oppn10->base.mpc_tree_params.opp_list = NULL;
-
-       for (i = 0; i < MAX_PIPES; i++)
-               oppn10->base.mpcc_disconnect_pending[i] = false;
-
        oppn10->regs = regs;
        oppn10->opp_shift = opp_shift;
        oppn10->opp_mask = opp_mask;
index 42f2bb29a5fc8e14128ad2469af58491226ee670..6da125de9507560550f0c3f108fce98acdfc1cdb 100644 (file)
@@ -300,6 +300,7 @@ struct opp_funcs {
                struct output_pixel_processor *opp,
                bool enable,
                bool polarity);
+
 };
 
 #endif