2023-06-09 08:31:04

by Lee Jones

[permalink] [raw]
Subject: [RESEND 00/15] Rid W=1 warnings from GPU

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (15):
drm/xlnx/zynqmp_disp: Use correct kerneldoc formatting in zynqmp_disp
drm/xlnx/zynqmp_dp: Fix function name zynqmp_dp_link_train() ->
zynqmp_dp_train()
drm/vkms/vkms_composer: Fix a few different kerneldoc formatting
drm/mediatek/mtk_disp_aal: Remove half completed incorrect struct
header
drm/mediatek/mtk_disp_ccorr: Remove half completed incorrect struct
header
drm/nouveau/nvkm/subdev/acr/lsfw: Remove unused variable 'loc'
drm/nouveau/nvkm/subdev/bios/init: Demote a bunch of kernel-doc abuses
drm/nouveau/nvkm/subdev/volt/gk20a: Demote kerneldoc abuses
drm/nouveau/nvkm/engine/gr/gf100: Demote kerneldoc abuse
drm/nouveau/nvkm/engine/gr/tu102: Staticify local function
gf100_fifo_nonstall_block()
drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move SYNAPTICS_DEVICE_ID
into CONFIG_DRM_AMD_DC_DCN ifdef
drm/nouveau/dispnv04/crtc: Demote kerneldoc abuses
drm/nouveau/nvkm/engine/gr/tu102: Completely remove unused function
‘tu102_gr_load’
drm/radeon/radeon_ttm: Remove unused variable 'rbo' from
radeon_bo_move()
drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function
headers

drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 +-
.../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +-
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 5 -
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 5 -
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +-
.../gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
.../gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 13 --
.../gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 +-
.../gpu/drm/nouveau/nvkm/subdev/bios/init.c | 136 +++++++++---------
.../gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c | 4 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 -
drivers/gpu/drm/vkms/vkms_composer.c | 6 +-
drivers/gpu/drm/xlnx/zynqmp_disp.c | 6 +-
drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
14 files changed, 89 insertions(+), 113 deletions(-)

Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Chun-Kuang Hu <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: Gourav Samaiya <[email protected]>
Cc: Haneen Mohammed <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Hyun Kwon <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Leo Li <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Lyude Paul <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Melissa Wen <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: [email protected]
Cc: "Pan, Xinhui" <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Stanley Yang <[email protected]>
Cc: Sumit Semwal <[email protected]>

--
2.41.0.162.gfafddb0af9-goog



2023-06-09 08:32:24

by Lee Jones

[permalink] [raw]
Subject: [RESEND 09/15] drm/nouveau/nvkm/engine/gr/gf100: Demote kerneldoc abuse

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1044: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Ben Skeggs <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
index 5f20079c3660f..7d4c2264d3c05 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -1040,7 +1040,7 @@ gf100_gr_zbc_init(struct gf100_gr *gr)
}
}

-/**
+/*
* Wait until GR goes idle. GR is considered idle if it is disabled by the
* MC (0x200) register, or GR is not busy and a context switch is not in
* progress.
--
2.41.0.162.gfafddb0af9-goog


2023-06-09 08:43:06

by Lee Jones

[permalink] [raw]
Subject: [RESEND 14/15] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_bo_move’:
drivers/gpu/drm/radeon/radeon_ttm.c:201:27: warning: variable ‘rbo’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "Pan, Xinhui" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 4eb83ccc4906a..de4e6d78f1e12 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -197,7 +197,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
{
struct ttm_resource *old_mem = bo->resource;
struct radeon_device *rdev;
- struct radeon_bo *rbo;
int r;

if (new_mem->mem_type == TTM_PL_TT) {
@@ -210,7 +209,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
if (r)
return r;

- rbo = container_of(bo, struct radeon_bo, tbo);
rdev = radeon_get_rdev(bo->bdev);
if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
bo->ttm == NULL)) {
--
2.41.0.162.gfafddb0af9-goog


2023-06-09 08:44:16

by Lee Jones

[permalink] [raw]
Subject: [RESEND 13/15] drm/nouveau/nvkm/engine/gr/tu102: Comp letely remove unused function ‘tu102_gr_load’

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c:210:1: warning: ‘tu102_gr_load’ defined but not used [-Wunused-function]

Cc: Ben Skeggs <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
index 10a7e59482a6f..a7775aa185415 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
@@ -206,19 +206,6 @@ tu102_gr_av_to_init_veid(struct nvkm_blob *blob, struct gf100_gr_pack **ppack)
return gk20a_gr_av_to_init_(blob, 64, 0x00100000, ppack);
}

-static int
-tu102_gr_load(struct gf100_gr *gr, int ver, const struct gf100_gr_fwif *fwif)
-{
- int ret;
-
- ret = gm200_gr_load(gr, ver, fwif);
- if (ret)
- return ret;
-
- return gk20a_gr_load_net(gr, "gr/", "sw_veid_bundle_init", ver, tu102_gr_av_to_init_veid,
- &gr->bundle_veid);
-}
-
static const struct gf100_gr_fwif
tu102_gr_fwif[] = {
{ 0, gm200_gr_load, &tu102_gr, &gp108_gr_fecs_acr, &gp108_gr_gpccs_acr },
--
2.41.0.162.gfafddb0af9-goog


2023-06-09 08:45:41

by Lee Jones

[permalink] [raw]
Subject: [RESEND 05/15] drm/mediatek/mtk_disp_ccorr: Remove half completed incorrect struct header

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'clk' not described in 'mtk_disp_ccorr'
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'regs' not described in 'mtk_disp_ccorr'
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_ccorr'
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'data' not described in 'mtk_disp_ccorr'

Cc: Chun-Kuang Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
index 1773379b24398..720f3c7ef7b4f 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
@@ -34,11 +34,6 @@ struct mtk_disp_ccorr_data {
u32 matrix_bits;
};

-/**
- * struct mtk_disp_ccorr - DISP_CCORR driver structure
- * @ddp_comp - structure containing type enum and hardware resources
- * @crtc - associated crtc to report irq events to
- */
struct mtk_disp_ccorr {
struct clk *clk;
void __iomem *regs;
--
2.41.0.162.gfafddb0af9-goog


Subject: Re: [RESEND 05/15] drm/mediatek/mtk_disp_ccorr: Remove half completed incorrect struct header

Il 09/06/23 10:17, Lee Jones ha scritto:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'clk' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'regs' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'data' not described in 'mtk_disp_ccorr'
>
> Cc: Chun-Kuang Hu <[email protected]>
> Cc: Philipp Zabel <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Matthias Brugger <[email protected]>
> Cc: AngeloGioacchino Del Regno <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>



2023-06-09 12:18:07

by Karol Herbst

[permalink] [raw]
Subject: Re: [RESEND 09/15] drm/nouveau/nvkm/engine/gr/gf100: Demote kerneldoc abuse

On Fri, Jun 9, 2023 at 10:18 AM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1044: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>
> Cc: Ben Skeggs <[email protected]>
> Cc: Karol Herbst <[email protected]>
> Cc: Lyude Paul <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Reviewed-by: Karol Herbst <[email protected]>

> ---
> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
> index 5f20079c3660f..7d4c2264d3c05 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
> @@ -1040,7 +1040,7 @@ gf100_gr_zbc_init(struct gf100_gr *gr)
> }
> }
>
> -/**
> +/*
> * Wait until GR goes idle. GR is considered idle if it is disabled by the
> * MC (0x200) register, or GR is not busy and a context switch is not in
> * progress.
> --
> 2.41.0.162.gfafddb0af9-goog
>


2023-06-09 14:56:52

by Matthias Brugger

[permalink] [raw]
Subject: Re: [RESEND 05/15] drm/mediatek/mtk_disp_ccorr: Remove half completed incorrect struct header



On 09/06/2023 10:17, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'clk' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'regs' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_ccorr'
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'data' not described in 'mtk_disp_ccorr'
>
> Cc: Chun-Kuang Hu <[email protected]>
> Cc: Philipp Zabel <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Matthias Brugger <[email protected]>
> Cc: AngeloGioacchino Del Regno <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> index 1773379b24398..720f3c7ef7b4f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> @@ -34,11 +34,6 @@ struct mtk_disp_ccorr_data {
> u32 matrix_bits;
> };
>
> -/**
> - * struct mtk_disp_ccorr - DISP_CCORR driver structure
> - * @ddp_comp - structure containing type enum and hardware resources
> - * @crtc - associated crtc to report irq events to
> - */

That surely suppress the warning but I think the correct to do here is to fix
the documentation instead of deleting it.

Regards,
Matthias

> struct mtk_disp_ccorr {
> struct clk *clk;
> void __iomem *regs;

2023-06-09 19:34:24

by Alex Deucher

[permalink] [raw]
Subject: Re: [RESEND 14/15] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()

This patch is no longer applicable.

Alex

On Fri, Jun 9, 2023 at 4:18 AM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_bo_move’:
> drivers/gpu/drm/radeon/radeon_ttm.c:201:27: warning: variable ‘rbo’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: "Pan, Xinhui" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Jerome Glisse <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 4eb83ccc4906a..de4e6d78f1e12 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -197,7 +197,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
> {
> struct ttm_resource *old_mem = bo->resource;
> struct radeon_device *rdev;
> - struct radeon_bo *rbo;
> int r;
>
> if (new_mem->mem_type == TTM_PL_TT) {
> @@ -210,7 +209,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
> if (r)
> return r;
>
> - rbo = container_of(bo, struct radeon_bo, tbo);
> rdev = radeon_get_rdev(bo->bdev);
> if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
> bo->ttm == NULL)) {
> --
> 2.41.0.162.gfafddb0af9-goog
>

2023-06-12 11:51:52

by Lee Jones

[permalink] [raw]
Subject: Re: [RESEND 05/15] drm/mediatek/mtk_disp_ccorr: Remove half completed incorrect struct header

On Fri, 09 Jun 2023, Matthias Brugger wrote:

>
>
> On 09/06/2023 10:17, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'clk' not described in 'mtk_disp_ccorr'
> > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'regs' not described in 'mtk_disp_ccorr'
> > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_ccorr'
> > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:47: warning: Function parameter or member 'data' not described in 'mtk_disp_ccorr'
> >
> > Cc: Chun-Kuang Hu <[email protected]>
> > Cc: Philipp Zabel <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Matthias Brugger <[email protected]>
> > Cc: AngeloGioacchino Del Regno <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> > index 1773379b24398..720f3c7ef7b4f 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> > @@ -34,11 +34,6 @@ struct mtk_disp_ccorr_data {
> > u32 matrix_bits;
> > };
> > -/**
> > - * struct mtk_disp_ccorr - DISP_CCORR driver structure
> > - * @ddp_comp - structure containing type enum and hardware resources
> > - * @crtc - associated crtc to report irq events to
> > - */
>
> That surely suppress the warning but I think the correct to do here is to
> fix the documentation instead of deleting it.

If someone wants to take responsibility for it and author correct
documentation, I'm all for it. That is the perfect resolution. If
that's not going to happen immediately, I suggest we remove it in the
first instance.

--
Lee Jones [李琼斯]