From: Tony Cheng <[email protected]> Add an inst member to struct dmub_replay and set it to 0 in dmub_replay_construct(), since the replay object is a pool singleton.
Also move the (void)panel_inst cast in dmub_replay_set_coasting_vtotal() below the local declarations, where it belongs. No functional change; the inst field has no readers yet. Reviewed-by: Jun Lei <[email protected]> Reviewed-by: Alex Hung <[email protected]> Signed-off-by: Tony Cheng <[email protected]> Signed-off-by: George Zhang <[email protected]> --- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c index 0785a30eb643..e6adca240ccf 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c @@ -217,13 +217,13 @@ static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub, uint8_t panel_inst, uint16_t frame_skip_number) { - (void)panel_inst; union dmub_rb_cmd cmd; struct dc_context *dc = dmub->ctx; struct dmub_rb_cmd_replay_set_coasting_vtotal *pCmd = NULL; pCmd = &(cmd.replay_set_coasting_vtotal); + (void)panel_inst; memset(&cmd, 0, sizeof(cmd)); pCmd->header.type = DMUB_CMD__REPLAY; pCmd->header.sub_type = DMUB_CMD__REPLAY_SET_COASTING_VTOTAL; @@ -458,6 +458,7 @@ static void dmub_replay_construct(struct dmub_replay *replay, struct dc_context { replay->ctx = ctx; replay->funcs = &replay_funcs; + replay->inst = 0; } /* diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h index 271a42a226e9..fa17cd395e5c 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h @@ -13,6 +13,7 @@ struct dmub_replay_funcs; struct dmub_replay { struct dc_context *ctx; const struct dmub_replay_funcs *funcs; + uint32_t inst; }; struct dmub_replay_funcs { -- 2.55.0
