Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+7 -6
+4 -2
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
··· 1156 1156 .create_hwseq = dcn20_hwseq_create, 1157 1157 }; 1158 1158 1159 + static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu); 1160 + 1159 1161 void dcn20_clock_source_destroy(struct clock_source **clk_src) 1160 1162 { 1161 1163 kfree(TO_DCE110_CLK_SRC(*clk_src)); ··· 2930 2928 return true; 2931 2929 } 2932 2930 2933 - struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx) 2931 + static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx) 2934 2932 { 2935 2933 struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL); 2936 2934 ··· 2945 2943 return pp_smu; 2946 2944 } 2947 2945 2948 - void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu) 2946 + static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu) 2949 2947 { 2950 2948 if (pp_smu && *pp_smu) { 2951 2949 kfree(*pp_smu);
-3
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
··· 95 95 struct dc_context *ctx, uint32_t inst); 96 96 void dcn20_dsc_destroy(struct display_stream_compressor **dsc); 97 97 98 - struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx); 99 - void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu); 100 - 101 98 struct hubp *dcn20_hubp_create( 102 99 struct dc_context *ctx, 103 100 uint32_t inst);
+3 -1
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
··· 636 636 SE_COMMON_MASK_SH_LIST_DCN20(_MASK) 637 637 }; 638 638 639 + static void dcn21_pp_smu_destroy(struct pp_smu_funcs **pp_smu); 640 + 639 641 static struct input_pixel_processor *dcn21_ipp_create( 640 642 struct dc_context *ctx, uint32_t inst) 641 643 { ··· 941 939 dcn_dccg_destroy(&pool->base.dccg); 942 940 943 941 if (pool->base.pp_smu != NULL) 944 - dcn20_pp_smu_destroy(&pool->base.pp_smu); 942 + dcn21_pp_smu_destroy(&pool->base.pp_smu); 945 943 } 946 944 947 945