]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amd/display: Use macro for invalid OPP ID
authorWesley Chalmers <Wesley.Chalmers@amd.com>
Thu, 23 May 2019 15:54:12 +0000 (11:54 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 17:49:50 +0000 (12:49 -0500)
[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: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h

index 54b219a710d8729c509a12ab0dad8a0037c424a1..aea2b63db137d8eeb4841b24ae27686e69ddb22e 100644 (file)
@@ -63,7 +63,7 @@ void hubp1_set_blank(struct hubp *hubp, bool blank)
                }
 
                hubp->mpcc_id = 0xf;
-               hubp->opp_id = 0xf;
+               hubp->opp_id = OPP_ID_INVALID;
        }
 }
 
@@ -1226,7 +1226,7 @@ void dcn10_hubp_construct(
        hubp1->hubp_shift = hubp_shift;
        hubp1->hubp_mask = hubp_mask;
        hubp1->base.inst = inst;
-       hubp1->base.opp_id = 0xf;
+       hubp1->base.opp_id = OPP_ID_INVALID;
        hubp1->base.mpcc_id = 0xf;
 }
 
index 821a280eb481e01785d9840a0998c76837db0860..d9edf7f84cfab3f52007ab195aea230066f86104 100644 (file)
@@ -1025,7 +1025,7 @@ static void dcn10_init_pipes(struct dc *dc, struct dc_state *context)
                pipe_ctx->plane_res.dpp = dpp;
                pipe_ctx->plane_res.mpcc_inst = dpp->inst;
                hubp->mpcc_id = dpp->inst;
-               hubp->opp_id = 0xf;
+               hubp->opp_id = OPP_ID_INVALID;
                hubp->power_gated = false;
 
                dc->res_pool->opps[i]->mpc_tree_params.opp_id = dc->res_pool->opps[i]->inst;
@@ -2371,7 +2371,7 @@ static void dcn10_apply_ctx_for_surface(
                if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) {
                        if (old_pipe_ctx->stream_res.tg == tg &&
                            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);
                }
 
index 455df4999797f21797426ea20e2a156ce57070a7..5420ad2da96fee07763b20442736b7867b686734 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "mem_input.h"
 
+#define OPP_ID_INVALID 0xf
+
 
 enum cursor_pitch {
        CURSOR_PITCH_64_PIXELS = 0,