Commit 043f5bb6 authored by Wesley Chalmers's avatar Wesley Chalmers Committed by Alex Deucher

drm/amd/display: Use macro for invalid OPP ID

[WHY]
This is meant to make it clearer that 0xf is not a valid OPP ID, and
that code making use of OPP IDs should not accept this value.
Signed-off-by: default avatarWesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c5509aad
...@@ -63,7 +63,7 @@ void hubp1_set_blank(struct hubp *hubp, bool blank) ...@@ -63,7 +63,7 @@ void hubp1_set_blank(struct hubp *hubp, bool blank)
} }
hubp->mpcc_id = 0xf; hubp->mpcc_id = 0xf;
hubp->opp_id = 0xf; hubp->opp_id = OPP_ID_INVALID;
} }
} }
...@@ -1253,7 +1253,7 @@ void dcn10_hubp_construct( ...@@ -1253,7 +1253,7 @@ void dcn10_hubp_construct(
hubp1->hubp_shift = hubp_shift; hubp1->hubp_shift = hubp_shift;
hubp1->hubp_mask = hubp_mask; hubp1->hubp_mask = hubp_mask;
hubp1->base.inst = inst; hubp1->base.inst = inst;
hubp1->base.opp_id = 0xf; hubp1->base.opp_id = OPP_ID_INVALID;
hubp1->base.mpcc_id = 0xf; hubp1->base.mpcc_id = 0xf;
} }
......
...@@ -1086,7 +1086,7 @@ static void dcn10_init_pipes(struct dc *dc, struct dc_state *context) ...@@ -1086,7 +1086,7 @@ static void dcn10_init_pipes(struct dc *dc, struct dc_state *context)
pipe_ctx->plane_res.dpp = dpp; pipe_ctx->plane_res.dpp = dpp;
pipe_ctx->plane_res.mpcc_inst = dpp->inst; pipe_ctx->plane_res.mpcc_inst = dpp->inst;
hubp->mpcc_id = dpp->inst; hubp->mpcc_id = dpp->inst;
hubp->opp_id = 0xf; hubp->opp_id = OPP_ID_INVALID;
hubp->power_gated = false; 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_id = dc->res_pool->opps[i]->inst;
...@@ -2437,7 +2437,7 @@ static void dcn10_apply_ctx_for_surface( ...@@ -2437,7 +2437,7 @@ static void dcn10_apply_ctx_for_surface(
if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) { if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) {
if (old_pipe_ctx->stream_res.tg == tg && if (old_pipe_ctx->stream_res.tg == tg &&
old_pipe_ctx->plane_res.hubp && old_pipe_ctx->plane_res.hubp &&
old_pipe_ctx->plane_res.hubp->opp_id != 0xf) old_pipe_ctx->plane_res.hubp->opp_id != OPP_ID_INVALID)
dcn10_disable_plane(dc, old_pipe_ctx); dcn10_disable_plane(dc, old_pipe_ctx);
} }
......
...@@ -694,7 +694,7 @@ bool hubp2_construct( ...@@ -694,7 +694,7 @@ bool hubp2_construct(
hubp2->hubp_shift = hubp_shift; hubp2->hubp_shift = hubp_shift;
hubp2->hubp_mask = hubp_mask; hubp2->hubp_mask = hubp_mask;
hubp2->base.inst = inst; hubp2->base.inst = inst;
hubp2->base.opp_id = 0xf; hubp2->base.opp_id = OPP_ID_INVALID;
hubp2->base.mpcc_id = 0xf; hubp2->base.mpcc_id = 0xf;
return true; return true;
......
...@@ -605,7 +605,7 @@ static void dcn20_init_hw(struct dc *dc) ...@@ -605,7 +605,7 @@ static void dcn20_init_hw(struct dc *dc)
pipe_ctx->plane_res.dpp = dpp; pipe_ctx->plane_res.dpp = dpp;
pipe_ctx->plane_res.mpcc_inst = dpp->inst; pipe_ctx->plane_res.mpcc_inst = dpp->inst;
hubp->mpcc_id = dpp->inst; hubp->mpcc_id = dpp->inst;
hubp->opp_id = 0xf; hubp->opp_id = OPP_ID_INVALID;
hubp->power_gated = false; hubp->power_gated = false;
pipe_ctx->stream_res.opp = NULL; pipe_ctx->stream_res.opp = NULL;
...@@ -1307,7 +1307,7 @@ static void dcn20_apply_ctx_for_surface( ...@@ -1307,7 +1307,7 @@ static void dcn20_apply_ctx_for_surface(
if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) { if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) {
if (old_pipe_ctx->stream_res.tg == tg && if (old_pipe_ctx->stream_res.tg == tg &&
old_pipe_ctx->plane_res.hubp && old_pipe_ctx->plane_res.hubp &&
old_pipe_ctx->plane_res.hubp->opp_id != 0xf) old_pipe_ctx->plane_res.hubp->opp_id != OPP_ID_INVALID)
dcn20_disable_plane(dc, old_pipe_ctx); dcn20_disable_plane(dc, old_pipe_ctx);
} }
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "mem_input.h" #include "mem_input.h"
#define OPP_ID_INVALID 0xf
enum cursor_pitch { enum cursor_pitch {
CURSOR_PITCH_64_PIXELS = 0, CURSOR_PITCH_64_PIXELS = 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment