Commit 44e149bb authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/display: clean up dcn2*_pp_smu functions

Use the dcn21 functions in dcn21_resource.c and make the
dcn20 functions static since they are only used in
dcn20_resource now.

Cc: bhawanpreet.lakha@amd.com
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bb3d7d32
...@@ -1156,6 +1156,8 @@ static const struct resource_create_funcs res_create_maximus_funcs = { ...@@ -1156,6 +1156,8 @@ static const struct resource_create_funcs res_create_maximus_funcs = {
.create_hwseq = dcn20_hwseq_create, .create_hwseq = dcn20_hwseq_create,
}; };
static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
void dcn20_clock_source_destroy(struct clock_source **clk_src) void dcn20_clock_source_destroy(struct clock_source **clk_src)
{ {
kfree(TO_DCE110_CLK_SRC(*clk_src)); kfree(TO_DCE110_CLK_SRC(*clk_src));
...@@ -2928,7 +2930,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool) ...@@ -2928,7 +2930,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
return true; return true;
} }
struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx) static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
{ {
struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL); struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL);
...@@ -2943,7 +2945,7 @@ struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx) ...@@ -2943,7 +2945,7 @@ struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
return pp_smu; return pp_smu;
} }
void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu) static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
{ {
if (pp_smu && *pp_smu) { if (pp_smu && *pp_smu) {
kfree(*pp_smu); kfree(*pp_smu);
......
...@@ -95,9 +95,6 @@ struct display_stream_compressor *dcn20_dsc_create( ...@@ -95,9 +95,6 @@ struct display_stream_compressor *dcn20_dsc_create(
struct dc_context *ctx, uint32_t inst); struct dc_context *ctx, uint32_t inst);
void dcn20_dsc_destroy(struct display_stream_compressor **dsc); void dcn20_dsc_destroy(struct display_stream_compressor **dsc);
struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx);
void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
struct hubp *dcn20_hubp_create( struct hubp *dcn20_hubp_create(
struct dc_context *ctx, struct dc_context *ctx,
uint32_t inst); uint32_t inst);
......
...@@ -636,6 +636,8 @@ static const struct dcn10_stream_encoder_mask se_mask = { ...@@ -636,6 +636,8 @@ static const struct dcn10_stream_encoder_mask se_mask = {
SE_COMMON_MASK_SH_LIST_DCN20(_MASK) SE_COMMON_MASK_SH_LIST_DCN20(_MASK)
}; };
static void dcn21_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
static struct input_pixel_processor *dcn21_ipp_create( static struct input_pixel_processor *dcn21_ipp_create(
struct dc_context *ctx, uint32_t inst) struct dc_context *ctx, uint32_t inst)
{ {
...@@ -939,7 +941,7 @@ static void destruct(struct dcn21_resource_pool *pool) ...@@ -939,7 +941,7 @@ static void destruct(struct dcn21_resource_pool *pool)
dcn_dccg_destroy(&pool->base.dccg); dcn_dccg_destroy(&pool->base.dccg);
if (pool->base.pp_smu != NULL) if (pool->base.pp_smu != NULL)
dcn20_pp_smu_destroy(&pool->base.pp_smu); dcn21_pp_smu_destroy(&pool->base.pp_smu);
} }
......
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