drm/amd/display: make variables static
PATCH v2 1/3 drm/amd/display: make variables static
As "dcn3_1_soc", "dcn3_15_soc", and "dcn3_16_soc" are not used outside of their corresponding "dcn3*_fpu.c", make them static and remove their extern declaration.
---
Changes in v2:
- remove the extern declaration of "dcn3_15_soc" and "dcn3_16_soc" instead of just fixing their type (Melissa and André)
- apply this fix to "dcn3_1_soc" as well
- update the commit message accordingly
- add Fixes and Reviewed-by tags.
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h | 1 - drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 6 +++--- 4 files changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.h +0 -1
@@ -32,7 +32,6 @@ container_of(pool, struct dcn31_resource_pool, base)extern struct _vcs_dpi_ip_params_st dcn3_1_ip; -extern struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc;struct dcn31_resource_pool {struct resource_pool base;
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h +0 -1
@@ -32,7 +32,6 @@ container_of(pool, struct dcn315_resource_pool, base)extern struct _vcs_dpi_ip_params_st dcn3_15_ip; -extern struct _vcs_dpi_ip_params_st dcn3_15_soc;struct dcn315_resource_pool {struct resource_pool base;
drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h +0 -1
@@ -32,7 +32,6 @@ container_of(pool, struct dcn316_resource_pool, base)extern struct _vcs_dpi_ip_params_st dcn3_16_ip; -extern struct _vcs_dpi_ip_params_st dcn3_16_soc;struct dcn316_resource_pool {struct resource_pool base;
drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c +3 -3
@@ -114,7 +114,7 @@ struct _vcs_dpi_ip_params_st dcn3_1_ip = { .dcc_supported = true, }; -struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc = { +static struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc = {/*TODO: correct dispclk/dppclk voltage level determination*/ .clock_limits = { {
@@ -259,7 +259,7 @@ struct _vcs_dpi_ip_params_st dcn3_15_ip = { .dcc_supported = true, }; -struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc = { +static struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc = { .sr_exit_time_us =9.0 , .sr_enter_plus_exit_time_us =11.0 , .sr_exit_z8_time_us =50.0 ,
@@ -355,7 +355,7 @@ struct _vcs_dpi_ip_params_st dcn3_16_ip = { .dcc_supported = true, }; -struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc = { +static struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc = {/*TODO: correct dispclk/dppclk voltage level determination*/ .clock_limits = { {
Signature · 1 line
2.37.1
PATCH v2 2/3 drm/amd/display: remove header from source file
Since "rn_clk_mgr.h" needs ‘struct clk_mgr_internal’ which is declared in "clk_mgr_internal.h", include "clk_mgr_internal.h" in "rn_clk_mgr.h" instead of in its source file.
Because of the change above, change the order of '#include "rn_clk_mgr.h"', so that the necessary structs are visible to dcn20_clk_mgr.h.
---
Changes in v2:
- split commit (Melissa).
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 3 +-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +1 -2
@@ -24,10 +24,9 @@*/ #include "dccg.h" -#include "clk_mgr_internal.h" +#include "rn_clk_mgr.h" #include "dcn20/dcn20_clk_mgr.h" -#include "rn_clk_mgr.h" #include "dml/dcn20/dcn20_fpu.h" #include "dce100/dce_clk_mgr.h"
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h +1 -0
@@ -28,6 +28,7 @@#include "clk_mgr.h" #include "dm_pp_smu.h" +#include "clk_mgr_internal.h" extern struct wm_table ddr4_wm_table_gs;extern struct wm_table lpddr4_wm_table_gs;
Signature · 1 line
2.37.1
PATCH v2 3/3 drm/amd/display: include missing headers
In reply to Magali LemesAdd missing headers to solve the following warnings from sparse:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:656:17: warning: symbol 'ddr4_wm_table_gs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:693:17: warning: symbol 'lpddr4_wm_table_gs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:730:17: warning: symbol 'lpddr4_wm_table_with_disabled_ppt' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:767:17: warning: symbol 'ddr4_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:804:17: warning: symbol 'ddr4_1R_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:841:17: warning: symbol 'lpddr4_wm_table_rn' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn301/dcn301_fpu.c:217:17: warning: symbol 'ddr4_wm_table' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn301/dcn301_fpu.c:254:17: warning: symbol 'lpddr5_wm_table' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:53:30: warning: symbol 'dcn3_1_ip' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:197:30: warning: symbol 'dcn3_15_ip' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:293:30: warning: symbol 'dcn3_16_ip' was not declared. Should it be static?
---
Changes in v2:
- split commit (Melissa)
- update the commit message accordingly
- add Fixes and Reviewed-by tags.
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 3 +++ 3 files changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +1 -0
@@ -30,6 +30,7 @@#include "dchubbub.h" #include "dcn20/dcn20_resource.h" #include "dcn21/dcn21_resource.h" +#include "clk_mgr/dcn21/rn_clk_mgr.h" #include "dcn20_fpu.h"
drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c +1 -0
@@ -26,6 +26,7 @@#include "clk_mgr.h" #include "dcn20/dcn20_resource.h" #include "dcn301/dcn301_resource.h" +#include "clk_mgr/dcn301/vg_clk_mgr.h" #include "dml/dcn20/dcn20_fpu.h" #include "dcn301_fpu.h"
drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c +3 -0
@@ -25,6 +25,9 @@#include "resource.h" #include "clk_mgr.h" +#include "dcn31/dcn31_resource.h" +#include "dcn315/dcn315_resource.h" +#include "dcn316/dcn316_resource.h" #include "dml/dcn20/dcn20_fpu.h" #include "dcn31_fpu.h"
Signature · 1 line
2.37.1
Às 22:06 de 29/07/22, Magali Lemes escreveu:
Quoted 11 lines
As "
dcn3_1_soc", "dcn3_15_soc", and "dcn3_16_soc" are not used outside of their corresponding "dcn3*_fpu.c", make them static and remove their extern declaration.Fixes 26f4712aedbd ("drm/amd/display: move FPU related code from dcn31 to dml/dcn31 folder")Fixes fa896297b31b ("drm/amd/display: move FPU related code from dcn315 to dml/dcn31 folder")Fixes 3f8951cc123f ("drm/amd/display: move FPU related code from dcn316 to dml/dcn31 folder")Signed-off-by Magali Lemes <[email protected]>Reviewed-by Maíra Canal <[email protected]>Reviewed-by Melissa Wen <[email protected]>---
Series is Reviewed-by: André Almeida <[email protected]>
Quoted 15 lines · André Almeida
Às 22:06 de 29/07/22, Magali Lemes escreveu:
Quoted 11 lines
As "
dcn3_1_soc", "dcn3_15_soc", and "dcn3_16_soc" are not used outside of their corresponding "dcn3*_fpu.c", make them static and remove their extern declaration.Fixes 26f4712aedbd ("drm/amd/display: move FPU related code from dcn31 to dml/dcn31 folder")Fixes fa896297b31b ("drm/amd/display: move FPU related code from dcn315 to dml/dcn31 folder")Fixes 3f8951cc123f ("drm/amd/display: move FPU related code from dcn316 to dml/dcn31 folder")Signed-off-by Magali Lemes <[email protected]>Reviewed-by Maíra Canal <[email protected]>Reviewed-by Melissa Wen <[email protected]>---
Quoted 1 line
Series is Reviewed-by: André Almeida <[email protected]>
Series also
Applied to amd-staging-drm-next.
Thanks
Siqueira