[PATCH 2/2] drm/amd/display: include missing headers
Melissa Wen
mwen at igalia.com
Mon Jul 25 23:58:48 UTC 2022
On 07/25, Magali Lemes wrote:
> Add 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:117:37: warning: symbol 'dcn3_1_soc' 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:262:37: warning: symbol 'dcn3_15_soc' 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?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/dcn31_fpu.c:358:37: warning: symbol 'dcn3_16_soc' was not declared. Should it be static?
>
Hi Magali,
Nice catch! See some comments below:
> Signed-off-by: Magali Lemes <magalilemes00 at gmail.com>
> ---
> drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 1 +
> 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 +++
> 4 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h
> index 2e088c5171b2..f1319957e400 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h
> @@ -28,6 +28,7 @@
>
> #include "clk_mgr.h"
> #include "dm_pp_smu.h"
> +#include "clk_mgr_internal.h"
I see that this fix (right above) comes from another warning not listed
in the commit message. Can you explicit it there or split it in
another commit if possible?
Also, clk_mgr/dcn21/rn_clk_mgr.c includes clk_mgr_internal.h and
rn_clk_mgr.h; I wonder if a cleaner solution is to remove the
`#include clk_mgr_internal.h` from rn_clk_mgr.c too.
The remaining changes seems correct to me.
Thanks,
Melissa
>
> extern struct wm_table ddr4_wm_table_gs;
> extern struct wm_table lpddr4_wm_table_gs;
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
> index eeeae52fe6fc..45e9f4663abe 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
> @@ -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"
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c
> index 7ef66e511ec8..d211cf6d234c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c
> @@ -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"
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c
> index e36cfa5985ea..2d11a2c13345 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c
> @@ -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"
> --
> 2.37.1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220725/65d5e009/attachment.sig>
More information about the amd-gfx
mailing list