Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Lee Jones
On Thu, 24 Aug 2023, Hamza Mahfooz wrote:

> 
> On 8/24/23 08:07, Lee Jones wrote:
> > On Thu, 24 Aug 2023, Jani Nikula wrote:
> > 
> > > On Thu, 24 Aug 2023, Lee Jones  wrote:
> > > > 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.
> > > 
> > > The next question is, how do we keep it W=1 clean going forward?
> > 
> > My plan was to fix them all, then move each warning to W=0.
> > 
> > Arnd recently submitted a set doing just that for a bunch of them.
> > 
> > https://lore.kernel.org/all/20230811140327.3754597-1-a...@kernel.org/
> > 
> > I like to think a bunch of this is built on top of my previous efforts.
> > 
> > GPU is a particularly tricky though - the warnings seem to come in faster
> > than I can squash them.  Maybe the maintainers can find a way to test
> > new patches on merge?
> 
> I guess on that note, do you know if there is a way to run
> `scripts/kernel-doc` on patches instead of whole files? That would make
> much easier to block new kernel-doc issues from appearing.

Not off hand.

When I run builds on patches I author, I run them twice concurrently.
Once on the commit I'm basing on and once on the HEAD of my patchset.  I
then diff the two.  So as long as the number of errors and warnings stay
the same or reduce, we're golden.

Perhaps the same method could be used with `kernel-doc`?

-- 
Lee Jones [李琼斯]


Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Lee Jones
On Thu, 24 Aug 2023, Maxime Ripard wrote:

> Hi,
> 
> On Thu, Aug 24, 2023 at 10:59:54AM +0200, Maxime Ripard wrote:
> > On Thu, 24 Aug 2023 08:36:45 +0100, Lee Jones wrote:
> > > 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.
> > > 
> > > Cc: Alex Deucher 
> > > Cc: amd-gfx@lists.freedesktop.org
> > > Cc: Ben Skeggs 
> > > Cc: "Christian König" 
> > > Cc: Daniel Vetter 
> > > Cc: Danilo Krummrich 
> > > Cc: David Airlie 
> > > Cc: dri-de...@lists.freedesktop.org
> > > Cc: Fabio Estevam 
> > > Cc: Gourav Samaiya 
> > > Cc: Hawking Zhang 
> > > Cc: Hyun Kwon 
> > > Cc: Jerome Glisse 
> > > Cc: Jonathan Hunter 
> > > Cc: Karol Herbst 
> > > Cc: Laurent Pinchart 
> > > Cc: linaro-mm-...@lists.linaro.org
> > > Cc: linux-arm-ker...@lists.infradead.org
> > > Cc: linux-me...@vger.kernel.org
> > > Cc: linux-te...@vger.kernel.org
> > > Cc: Luben Tuikov 
> > > Cc: Lyude Paul 
> > > Cc: Maarten Lankhorst 
> > > Cc: "Maíra Canal" 
> > > Cc: Mario Limonciello 
> > > Cc: Maxime Ripard 
> > > Cc: Michal Simek 
> > > Cc: Mikko Perttunen 
> > > Cc: nouv...@lists.freedesktop.org
> > > Cc: NXP Linux Team 
> > > Cc: "Pan, Xinhui" 
> > > Cc: Pengutronix Kernel Team 
> > > Cc: Philipp Zabel 
> > > Cc: Sascha Hauer 
> > > Cc: Shashank Sharma 
> > > Cc: Shawn Guo 
> > > Cc: Stanley Yang 
> > > Cc: Sumit Semwal 
> > > Cc: Thierry Reding 
> > > Cc: Thomas Zimmermann 
> > > 
> > > [...]
> > 
> > Applied to drm/drm-misc (drm-misc-fixes).
> 
> I got confused with b4 usage, but that wasn't actually applied. Only the
> three patches I explicitly mentioned were, sorry for the confusion.

:)

Thanks Maxime.

-- 
Lee Jones [李琼斯]


Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Lee Jones
On Thu, 24 Aug 2023, Lee Jones wrote:

> On Thu, 24 Aug 2023, Jani Nikula wrote:
> 
> > On Thu, 24 Aug 2023, Lee Jones  wrote:
> > > 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.
> > 
> > The next question is, how do we keep it W=1 clean going forward?
> 
> My plan was to fix them all, then move each warning to W=0.

Some history:

- Starting with v5.8-rc1:   18867
- 2020-07-01:   18089
- 2020-07-07:   17288
- 2020-07-17:   15762
- 2020-07-20:   15724
- 2020-07-23:   15116
- 2020-08-12:   15184
- 2020-10-19:   10909
- 2020-11-04:9385
- 2021-01-04:5478
- 2021-01-12 4749
- 2021-01-29 4911
- 2021-04-07 3594
- 2021-05-20 2938
- 2021-07-01 2587
- 2023-02-10 2587
- 2023-08-22 1650

> Arnd recently submitted a set doing just that for a bunch of them.
> 
> https://lore.kernel.org/all/20230811140327.3754597-1-a...@kernel.org/
> 
> I like to think a bunch of this is built on top of my previous efforts.
> 
> GPU is a particularly tricky though - the warnings seem to come in faster
> than I can squash them.  Maybe the maintainers can find a way to test
> new patches on merge?
> 
> > Most people don't use W=1 because it's too noisy, so it's a bit of a
> > catch-22.
> > 
> > In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
> > Makefile. For CI/developer use we also enable kernel-doc warnings by
> > default.
> > 
> > Should we start enabling some of those warning flags in drm/Makefile to
> > to keep the entire subsystem warning free?
> 
> That would we awesome!  We'd just need buy-in.

-- 
Lee Jones [李琼斯]


Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Lee Jones
On Thu, 24 Aug 2023, Jani Nikula wrote:

> On Thu, 24 Aug 2023, Lee Jones  wrote:
> > 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.
> 
> The next question is, how do we keep it W=1 clean going forward?

My plan was to fix them all, then move each warning to W=0.

Arnd recently submitted a set doing just that for a bunch of them.

https://lore.kernel.org/all/20230811140327.3754597-1-a...@kernel.org/

I like to think a bunch of this is built on top of my previous efforts.

GPU is a particularly tricky though - the warnings seem to come in faster
than I can squash them.  Maybe the maintainers can find a way to test
new patches on merge?

> Most people don't use W=1 because it's too noisy, so it's a bit of a
> catch-22.
> 
> In i915, we enable a lot of W=1 warnings using subdir-ccflags-y in our
> Makefile. For CI/developer use we also enable kernel-doc warnings by
> default.
> 
> Should we start enabling some of those warning flags in drm/Makefile to
> to keep the entire subsystem warning free?

That would we awesome!  We'd just need buy-in.

-- 
Lee Jones [李琼斯]


[PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c: In function ‘imu_v11_0_init_microcode’:
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:54: warning: ‘_imu.bin’ directive 
output may be truncated writing 8 bytes into a region of size between 4 and 33 
[-Wformat-truncation=]
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:9: note: ‘snprintf’ output between 
16 and 45 bytes into a destination of size 40

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mario Limonciello 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
index 4ab90c7852c3e..ca123ff553477 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
@@ -39,7 +39,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_4_imu.bin");
 
 static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
 {
-   char fw_name[40];
+   char fw_name[45];
char ucode_prefix[30];
int err;
const struct imu_firmware_header_v1_0 *imu_hdr;
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 19/20] drm/amd/amdgpu/amdgpu_sdma: Increase buffer size to account for all possible values

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c: In function 
‘amdgpu_sdma_init_microcode’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:64: warning: ‘.bin’ directive 
output may be truncated writing 4 bytes into a region of size between 0 and 32 
[-Wformat-truncation=]
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:217:17: note: ‘snprintf’ output 
between 13 and 52 bytes into a destination of size 40
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:66: warning: ‘snprintf’ output 
may be truncated before the last format character [-Wformat-truncation=]
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c:215:17: note: ‘snprintf’ output 
between 12 and 41 bytes into a destination of size 40

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index e2b9392d7f0de..572f861e3f706 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -208,7 +208,7 @@ int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
const struct sdma_firmware_header_v2_0 *sdma_hdr;
uint16_t version_major;
char ucode_prefix[30];
-   char fw_name[40];
+   char fw_name[52];
 
amdgpu_ucode_ip_version_decode(adev, SDMA0_HWIP, ucode_prefix, 
sizeof(ucode_prefix));
if (instance == 0)
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 17/20] drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all possible values

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_sysfs_create’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1406:20: warning: ‘_err_count’ 
directive output may be truncated writing 10 bytes into a region of size 
between 1 and 32 [-Wformat-truncation=]
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1405:9: note: ‘snprintf’ output 
between 11 and 42 bytes into a destination of size 32

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Hawking Zhang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
index ffb49b2d533ad..7999d202c9bc5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
@@ -436,7 +436,7 @@ struct amdgpu_ras {
 };
 
 struct ras_fs_data {
-   char sysfs_name[32];
+   char sysfs_name[48];
char debugfs_name[32];
 };
 
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 12/20] drm/amd/amdgpu/amdgpu_device: Provide suitable description for param 'xcc_id'

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:516: warning: Function parameter or 
member 'xcc_id' not described in 'amdgpu_mm_wreg_mmio_rlc'

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e77f048c99d85..d4f0e4327dd3f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -507,6 +507,7 @@ void amdgpu_device_wreg(struct amdgpu_device *adev,
  * @adev: amdgpu_device pointer
  * @reg: mmio/rlc register
  * @v: value to write
+ * @xcc_id: xcc accelerated compute core id
  *
  * this function is invoked only for the debugfs register access
  */
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 11/20] drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param 'doorbell_index'

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Function 
parameter or member 'doorbell_index' not described in 
'amdgpu_doorbell_index_on_bar'
 drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c:123: warning: Excess function 
parameter 'db_index' description in 'amdgpu_doorbell_index_on_bar'

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Shashank Sharma 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
index da4be0bbb4466..d0249ada91d30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c
@@ -113,7 +113,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 
index, u64 v)
  *
  * @adev: amdgpu_device pointer
  * @db_bo: doorbell object's bo
- * @db_index: doorbell relative index in this doorbell object
+ * @doorbell_index: doorbell relative index in this doorbell object
  *
  * returns doorbell's absolute index in BAR
  */
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 08/20] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers

2023-08-24 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'job' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'flags' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:945: warning: Function parameter or 
member 'timeout' not described in 'sdma_v6_0_ring_test_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1124: warning: Function parameter or 
member 'ring' not described in 'sdma_v6_0_ring_pad_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'vmid' not described in 'sdma_v6_0_ring_emit_vm_flush'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'pd_addr' not described in 'sdma_v6_0_ring_emit_vm_flush'

Cc: linaro-mm-...@lists.linaro.org
---
Signed-off-by: Lee Jones 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Stanley Yang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index 45be0af2570b2..0e25b6fb13404 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -234,7 +234,7 @@ static void sdma_v6_0_ring_insert_nop(struct amdgpu_ring 
*ring, uint32_t count)
amdgpu_ring_write(ring, ring->funcs->nop);
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_ib - Schedule an IB on the DMA engine
  *
  * @ring: amdgpu ring pointer
@@ -937,7 +937,7 @@ static int sdma_v6_0_ring_test_ring(struct amdgpu_ring 
*ring)
return r;
 }
 
-/**
+/*
  * sdma_v6_0_ring_test_ib - test an IB on the DMA engine
  *
  * @ring: amdgpu_ring structure holding ring information
@@ -1119,7 +1119,7 @@ static void sdma_v6_0_vm_set_pte_pde(struct amdgpu_ib *ib,
ib->ptr[ib->length_dw++] = count - 1; /* number of entries */
 }
 
-/**
+/*
  * sdma_v6_0_ring_pad_ib - pad the IB
  * @ib: indirect buffer to fill with padding
  * @ring: amdgpu ring pointer
@@ -1168,7 +1168,7 @@ static void sdma_v6_0_ring_emit_pipeline_sync(struct 
amdgpu_ring *ring)
  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry 
count, poll interval */
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_vm_flush - vm flush using sDMA
  *
  * @ring: amdgpu_ring pointer
-- 
2.42.0.rc1.204.g551eb34607-goog



[PATCH 07/20] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()

2023-08-24 Thread Lee Jones
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]

Signed-off-by: Lee Jones 
---
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Jerome Glisse 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 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.42.0.rc1.204.g551eb34607-goog



[PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Lee Jones
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.

Cc: Alex Deucher 
Cc: amd-gfx@lists.freedesktop.org
Cc: Ben Skeggs 
Cc: "Christian König" 
Cc: Daniel Vetter 
Cc: Danilo Krummrich 
Cc: David Airlie 
Cc: dri-de...@lists.freedesktop.org
Cc: Fabio Estevam 
Cc: Gourav Samaiya 
Cc: Hawking Zhang 
Cc: Hyun Kwon 
Cc: Jerome Glisse 
Cc: Jonathan Hunter 
Cc: Karol Herbst 
Cc: Laurent Pinchart 
Cc: linaro-mm-...@lists.linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-me...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Cc: Luben Tuikov 
Cc: Lyude Paul 
Cc: Maarten Lankhorst 
Cc: "Maíra Canal" 
Cc: Mario Limonciello 
Cc: Maxime Ripard 
Cc: Michal Simek 
Cc: Mikko Perttunen 
Cc: nouv...@lists.freedesktop.org
Cc: NXP Linux Team 
Cc: "Pan, Xinhui" 
Cc: Pengutronix Kernel Team 
Cc: Philipp Zabel 
Cc: Sascha Hauer 
Cc: Shashank Sharma 
Cc: Shawn Guo 
Cc: Stanley Yang 
Cc: Sumit Semwal 
Cc: Thierry Reding 
Cc: Thomas Zimmermann 

Lee Jones (20):
  drm/xlnx/zynqmp_disp: Use correct kerneldoc formatting in zynqmp_disp
  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/dispnv04/crtc: Demote kerneldoc abuses
  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
  drm/tests/drm_kunit_helpers: Place correct function name in the
comment header
  drm/scheduler/sched_main: Provide short description of missing param
'result'
  drm/amd/amdgpu/amdgpu_doorbell_mgr: Correct misdocumented param
'doorbell_index'
  drm/amd/amdgpu/amdgpu_device: Provide suitable description for param
'xcc_id'
  drm/tests/drm_kunit_helpers: Correct possible double-entry typo in
'ddrm_kunit_helper_acquire_ctx_alloc'
  drm/imx/ipuv3/imx-ldb: Increase buffer size to ensure all possible
values can be stored
  drm/tegra/hub: Increase buffer size to ensure all possible values can
be stored
  drm/drm_connector: Provide short description of param
'supported_colorspaces'
  drm/amd/amdgpu/amdgpu_ras: Increase buffer size to account for all
possible values
  drm/drm_gpuva_mgr: Remove set but unused variable 'prev'
  drm/amd/amdgpu/amdgpu_sdma: Increase buffer size to account for all
possible values
  drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible
values can be stored

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|   1 +
 .../gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c  |   2 +-
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c|   2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c|   8 +-
 drivers/gpu/drm/drm_connector.c   |   2 +
 drivers/gpu/drm/drm_gpuva_mgr.c   |  10 +-
 drivers/gpu/drm/imx/ipuv3/imx-ldb.c   |   2 +-
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |   4 +-
 .../gpu/drm/nouveau/nvkm/engine/gr/gf100.c|   2 +-
 .../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/scheduler/sched_main.c|   1 +
 drivers/gpu/drm/tegra/hub.c   |   2 +-
 drivers/gpu/drm/tests/drm_kunit_helpers.c |   2 +-
 drivers/gpu/drm/xlnx/zynqmp_disp.c|   6 +-
 19 files changed, 96 insertions(+), 97 deletions(-)

-- 
2.42.0.rc1.204.g551eb34607-goog



[RESEND 15/15] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers

2023-06-09 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'job' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'flags' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:945: warning: Function parameter or 
member 'timeout' not described in 'sdma_v6_0_ring_test_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1124: warning: Function parameter or 
member 'ring' not described in 'sdma_v6_0_ring_pad_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'vmid' not described in 'sdma_v6_0_ring_emit_vm_flush'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'pd_addr' not described in 'sdma_v6_0_ring_emit_vm_flush'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Stanley Yang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index 3b03dda854fdc..8cd7abe74e6c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -233,7 +233,7 @@ static void sdma_v6_0_ring_insert_nop(struct amdgpu_ring 
*ring, uint32_t count)
amdgpu_ring_write(ring, ring->funcs->nop);
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_ib - Schedule an IB on the DMA engine
  *
  * @ring: amdgpu ring pointer
@@ -936,7 +936,7 @@ static int sdma_v6_0_ring_test_ring(struct amdgpu_ring 
*ring)
return r;
 }
 
-/**
+/*
  * sdma_v6_0_ring_test_ib - test an IB on the DMA engine
  *
  * @ring: amdgpu_ring structure holding ring information
@@ -1118,7 +1118,7 @@ static void sdma_v6_0_vm_set_pte_pde(struct amdgpu_ib *ib,
ib->ptr[ib->length_dw++] = count - 1; /* number of entries */
 }
 
-/**
+/*
  * sdma_v6_0_ring_pad_ib - pad the IB
  * @ib: indirect buffer to fill with padding
  * @ring: amdgpu ring pointer
@@ -1167,7 +1167,7 @@ static void sdma_v6_0_ring_emit_pipeline_sync(struct 
amdgpu_ring *ring)
  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry 
count, poll interval */
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_vm_flush - vm flush using sDMA
  *
  * @ring: amdgpu_ring pointer
-- 
2.41.0.162.gfafddb0af9-goog



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

2023-06-09 Thread Lee Jones
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 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Jerome Glisse 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 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



[RESEND 11/15] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move SYNAPTICS_DEVICE_ID into CONFIG_DRM_AMD_DC_DCN ifdef

2023-06-09 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:48:22: 
warning: ‘SYNAPTICS_DEVICE_ID’ defined but not used [-Wunused-const-variable=]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 09e056a647087..cd20cfc049969 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -44,9 +44,6 @@
 #include "dm_helpers.h"
 #include "ddc_service_types.h"
 
-/* MST Dock */
-static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
-
 /* dm_helpers_parse_edid_caps
  *
  * Parse edid caps
@@ -702,6 +699,9 @@ static void apply_synaptics_fifo_reset_wa(struct drm_dp_aux 
*aux)
DC_LOG_DC("Done apply_synaptics_fifo_reset_wa\n");
 }
 
+/* MST Dock */
+static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
+
 static uint8_t write_dsc_enable_synaptics_non_virtual_dpcd_mst(
struct drm_dp_aux *aux,
const struct dc_stream_state *stream,
-- 
2.41.0.162.gfafddb0af9-goog



[RESEND 00/15] Rid W=1 warnings from GPU

2023-06-09 Thread Lee Jones
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 
Cc: amd-gfx@lists.freedesktop.org
Cc: AngeloGioacchino Del Regno 
Cc: Ben Skeggs 
Cc: "Christian König" 
Cc: Chun-Kuang Hu 
Cc: Daniel Vetter 
Cc: David Airlie 
Cc: dri-de...@lists.freedesktop.org
Cc: Gourav Samaiya 
Cc: Haneen Mohammed 
Cc: Harry Wentland 
Cc: Hyun Kwon 
Cc: Jerome Glisse 
Cc: Karol Herbst 
Cc: Laurent Pinchart 
Cc: Leo Li 
Cc: linaro-mm-...@lists.linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-media...@lists.infradead.org
Cc: linux-me...@vger.kernel.org
Cc: Lyude Paul 
Cc: Matthias Brugger 
Cc: Melissa Wen 
Cc: Michal Simek 
Cc: nouv...@lists.freedesktop.org
Cc: "Pan, Xinhui" 
Cc: Philipp Zabel 
Cc: Rodrigo Siqueira 
Cc: Rodrigo Siqueira 
Cc: Stanley Yang 
Cc: Sumit Semwal 

-- 
2.41.0.162.gfafddb0af9-goog



[PATCH 18/19] drm/amd/amdgpu/sdma_v6_0: Demote a bunch of half-completed function headers

2023-03-31 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'job' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:248: warning: Function parameter or 
member 'flags' not described in 'sdma_v6_0_ring_emit_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:945: warning: Function parameter or 
member 'timeout' not described in 'sdma_v6_0_ring_test_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1124: warning: Function parameter or 
member 'ring' not described in 'sdma_v6_0_ring_pad_ib'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'vmid' not described in 'sdma_v6_0_ring_emit_vm_flush'
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:1175: warning: Function parameter or 
member 'pd_addr' not described in 'sdma_v6_0_ring_emit_vm_flush'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Stanley Yang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index 40e6b22daa226..efea4ef30a787 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -233,7 +233,7 @@ static void sdma_v6_0_ring_insert_nop(struct amdgpu_ring 
*ring, uint32_t count)
amdgpu_ring_write(ring, ring->funcs->nop);
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_ib - Schedule an IB on the DMA engine
  *
  * @ring: amdgpu ring pointer
@@ -933,7 +933,7 @@ static int sdma_v6_0_ring_test_ring(struct amdgpu_ring 
*ring)
return r;
 }
 
-/**
+/*
  * sdma_v6_0_ring_test_ib - test an IB on the DMA engine
  *
  * @ring: amdgpu_ring structure holding ring information
@@ -1114,7 +1114,7 @@ static void sdma_v6_0_vm_set_pte_pde(struct amdgpu_ib *ib,
ib->ptr[ib->length_dw++] = count - 1; /* number of entries */
 }
 
-/**
+/*
  * sdma_v6_0_ring_pad_ib - pad the IB
  * @ib: indirect buffer to fill with padding
  *
@@ -1162,7 +1162,7 @@ static void sdma_v6_0_ring_emit_pipeline_sync(struct 
amdgpu_ring *ring)
  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry 
count, poll interval */
 }
 
-/**
+/*
  * sdma_v6_0_ring_emit_vm_flush - vm flush using sDMA
  *
  * @ring: amdgpu_ring pointer
-- 
2.40.0.348.gf938b09366-goog



[PATCH 03/19] drm/radeon/radeon_ttm: Remove unused variable 'rbo' from radeon_bo_move()

2023-03-31 Thread Lee Jones
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 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Jerome Glisse 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 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 2220cdf6a3f68..0ea430ee52569 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -198,7 +198,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) {
@@ -211,7 +210,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.40.0.348.gf938b09366-goog



Re: [PATCH 28/37] drm/amd/display/dc/core/dc_stat: Convert a couple of doc headers to kerneldoc format

2023-03-20 Thread Lee Jones
On Mon, 20 Mar 2023, Harry Wentland wrote:

>
>
> On 3/20/23 04:19, Lee Jones wrote:
> > On Fri, 17 Mar 2023, Alex Deucher wrote:
> >
> >> On Fri, Mar 17, 2023 at 4:23 AM Lee Jones  wrote:
> >>>
> >>> Fixes the following W=1 kernel build warning(s):
> >>>
> >>>  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:38: warning: 
> >>> Cannot understand  
> >>> *
> >>>  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:76: warning: 
> >>> Cannot understand  
> >>> *
> >>>
> >>> Cc: Harry Wentland 
> >>> Cc: Leo Li 
> >>> Cc: Rodrigo Siqueira 
> >>> Cc: Alex Deucher 
> >>> Cc: "Christian König" 
> >>> Cc: "Pan, Xinhui" 
> >>> Cc: David Airlie 
> >>> Cc: Daniel Vetter 
> >>> Cc: Mustapha Ghaddar 
> >>> Cc: Nicholas Kazlauskas 
> >>> Cc: Jasdeep Dhillon 
> >>> Cc: amd-gfx@lists.freedesktop.org
> >>> Cc: dri-de...@lists.freedesktop.org
> >>> Signed-off-by: Lee Jones 
> >>> ---
> >>>  drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 28 +++
> >>>  1 file changed, 10 insertions(+), 18 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c 
> >>> b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> >>> index 6c06587dd88c2..5f6392ae31a66 100644
> >>> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> >>> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> >>> @@ -35,19 +35,15 @@
> >>>   */
> >>>
> >>>  /**
> >>
> >> This looks like it follows some other documentation scheme.  Would
> >> probably be better to just remove the extra * and make it not kernel
> >> doc.  @Wentland, Harry @Siqueira, Rodrigo ?
> >
> > Happy to wait for further input.
> >
> > Either demoting from or converting to kerneldoc would be fine.
> >
>
> There's no reason they are formatted the way they are. Converting them to
> kerneldoc is fine.
>
> Reviewed-by: Harry Wentland 

Thanks for confirming Harry.

--
Lee Jones [李琼斯]


Re: [PATCH 36/37] drm/amd/display/dc/link/link_detection: Demote a couple of kerneldoc abuses

2023-03-20 Thread Lee Jones
On Fri, 17 Mar 2023, Alex Deucher wrote:

> Applied.  Thanks!
>
> Alex

Awesome as ever Alex.  Thank you.

> On Fri, Mar 17, 2023 at 4:24 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: 
> > warning: Function parameter or member 'link' not described in 
> > 'detect_link_and_local_sink'
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: 
> > warning: Function parameter or member 'reason' not described in 
> > 'detect_link_and_local_sink'
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:1232: 
> > warning: Function parameter or member 'link' not described in 
> > 'dc_link_detect_connection_type'
> >
> > Cc: Harry Wentland 
> > Cc: Leo Li 
> > Cc: Rodrigo Siqueira 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: "Pan, Xinhui" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: Lee Jones 
> > Cc: Wenjing Liu 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/amd/display/dc/link/link_detection.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
> > b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> > index 9a4cfa777622e..67addedd89563 100644
> > --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> > +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> > @@ -832,7 +832,7 @@ static void verify_link_capability(struct dc_link 
> > *link, struct dc_sink *sink,
> > verify_link_capability_non_destructive(link);
> >  }
> >
> > -/**
> > +/*
> >   * detect_link_and_local_sink() - Detect if a sink is attached to a given 
> > link
> >   *
> >   * link->local_sink is created or destroyed as needed.
> > @@ -1185,7 +1185,7 @@ static bool detect_link_and_local_sink(struct dc_link 
> > *link,
> > return true;
> >  }
> >
> > -/**
> > +/*
> >   * link_detect_connection_type() - Determine if there is a sink connected
> >   *
> >   * @type: Returned connection type
> > --
> > 2.40.0.rc1.284.g88254d51c5-goog
> >

--
Lee Jones [李琼斯]


Re: [PATCH 28/37] drm/amd/display/dc/core/dc_stat: Convert a couple of doc headers to kerneldoc format

2023-03-20 Thread Lee Jones
On Fri, 17 Mar 2023, Alex Deucher wrote:

> On Fri, Mar 17, 2023 at 4:23 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:38: warning: 
> > Cannot understand  
> > *
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:76: warning: 
> > Cannot understand  
> > *
> >
> > Cc: Harry Wentland 
> > Cc: Leo Li 
> > Cc: Rodrigo Siqueira 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: "Pan, Xinhui" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: Mustapha Ghaddar 
> > Cc: Nicholas Kazlauskas 
> > Cc: Jasdeep Dhillon 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 28 +++
> >  1 file changed, 10 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c 
> > b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> > index 6c06587dd88c2..5f6392ae31a66 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
> > @@ -35,19 +35,15 @@
> >   */
> >
> >  /**
>
> This looks like it follows some other documentation scheme.  Would
> probably be better to just remove the extra * and make it not kernel
> doc.  @Wentland, Harry @Siqueira, Rodrigo ?

Happy to wait for further input.

Either demoting from or converting to kerneldoc would be fine.

> > - 
> > *
> > - *  Function: dc_stat_get_dmub_notification
> > + *  dc_stat_get_dmub_notification
> >   *
> > - *  @brief
> > - * Calls dmub layer to retrieve dmub notification
> > + * Calls dmub layer to retrieve dmub notification
> >   *
> > - *  @param
> > - * [in] dc: dc structure
> > - * [in] notify: dmub notification structure
> > + * @dc: dc structure
> > + * @notify: dmub notification structure
> >   *
> > - *  @return
> > + * Returns
> >   * None
> > - 
> > *
> >   */
> >  void dc_stat_get_dmub_notification(const struct dc *dc, struct 
> > dmub_notification *notify)
> >  {
> > @@ -73,19 +69,15 @@ void dc_stat_get_dmub_notification(const struct dc *dc, 
> > struct dmub_notification
> >  }
> >
> >  /**
> > - 
> > *
> > - *  Function: dc_stat_get_dmub_dataout
> > + * dc_stat_get_dmub_dataout
> >   *
> > - *  @brief
> > - * Calls dmub layer to retrieve dmub gpint dataout
> > + * Calls dmub layer to retrieve dmub gpint dataout
> >   *
> > - *  @param
> > - * [in] dc: dc structure
> > - * [in] dataout: dmub gpint dataout
> > + * @dc: dc structure
> > + * @dataout: dmub gpint dataout
> >   *
> > - *  @return
> > + * Returns
> >   * None
> > - 
> > *
> >   */
> >  void dc_stat_get_dmub_dataout(const struct dc *dc, uint32_t *dataout)
> >  {
> > --
> > 2.40.0.rc1.284.g88254d51c5-goog
> >

--
Lee Jones [李琼斯]


[PATCH 36/37] drm/amd/display/dc/link/link_detection: Demote a couple of kerneldoc abuses

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: warning: 
Function parameter or member 'link' not described in 
'detect_link_and_local_sink'
 drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: warning: 
Function parameter or member 'reason' not described in 
'detect_link_and_local_sink'
 drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:1232: warning: 
Function parameter or member 'link' not described in 
'dc_link_detect_connection_type'

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Lee Jones 
Cc: Wenjing Liu 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 9a4cfa777622e..67addedd89563 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -832,7 +832,7 @@ static void verify_link_capability(struct dc_link *link, 
struct dc_sink *sink,
verify_link_capability_non_destructive(link);
 }
 
-/**
+/*
  * detect_link_and_local_sink() - Detect if a sink is attached to a given link
  *
  * link->local_sink is created or destroyed as needed.
@@ -1185,7 +1185,7 @@ static bool detect_link_and_local_sink(struct dc_link 
*link,
return true;
 }
 
-/**
+/*
  * link_detect_connection_type() - Determine if there is a sink connected
  *
  * @type: Returned connection type
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 35/37] drm/amd/display/dc/dce60/Makefile: Fix previous attempt to silence known override-init warnings

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:21: note: 
in expansion of macro ‘mmCRTC1_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:9: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:17: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:188:17: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:722:43: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:21: note: 
in expansion of macro ‘mmCRTC2_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:9: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:17: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:189:17: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:722:43: note: 
(near initialization for ‘xfm_regs[2].DCFE_MEM_LIGHT_SLEEP_CN

[100 lines snipped for brevity]

Fixes: ceb3cf476a441 ("drm/amd/display/dc/dce60/Makefile: Ignore 
-Woverride-init warning")
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mauro Rossi 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce60/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce60/Makefile 
b/drivers/gpu/drm/amd/display/dc/dce60/Makefile
index dda596fa1cd76..fee331accc0e7 100644
--- a/drivers/gpu/drm/amd/display/dc/dce60/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce60/Makefile
@@ -23,7 +23,7 @@
 # Makefile for the 'controller' sub-component of DAL.
 # It provides the control and status of HW CRTC block.
 
-CFLAGS_AMDDALPATH)/dc/dce60/dce60_resource.o = $(call cc-disable-warning, 
override-init)
+CFLAGS_$(AMDDALPATH)/dc/dce60/dce60_resource.o = $(call cc-disable-warning, 
override-init)
 
 DCE60 = dce60_timing_generator.o dce60_hw_sequencer.o \
dce60_resource.o
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 33/37] drm/amd/display/dc/link/protocols/link_dp_capability: Demote non-compliant kerneldoc

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:2190:
 warning: Function parameter or member 'link' not described in 
'dc_link_is_dp_sink_present'

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index 51427f5081642..2a2443535b676 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -2177,7 +2177,7 @@ bool dp_verify_link_cap_with_retries(
return success;
 }
 
-/**
+/*
  * Check if there is a native DP or passive DP-HDMI dongle connected
  */
 bool dp_is_sink_present(struct dc_link *link)
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 32/37] drm/amd/display/dc/link/protocols/link_dp_capability: Remove unused variable and mark another as __maybe_unused

2023-03-17 Thread Lee Jones
‘ds_port’ is clearly not used anywhere and ‘result_write_min_hblank’ is
only utilised when debugging is enabled.  The alternative would be to
allocate the variable under the same clause as the debugging code, but
that would become very messy, very quickly.

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

 drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: 
In function ‘dp_wa_power_up_0010FA’:
 
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:42:
 warning: variable ‘ds_port’ set but not used [-Wunused-but-set-variable]
 drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: 
In function ‘dpcd_set_source_specific_data’:
 
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:1296:32:
 warning: variable ‘result_write_min_hblank’ set but not used 
[-Wunused-but-set-variable]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Wenjing Liu 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index e9bcb35ae185a..51427f5081642 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -1284,7 +1284,7 @@ bool dp_overwrite_extended_receiver_cap(struct dc_link 
*link)
 void dpcd_set_source_specific_data(struct dc_link *link)
 {
if (!link->dc->vendor_signature.is_valid) {
-   enum dc_status result_write_min_hblank = DC_NOT_SUPPORTED;
+   enum dc_status __maybe_unused result_write_min_hblank = 
DC_NOT_SUPPORTED;
struct dpcd_amd_signature amd_signature = {0};
struct dpcd_amd_device_id amd_device_id = {0};
 
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 29/37] drm/amd/display/dc/link/link_detection: Remove unused variable 'status'

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c: In function 
‘query_hdcp_capability’:
 drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:501:42: 
warning: variable ‘status’ set but not used [-Wunused-but-set-variable]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Wenjing Liu 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 9177b146a80a8..9a4cfa777622e 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -498,8 +498,6 @@ static void query_hdcp_capability(enum signal_type signal, 
struct dc_link *link)
dc_process_hdcp_msg(signal, link, &msg22);
 
if (signal == SIGNAL_TYPE_DISPLAY_PORT || signal == 
SIGNAL_TYPE_DISPLAY_PORT_MST) {
-   enum hdcp_message_status status = HDCP_MESSAGE_UNSUPPORTED;
-
msg14.data = &link->hdcp_caps.bcaps.raw;
msg14.length = sizeof(link->hdcp_caps.bcaps.raw);
msg14.msg_id = HDCP_MESSAGE_ID_READ_BCAPS;
@@ -507,7 +505,7 @@ static void query_hdcp_capability(enum signal_type signal, 
struct dc_link *link)
msg14.link = HDCP_LINK_PRIMARY;
msg14.max_retries = 5;
 
-   status = dc_process_hdcp_msg(signal, link, &msg14);
+   dc_process_hdcp_msg(signal, link, &msg14);
}
 
 }
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 30/37] drm/amd/display/dc/link/protocols/link_dp_training: Remove set but unused variable 'result'

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c: In 
function ‘perform_link_training_with_retries’:
 
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c:1586:38:
 warning: variable ‘result’ set but not used [-Wunused-but-set-variable]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Wenjing Liu 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
index a9025671ee4a8..10261764a0cea 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
@@ -1580,8 +1580,7 @@ bool perform_link_training_with_retries(
 * Report and continue with eDP panel mode to
 * perform eDP link training with right settings
 */
-   bool result;
-   result = 
cp_psp->funcs.enable_assr(cp_psp->handle, link);
+   cp_psp->funcs.enable_assr(cp_psp->handle, link);
}
}
 
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 28/37] drm/amd/display/dc/core/dc_stat: Convert a couple of doc headers to kerneldoc format

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:38: warning: Cannot 
understand  
*
 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:76: warning: Cannot 
understand  
*

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mustapha Ghaddar 
Cc: Nicholas Kazlauskas 
Cc: Jasdeep Dhillon 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 28 +++
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
index 6c06587dd88c2..5f6392ae31a66 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stat.c
@@ -35,19 +35,15 @@
  */
 
 /**
- *
- *  Function: dc_stat_get_dmub_notification
+ *  dc_stat_get_dmub_notification
  *
- *  @brief
- * Calls dmub layer to retrieve dmub notification
+ * Calls dmub layer to retrieve dmub notification
  *
- *  @param
- * [in] dc: dc structure
- * [in] notify: dmub notification structure
+ * @dc: dc structure
+ * @notify: dmub notification structure
  *
- *  @return
+ * Returns
  * None
- *
  */
 void dc_stat_get_dmub_notification(const struct dc *dc, struct 
dmub_notification *notify)
 {
@@ -73,19 +69,15 @@ void dc_stat_get_dmub_notification(const struct dc *dc, 
struct dmub_notification
 }
 
 /**
- *
- *  Function: dc_stat_get_dmub_dataout
+ * dc_stat_get_dmub_dataout
  *
- *  @brief
- * Calls dmub layer to retrieve dmub gpint dataout
+ * Calls dmub layer to retrieve dmub gpint dataout
  *
- *  @param
- * [in] dc: dc structure
- * [in] dataout: dmub gpint dataout
+ * @dc: dc structure
+ * @dataout: dmub gpint dataout
  *
- *  @return
+ * Returns
  * None
- *
  */
 void dc_stat_get_dmub_dataout(const struct dc *dc, uint32_t *dataout)
 {
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 27/37] drm/amd/display/dc/dce/dmub_psr: Demote kerneldoc abuse

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:257: warning: This 
comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: David Zhang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
index 27b8f3435d86f..9705d8f883825 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -253,7 +253,7 @@ static void dmub_psr_set_level(struct dmub_psr *dmub, 
uint16_t psr_level, uint8_
dc_dmub_srv_wait_idle(dc->dmub_srv);
 }
 
-/**
+/*
  * Set PSR vtotal requirement for FreeSync PSR.
  */
 static void dmub_psr_set_sink_vtotal_in_psr_active(struct dmub_psr *dmub,
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 26/37] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move SYNAPTICS_DEVICE_ID into CONFIG_DRM_AMD_DC_DCN ifdef

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:48:22: 
warning: ‘SYNAPTICS_DEVICE_ID’ defined but not used [-Wunused-const-variable=]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 330ab036c830f..a8904184673f6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -44,9 +44,6 @@
 #include "dm_helpers.h"
 #include "ddc_service_types.h"
 
-/* MST Dock */
-static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
-
 /* dm_helpers_parse_edid_caps
  *
  * Parse edid caps
@@ -703,6 +700,9 @@ static void apply_synaptics_fifo_reset_wa(struct drm_dp_aux 
*aux)
DC_LOG_DC("Done apply_synaptics_fifo_reset_wa\n");
 }
 
+/* MST Dock */
+static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
+
 static uint8_t write_dsc_enable_synaptics_non_virtual_dpcd_mst(
struct drm_dp_aux *aux,
const struct dc_stream_state *stream,
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 19/37] drm/amd/pm/swsmu/smu11/vangogh_ppt: Provide a couple of missing parameter descriptions

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:2381: warning: 
Function parameter or member 'residency' not described in 
'vangogh_get_gfxoff_residency'
 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:2399: warning: 
Function parameter or member 'entrycount' not described in 
'vangogh_get_gfxoff_entrycount'

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Li Ma 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 4590374251f3b..7433dcaa16e04 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -2389,6 +2389,7 @@ static u32 vangogh_set_gfxoff_residency(struct 
smu_context *smu, bool start)
  * vangogh_get_gfxoff_residency
  *
  * @smu: amdgpu_device pointer
+ * @residency: placeholder for return value
  *
  * This function will be used to get gfxoff residency.
  *
@@ -2407,6 +2408,7 @@ static u32 vangogh_get_gfxoff_residency(struct 
smu_context *smu, uint32_t *resid
  * vangogh_get_gfxoff_entrycount - get gfxoff entry count
  *
  * @smu: amdgpu_device pointer
+ * @entrycount: placeholder for return value
  *
  * This function will be used to get gfxoff entry count
  *
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 20/37] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move defines out to where they are actually used

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h: At top 
level:
  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:143:22:
  warning: ‘SYNAPTICS_DEVICE_ID’ defined but not used 
[-Wunused-const-variable=]
  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:140:22:
  warning: ‘DP_VGA_LVDS_CONVERTER_ID_3’ defined but not used 
[-Wunused-const-variable=]
  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:138:22:
  warning: ‘DP_VGA_LVDS_CONVERTER_ID_2’ defined but not used 
[-Wunused-const-variable=]
  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:133:22:
  warning: ‘DP_SINK_DEVICE_STR_ID_2’ defined but not used 
[-Wunused-const-variable=]
  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:132:22:
  warning: ‘DP_SINK_DEVICE_STR_ID_1’ defined but not used 
[-Wunused-const-variable=]

[snip 400 similar lines brevity]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c   |  3 +++
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c   |  3 +++
 .../gpu/drm/amd/display/dc/link/link_detection.c|  2 ++
 .../dc/link/protocols/link_edp_panel_control.c  |  5 +
 .../gpu/drm/amd/display/include/ddc_service_types.h | 13 -
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 9c1e91c2179eb..330ab036c830f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -44,6 +44,9 @@
 #include "dm_helpers.h"
 #include "ddc_service_types.h"
 
+/* MST Dock */
+static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
+
 /* dm_helpers_parse_edid_caps
  *
  * Parse edid caps
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
index 19440bdf63449..27b8f3435d86f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -33,6 +33,9 @@
 
 #define MAX_PIPES 6
 
+static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3};
+static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5};
+
 /*
  * Convert dmcub psr state to dmcu psr state.
  */
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 8cfeddfb65c89..9177b146a80a8 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -60,6 +60,8 @@
  */
 #define LINK_TRAINING_MAX_VERIFY_RETRY 2
 
+static const u8 DP_SINK_BRANCH_DEV_NAME_7580[] = "7580\x80u";
+
 static const uint8_t dp_hdmi_dongle_signature_str[] = "DP-HDMI ADAPTOR";
 
 static enum ddc_transaction_type get_ddc_transaction_type(enum signal_type 
sink_signal)
diff --git 
a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
index 93a6bbe954bb7..d895046787bc4 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
@@ -37,6 +37,11 @@
 #include "abm.h"
 #define DC_LOGGER_INIT(logger)
 
+/* Travis */
+static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
+/* Nutmeg */
+static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
+
 void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
 {
union dpcd_edp_config edp_config_set;
diff --git a/drivers/gpu/drm/amd/display/include/ddc_service_types.h 
b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
index 31a12ce79a8e0..f843fc4978552 100644
--- a/drivers/gpu/drm/amd/display/include/ddc_service_types.h
+++ b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
@@ -129,17 +129,4 @@ struct av_sync_data {
uint8_t aud_del_ins3;/* DPCD 0002Dh */
 };
 
-static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3};
-static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5};
-
-static const u8 DP_SINK_BRANCH_DEV_NAME_7580[] = "7580\x80u";
-
-/*Travis*/
-static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
-/*Nutmeg*/
-static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
-
-/*MST Dock*/
-static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
-
 #endif /* __DAL_DDC_SERVICE_TYPES_H__ */
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 18/37] drm/amd/amdgpu/amdgpu_vce: Provide description for amdgpu_vce_validate_bo()'s 'p' param

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:599: warning: Function parameter or 
member 'p' not described in 'amdgpu_vce_validate_bo'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 2fb61410b1c02..c4d65ade5c00a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -585,6 +585,7 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring 
*ring, uint32_t handle,
 /**
  * amdgpu_vce_validate_bo - make sure not to cross 4GB boundary
  *
+ * @p: parser context
  * @ib: indirect buffer to use
  * @lo: address of lower dword
  * @hi: address of higher dword
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 17/37] drm/amd/amdgpu/amdgpu_mes: Ensure amdgpu_bo_create_kernel()'s return value is checked

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function 
‘amdgpu_mes_ctx_alloc_meta_data’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but 
not used [-Wunused-but-set-variable]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Jack Xiao 
Cc: Hawking Zhang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
index 82e27bd4f0383..30cd72ca1eefd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
@@ -1104,6 +1104,11 @@ int amdgpu_mes_ctx_alloc_meta_data(struct amdgpu_device 
*adev,
&ctx_data->meta_data_obj,
&ctx_data->meta_data_mc_addr,
&ctx_data->meta_data_ptr);
+   if (r) {
+   dev_warn(adev->dev, "(%d) create CTX bo failed\n", r);
+   return r;
+   }
+
if (!ctx_data->meta_data_obj)
return -ENOMEM;
 
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 16/37] drm/amd/amdgpu/ih_v6_0: Repair misspelling and provide descriptions for 'ih'

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:392: warning: Function parameter or 
member 'ih' not described in 'ih_v6_0_get_wptr'
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:432: warning: Function parameter or 
member 'ih' not described in 'ih_v6_0_irq_rearm'
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:458: warning: Function parameter or 
member 'ih' not described in 'ih_v6_0_set_rptr'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Hawking Zhang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
index 7cd79a3844b24..b02e1cef78a76 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
@@ -119,7 +119,7 @@ force_update_wptr_for_self_int(struct amdgpu_device *adev,
  * ih_v6_0_toggle_ring_interrupts - toggle the interrupt ring buffer
  *
  * @adev: amdgpu_device pointer
- * @ih: amdgpu_ih_ring pointet
+ * @ih: amdgpu_ih_ring pointer
  * @enable: true - enable the interrupts, false - disable the interrupts
  *
  * Toggle the interrupt ring buffer (IH_V6_0)
@@ -381,6 +381,7 @@ static void ih_v6_0_irq_disable(struct amdgpu_device *adev)
  * ih_v6_0_get_wptr - get the IH ring buffer wptr
  *
  * @adev: amdgpu_device pointer
+ * @ih: amdgpu_ih_ring pointer
  *
  * Get the IH ring buffer wptr from either the register
  * or the writeback memory buffer.  Also check for
@@ -425,6 +426,7 @@ static u32 ih_v6_0_get_wptr(struct amdgpu_device *adev,
  * ih_v6_0_irq_rearm - rearm IRQ if lost
  *
  * @adev: amdgpu_device pointer
+ * @ih: amdgpu_ih_ring pointer
  *
  */
 static void ih_v6_0_irq_rearm(struct amdgpu_device *adev,
@@ -450,6 +452,7 @@ static void ih_v6_0_irq_rearm(struct amdgpu_device *adev,
  * ih_v6_0_set_rptr - set the IH ring buffer rptr
  *
  * @adev: amdgpu_device pointer
+ * @ih: amdgpu_ih_ring pointer
  *
  * Set the IH ring buffer rptr.
  */
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 14/37] drm/amd/amdgpu/amdgpu_vm_pt: Supply description for amdgpu_vm_pt_free_dfs()'s unlocked param

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c:683: warning: Function parameter or 
member 'unlocked' not described in 'amdgpu_vm_pt_free_dfs'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
index 01e42bdd8e4e8..df63dc3bca18c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
@@ -673,6 +673,7 @@ void amdgpu_vm_pt_free_work(struct work_struct *work)
  * @adev: amdgpu device structure
  * @vm: amdgpu vm structure
  * @start: optional cursor where to start freeing PDs/PTs
+ * @unlocked: vm resv unlock status
  *
  * Free the page directory or page table level and all sub levels.
  */
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 15/37] drm/amd/amdgpu/gmc_v11_0: Provide a few missing param descriptions relating to hubs and flushes

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:282: warning: Function parameter or 
member 'vmhub' not described in 'gmc_v11_0_flush_gpu_tlb'
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:282: warning: Function parameter or 
member 'flush_type' not described in 'gmc_v11_0_flush_gpu_tlb'
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:322: warning: Function parameter or 
member 'flush_type' not described in 'gmc_v11_0_flush_gpu_tlb_pasid'
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:322: warning: Function parameter or 
member 'all_hub' not described in 'gmc_v11_0_flush_gpu_tlb_pasid'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index fad199ed15f38..9f4f28192c601 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -274,6 +274,8 @@ static void gmc_v11_0_flush_vm_hub(struct amdgpu_device 
*adev, uint32_t vmid,
  *
  * @adev: amdgpu_device pointer
  * @vmid: vm instance to flush
+ * @vmhub: which hub to flush
+ * @flush_type: the flush type
  *
  * Flush the TLB for the requested page table.
  */
@@ -313,6 +315,8 @@ static void gmc_v11_0_flush_gpu_tlb(struct amdgpu_device 
*adev, uint32_t vmid,
  *
  * @adev: amdgpu_device pointer
  * @pasid: pasid to be flush
+ * @flush_type: the flush type
+ * @all_hub: flush all hubs
  *
  * Flush the TLB for the requested pasid.
  */
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 13/37] drm/amd/amdgpu/amdgpu_ucode: Remove unused function ‘amdgpu_ucode_print_imu_hdr’

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:129:6: warning: no previous 
prototype for ‘amdgpu_ucode_print_imu_hdr’ [-Wmissing-prototypes]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index 380b89114341d..a7bffd24ceaf3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
@@ -126,19 +126,6 @@ void amdgpu_ucode_print_gfx_hdr(const struct 
common_firmware_header *hdr)
}
 }
 
-void amdgpu_ucode_print_imu_hdr(const struct common_firmware_header *hdr)
-{
-   uint16_t version_major = le16_to_cpu(hdr->header_version_major);
-   uint16_t version_minor = le16_to_cpu(hdr->header_version_minor);
-
-   DRM_DEBUG("IMU\n");
-   amdgpu_ucode_print_common_hdr(hdr);
-
-   if (version_major != 1) {
-   DRM_ERROR("Unknown GFX ucode version: %u.%u\n", version_major, 
version_minor);
-   }
-}
-
 void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr)
 {
uint16_t version_major = le16_to_cpu(hdr->header_version_major);
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 03/37] drm/amd/amdgpu/amdgpu_device: Provide missing kerneldoc entry for 'reset_context'

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5152:
   warning: Function parameter or member 'reset_context' not described in 
'amdgpu_device_gpu_recover'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d4519fbd526f2..ef0b2787796da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5145,6 +5145,7 @@ static inline void 
amdgpu_device_stop_pending_resets(struct amdgpu_device *adev)
  *
  * @adev: amdgpu_device pointer
  * @job: which job trigger hang
+ * @reset_context: amdgpu reset context pointer
  *
  * Attempt to reset the GPU if it has hung (all asics).
  * Attempt to do soft-reset or full-reset and reinitialize Asic
-- 
2.40.0.rc1.284.g88254d51c5-goog



[PATCH 01/37] drm/amd/display/dc/dc_hdmi_types: Move string definition to the only file it's used in

2023-03-17 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hdmi_types.h:53:22:
   warning: ‘dp_hdmi_dongle_signature_str’ defined but not used 
[-Wunused-const-variable=]

[snipped 400 similar lines for brevity]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Wenjing Liu 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dc_hdmi_types.h   | 1 -
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc_hdmi_types.h 
b/drivers/gpu/drm/amd/display/dc/dc_hdmi_types.h
index c364744b4c835..b015e80672ec9 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_hdmi_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_hdmi_types.h
@@ -50,7 +50,6 @@ struct dp_hdmi_dongle_signature_data {
 
 /* DP-HDMI dongle slave address for retrieving dongle signature*/
 #define DP_HDMI_DONGLE_ADDRESS 0x40
-static const uint8_t dp_hdmi_dongle_signature_str[] = "DP-HDMI ADAPTOR";
 #define DP_HDMI_DONGLE_SIGNATURE_EOT 0x04
 
 
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index fee71ebdfc733..8cfeddfb65c89 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -60,6 +60,8 @@
  */
 #define LINK_TRAINING_MAX_VERIFY_RETRY 2
 
+static const uint8_t dp_hdmi_dongle_signature_str[] = "DP-HDMI ADAPTOR";
+
 static enum ddc_transaction_type get_ddc_transaction_type(enum signal_type 
sink_signal)
 {
enum ddc_transaction_type transaction_type = DDC_TRANSACTION_TYPE_NONE;
-- 
2.40.0.rc1.284.g88254d51c5-goog



Re: [PATCH v2 0/2] Fix a bunch of allmodconfig errors

2022-11-27 Thread Lee Jones
On Fri, 25 Nov 2022, Andrew Morton wrote:

> On Fri, 25 Nov 2022 12:07:48 +0000 Lee Jones  wrote:
> 
> > Since b339ec9c229aa ("kbuild: Only default to -Werror if COMPILE_TEST") 
> > WERROR 
> > now defaults to COMPILE_TEST meaning that it's enabled for allmodconfig 
> >
> > builds.  This leads to some interesting failures, each resolved in this 
> > set.   
> 
> I'm not sure who this patchset is aimed at, so I'll take my usual
> approach of grabbing it and seeing who complains.
> 
> > With this set applied, I am able to obtain a successful allmodconfig Arm 
> > build.
> 
> b339ec9c229aa is a year old and I've been doing arm allmodconfig for
> ever.  What am I missing here?
> 
> A broken arm allmodconfig is pretty irritating - I'm thinking that a
> fix should be backported into -stable kernels.  But I'm clearly missing
> something here.

I will be taking these through all applicable Stable kernels.

-- 
Lee Jones [李琼斯]


Re: [PATCH v2 2/2] Kconfig.debug: Provide a little extra FRAME_WARN leeway when KASAN is enabled

2022-11-25 Thread Lee Jones
On Fri, 25 Nov 2022, Lee Jones wrote:

> When enabled, KASAN enlarges function's stack-frames.  Pushing quite a
> few over the current threshold.  This can mainly be seen on 32-bit
> architectures where the present limit (when !GCC) is a lowly
> 1024-Bytes.
> 
> Signed-off-by: Lee Jones 
> ---
>  lib/Kconfig.debug | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index c3c0b077ade33..82d475168db95 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -399,6 +399,7 @@ config FRAME_WARN
>   default 2048 if GCC_PLUGIN_LATENT_ENTROPY
>   default 2048 if PARISC
>   default 1536 if (!64BIT && XTENSA)
> + default 1280 if KASAN && !64BIT
>   default 1024 if !64BIT
>   default 2048 if 64BIT
>   help

Note this also fixes 61 warnings when

  (GCC && !GCC_PLUGIN_LATENT_ENTROPY)

... which as Arnd says should not be enabled by default.  We'll
address that issue once this set has been applied.

-- 
Lee Jones [李琼斯]


[PATCH v2 2/2] Kconfig.debug: Provide a little extra FRAME_WARN leeway when KASAN is enabled

2022-11-25 Thread Lee Jones
When enabled, KASAN enlarges function's stack-frames.  Pushing quite a
few over the current threshold.  This can mainly be seen on 32-bit
architectures where the present limit (when !GCC) is a lowly
1024-Bytes.

Signed-off-by: Lee Jones 
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c3c0b077ade33..82d475168db95 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -399,6 +399,7 @@ config FRAME_WARN
default 2048 if GCC_PLUGIN_LATENT_ENTROPY
default 2048 if PARISC
default 1536 if (!64BIT && XTENSA)
+   default 1280 if KASAN && !64BIT
default 1024 if !64BIT
default 2048 if 64BIT
help
-- 
2.38.1.584.g0f3c55d4c2-goog



[PATCH v2 1/2] drm/amdgpu: Temporarily disable broken Clang builds due to blown stack-frame

2022-11-25 Thread Lee Jones
calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 || ARM64)
architectures built with Clang (all released versions), whereby the stack
frame gets blown up to well over 5k.  This would cause an immediate kernel
panic on most architectures.  We'll revert this when the following bug report
has been resolved: https://github.com/llvm/llvm-project/issues/41896.

Suggested-by: Arnd Bergmann 
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/Kconfig | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/Kconfig 
b/drivers/gpu/drm/amd/display/Kconfig
index 6925e0280dbe6..f4f3d2665a6b2 100644
--- a/drivers/gpu/drm/amd/display/Kconfig
+++ b/drivers/gpu/drm/amd/display/Kconfig
@@ -5,6 +5,7 @@ menu "Display Engine Configuration"
 config DRM_AMD_DC
bool "AMD DC - Enable new display engine"
default y
+   depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
select SND_HDA_COMPONENT if SND_HDA_CORE
select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128)
help
@@ -12,6 +13,12 @@ config DRM_AMD_DC
  support for AMDGPU. This adds required support for Vega and
  Raven ASICs.
 
+ calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 
|| ARM64)
+ architectures built with Clang (all released versions), whereby the 
stack
+ frame gets blown up to well over 5k.  This would cause an immediate 
kernel
+ panic on most architectures.  We'll revert this when the following 
bug report
+ has been resolved: https://github.com/llvm/llvm-project/issues/41896.
+
 config DRM_AMD_DC_DCN
def_bool n
help
-- 
2.38.1.584.g0f3c55d4c2-goog



[PATCH v2 0/2] Fix a bunch of allmodconfig errors

2022-11-25 Thread Lee Jones
Since b339ec9c229aa ("kbuild: Only default to -Werror if COMPILE_TEST") WERROR 
now defaults to COMPILE_TEST meaning that it's enabled for allmodconfig
builds.  This leads to some interesting failures, each resolved in this set.   
   
With this set applied, I am able to obtain a successful allmodconfig Arm build.

v1 => v2:
 - Remove superfluous change (these two override it)
 - Mark only DRM_AMD_DC ("the new display engine) as Broken
 - Change logic to only *include* working arches, not *preclude* them

Lee Jones (2):
  drm/amdgpu: Temporarily disable broken Clang builds due to blown
stack-frame
  Kconfig.debug: Provide a little extra FRAME_WARN leeway when KASAN is
enabled

 drivers/gpu/drm/amd/display/Kconfig | 7 +++
 lib/Kconfig.debug   | 1 +
 2 files changed, 8 insertions(+)

-- 
2.38.1.584.g0f3c55d4c2-goog



[PATCH 3/3] Kconfig.debug: Provide a little extra FRAME_WARN leeway when KASAN is enabled

2022-11-25 Thread Lee Jones
When enabled, KASAN enlarges function's stack-frames.  Pushing quite a
few over the current threshold.  This can mainly be seen on 32-bit
architectures where the present limit (when !GCC) is a lowly
1024-Bytes.

Signed-off-by: Lee Jones 
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c3c0b077ade33..82d475168db95 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -399,6 +399,7 @@ config FRAME_WARN
default 2048 if GCC_PLUGIN_LATENT_ENTROPY
default 2048 if PARISC
default 1536 if (!64BIT && XTENSA)
+   default 1280 if KASAN && !64BIT
default 1024 if !64BIT
default 2048 if 64BIT
help
-- 
2.38.1.584.g0f3c55d4c2-goog



[PATCH 2/3] drm/amdgpu: Temporarily disable broken Clang builds due to blown stack-frame

2022-11-25 Thread Lee Jones
calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 || ARM64)
architectures built with Clang (all released versions), whereby the stack
frame gets blown up to well over 5k.  This would cause an immediate kernel
panic on most architectures.  We'll revert this when the following bug report
has been resolved: https://github.com/llvm/llvm-project/issues/41896.

Suggested-by: Arnd Bergmann 
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/Kconfig | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 34f5a092c99e7..1fa7b9760adb8 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -265,6 +265,7 @@ source "drivers/gpu/drm/radeon/Kconfig"
 
 config DRM_AMDGPU
tristate "AMD GPU"
+   depends on BROKEN || !CC_IS_CLANG || !(X86_64 || SPARC64 || ARM64)
depends on DRM && PCI && MMU
select FW_LOADER
select DRM_DISPLAY_DP_HELPER
@@ -289,6 +290,12 @@ config DRM_AMDGPU
help
  Choose this option if you have a recent AMD Radeon graphics card.
 
+ calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 
|| ARM64)
+ architectures built with Clang (all released versions), whereby the 
stack
+ frame gets blown up to well over 5k.  This would cause an immediate 
kernel
+ panic on most architectures.  We'll revert this when the following 
bug report
+ has been resolved: https://github.com/llvm/llvm-project/issues/41896.
+
  If M is selected, the module will be called amdgpu.
 
 source "drivers/gpu/drm/amd/amdgpu/Kconfig"
-- 
2.38.1.584.g0f3c55d4c2-goog



[PATCH 1/3] drm/amd/display/dc/calcs/dce_calcs: Break-out a stack-heavy chunk of code

2022-11-25 Thread Lee Jones
bw_calcs() presently blows the stack-frame limit by calling functions
inside a argument list which return quite a bit of data to be passed
onto sub-functions.  Simply breaking out this hunk reduces the
stack-frame use by 500 Bytes, preventing the following compiler
warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/dce_calcs.c:3285:6:
  warning: stack frame size (1384) exceeds limit (1024)
in 'bw_calcs' [-Wframe-larger-than]
bool bw_calcs(struct dc_context *ctx,
 ^
1 warning generated.

This resolves the issue and takes us one step closer towards a
successful allmodconfig WERROR build.

Signed-off-by: Lee Jones 
---
 .../drm/amd/display/dc/dml/calcs/dce_calcs.c  | 483 +-
 1 file changed, 245 insertions(+), 238 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c 
b/drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c
index 0100a6053ab6b..ce5918830c030 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c
@@ -3034,6 +3034,248 @@ static bool all_displays_in_sync(const struct pipe_ctx 
pipe[],
return true;
 }
 
+void bw_calcs_mid_phase(struct dc_context *ctx, const struct bw_calcs_dceip 
*dceip,
+   const struct bw_calcs_vbios *vbios, struct 
dce_bw_output *calcs_output,
+   struct bw_fixed low_sclk, struct bw_fixed mid1_sclk,
+   struct bw_fixed mid2_sclk, struct bw_fixed mid3_sclk,
+   struct bw_fixed mid_yclk, struct bw_calcs_data *data)
+{
+   ((struct bw_calcs_vbios *)vbios)->low_sclk = mid3_sclk;
+   ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid3_sclk;
+   ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid3_sclk;
+   calculate_bandwidth(dceip, vbios, data);
+
+   calcs_output->nbp_state_change_wm_ns[0].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  
nbp_state_change_watermark[4],bw_int_to_fixed(1000)));
+   calcs_output->nbp_state_change_wm_ns[1].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[5], 
bw_int_to_fixed(1000)));
+   calcs_output->nbp_state_change_wm_ns[2].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[6], 
bw_int_to_fixed(1000)));
+
+   if (ctx->dc->caps.max_slave_planes) {
+   calcs_output->nbp_state_change_wm_ns[3].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[0], 
bw_int_to_fixed(1000)));
+   calcs_output->nbp_state_change_wm_ns[4].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[1], 
bw_int_to_fixed(1000)));
+   } else {
+   calcs_output->nbp_state_change_wm_ns[3].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[7], 
bw_int_to_fixed(1000)));
+   calcs_output->nbp_state_change_wm_ns[4].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[8], 
bw_int_to_fixed(1000)));
+   }
+   calcs_output->nbp_state_change_wm_ns[5].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  nbp_state_change_watermark[9], 
bw_int_to_fixed(1000)));
+
+   calcs_output->stutter_exit_wm_ns[0].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[4], 
bw_int_to_fixed(1000)));
+   calcs_output->stutter_exit_wm_ns[1].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[5], 
bw_int_to_fixed(1000)));
+   calcs_output->stutter_exit_wm_ns[2].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[6], 
bw_int_to_fixed(1000)));
+   if (ctx->dc->caps.max_slave_planes) {
+   calcs_output->stutter_exit_wm_ns[3].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[0], 
bw_int_to_fixed(1000)));
+   calcs_output->stutter_exit_wm_ns[4].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[1], 
bw_int_to_fixed(1000)));
+   } else {
+   calcs_output->stutter_exit_wm_ns[3].b_mark =
+   bw_fixed_to_int(bw_mul(data->
+  stutter_exit_watermark[7], 
bw_int_to_

[PATCH 0/3] Fix a bunch of allmodconfig errors

2022-11-25 Thread Lee Jones
Since b339ec9c229aa ("kbuild: Only default to -Werror if COMPILE_TEST") WERROR
now defaults to COMPILE_TEST meaning that it's enabled for allmodconfig
builds.  This leads to some interesting failures, each resolved in this set.

With this set applied, I am able to obtain a successful allmodconfig Arm build.

Lee Jones (3):
  drm/amd/display/dc/calcs/dce_calcs: Break-out a stack-heavy chunk of
code
  drm/amdgpu: Temporarily disable broken Clang builds due to blown
stack-frame
  Kconfig.debug: Provide a little extra FRAME_WARN leeway when KASAN is
enabled

 drivers/gpu/drm/Kconfig   |   7 +
 .../drm/amd/display/dc/dml/calcs/dce_calcs.c  | 483 +-
 lib/Kconfig.debug |   1 +
 3 files changed, 253 insertions(+), 238 deletions(-)


-- 
2.38.1.584.g0f3c55d4c2-goog



Re: [PATCH 5.10 1/1] drm/amdgpu: Ensure the AMDGPU file descriptor is legitimate

2022-05-09 Thread Lee Jones
On Thu, 14 Apr 2022, Greg KH wrote:

> On Tue, Apr 12, 2022 at 04:20:57PM +0100, Lee Jones wrote:
> > [ Upstream commit b40a6ab2cf9213923bf8e821ce7fa7f6a0a26990 ]
> > 
> > This is a partial cherry-pick of the above upstream commit.
> > 
> > It ensures the file descriptor passed in by userspace is a valid one.
> > 
> > Cc: Felix Kuehling 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 +++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> Now queued up, thanks.

Could you also back-port this into v5.4 please?

FYI, in the v5.10.y tree, it's now called:

  f0c31f192f38c drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH 4.19 2/2] drm/amdgpu: Ensure the AMDGPU file descriptor is legitimate

2022-04-12 Thread Lee Jones
[ Upstream commit b40a6ab2cf9213923bf8e821ce7fa7f6a0a26990 ]

This is a partial cherry-pick of the above upstream commit.

It ensures the file descriptor passed in by userspace is a valid one.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index f92597c292fe5..4488aad64643b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1044,11 +1044,15 @@ int amdgpu_amdkfd_gpuvm_acquire_process_vm(struct 
kgd_dev *kgd,
   struct dma_fence **ef)
 {
struct amdgpu_device *adev = get_amdgpu_device(kgd);
-   struct drm_file *drm_priv = filp->private_data;
-   struct amdgpu_fpriv *drv_priv = drm_priv->driver_priv;
-   struct amdgpu_vm *avm = &drv_priv->vm;
+   struct amdgpu_fpriv *drv_priv;
+   struct amdgpu_vm *avm;
int ret;
 
+   ret = amdgpu_file_to_fpriv(filp, &drv_priv);
+   if (ret)
+   return ret;
+   avm = &drv_priv->vm;
+
/* Already a compute VM? */
if (avm->process_info)
return -EINVAL;
-- 
2.35.1.1178.g4f1659d476-goog



[PATCH 4.19 1/2] drm/amdgpu: Check if fd really is an amdgpu fd.

2022-04-12 Thread Lee Jones
From: Bas Nieuwenhuizen 

[ Upstream commit 021830d24ba55a578f602979274965344c8e6284 ]

Otherwise we interpret the file private data as drm & amdgpu data
while it might not be, possibly allowing one to get memory corruption.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Bas Nieuwenhuizen 
Reviewed-by: Christian König 
Signed-off-by: Alex Deucher 
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  2 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   | 16 
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 10 +++---
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 447c4c7a36d68..acbd33fcb73d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -955,6 +955,8 @@ struct amdgpu_gfx {
DECLARE_BITMAP  (pipe_reserve_bitmap, 
AMDGPU_MAX_COMPUTE_QUEUES);
 };
 
+int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv);
+
 int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  unsigned size, struct amdgpu_ib *ib);
 void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 63b1e325b45c5..b3b22a87b232b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1132,6 +1132,22 @@ static const struct file_operations 
amdgpu_driver_kms_fops = {
 #endif
 };
 
+int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv)
+{
+struct drm_file *file;
+
+   if (!filp)
+   return -EINVAL;
+
+   if (filp->f_op != &amdgpu_driver_kms_fops) {
+   return -EINVAL;
+   }
+
+   file = filp->private_data;
+   *fpriv = file->driver_priv;
+   return 0;
+}
+
 static bool
 amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
 bool in_vblank_irq, int *vpos, int *hpos,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index 1cafe8d83a4db..0b70410488b66 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
@@ -54,16 +54,20 @@ static int amdgpu_sched_process_priority_override(struct 
amdgpu_device *adev,
  enum drm_sched_priority 
priority)
 {
struct file *filp = fget(fd);
-   struct drm_file *file;
struct amdgpu_fpriv *fpriv;
struct amdgpu_ctx *ctx;
uint32_t id;
+   int r;
 
if (!filp)
return -EINVAL;
 
-   file = filp->private_data;
-   fpriv = file->driver_priv;
+   r = amdgpu_file_to_fpriv(filp, &fpriv);
+   if (r) {
+   fput(filp);
+   return r;
+   }
+
idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
amdgpu_ctx_priority_override(ctx, priority);
 
-- 
2.35.1.1178.g4f1659d476-goog



[PATCH 5.10 1/1] drm/amdgpu: Ensure the AMDGPU file descriptor is legitimate

2022-04-12 Thread Lee Jones
[ Upstream commit b40a6ab2cf9213923bf8e821ce7fa7f6a0a26990 ]

This is a partial cherry-pick of the above upstream commit.

It ensures the file descriptor passed in by userspace is a valid one.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 26f8a21383774..1b4c7ced8b92c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1024,11 +1024,15 @@ int amdgpu_amdkfd_gpuvm_acquire_process_vm(struct 
kgd_dev *kgd,
   struct dma_fence **ef)
 {
struct amdgpu_device *adev = get_amdgpu_device(kgd);
-   struct drm_file *drm_priv = filp->private_data;
-   struct amdgpu_fpriv *drv_priv = drm_priv->driver_priv;
-   struct amdgpu_vm *avm = &drv_priv->vm;
+   struct amdgpu_fpriv *drv_priv;
+   struct amdgpu_vm *avm;
int ret;
 
+   ret = amdgpu_file_to_fpriv(filp, &drv_priv);
+   if (ret)
+   return ret;
+   avm = &drv_priv->vm;
+
/* Already a compute VM? */
if (avm->process_info)
return -EINVAL;
-- 
2.35.1.1178.g4f1659d476-goog



[PATCH v2 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-04-01 Thread Lee Jones
This ensures userspace cannot prematurely clean-up the client before
it is fully initialised which has been proven to cause issues in the
past.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---

CAVEAT: This patch is completely untested
I can't seem to find a configuration strategy to compile test this
allyesconfig and allmodconfig do not appear sufficient

v2: Also remove Client from RCU list in error path

 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 24 +
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index e4beebb1c80a2..f2e1d506ba211 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -247,15 +247,6 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
return ret;
}
 
-   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
-  O_RDWR);
-   if (ret < 0) {
-   kfifo_free(&client->fifo);
-   kfree(client);
-   return ret;
-   }
-   *fd = ret;
-
init_waitqueue_head(&client->wait_queue);
spin_lock_init(&client->lock);
client->events = 0;
@@ -265,5 +256,20 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
list_add_rcu(&client->list, &dev->smi_clients);
spin_unlock(&dev->smi_lock);
 
+   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
+  O_RDWR);
+   if (ret < 0) {
+   spin_lock(&dev->smi_lock);
+   list_del_rcu(&client->list);
+   spin_unlock(&dev->smi_lock);
+
+   synchronize_rcu();
+
+   kfifo_free(&client->fifo);
+   kfree(client);
+   return ret;
+   }
+   *fd = ret;
+
return 0;
 }
-- 
2.35.1.1021.g381101b075-goog



Re: [PATCH v2 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-04-01 Thread Lee Jones
On Fri, 01 Apr 2022, Lee Jones wrote:

> This ensures userspace cannot prematurely clean-up the client before
> it is fully initialised which has been proven to cause issues in the
> past.
> 
> Cc: Felix Kuehling 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: "Pan, Xinhui" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---
> 
> CAVEAT: This patch is completely untested
> I can't seem to find a configuration strategy to compile test this
> allyesconfig and allmodconfig do not appear sufficient
> 
> v2: Also remove Client from RCU list in error path
> 
>  drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 24 +
>  1 file changed, 15 insertions(+), 9 deletions(-)

Please ignore this re-submission, script error.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v2 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-03-31 Thread Lee Jones
On Thu, 31 Mar 2022, Felix Kuehling wrote:

> 
> Am 2022-03-31 um 08:21 schrieb Lee Jones:
> > This ensures userspace cannot prematurely clean-up the client before
> > it is fully initialised which has been proven to cause issues in the
> > past.
> > 
> > Cc: Felix Kuehling 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: "Pan, Xinhui" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> 
> Reviewed-by: Felix Kuehling 
> 
> I will apply to patch to amd-staging-drm-next.
> 
> > ---
> > 
> > CAVEAT: This patch is completely untested
> >  I can't seem to find a configuration strategy to compile test this
> >  allyesconfig and allmodconfig do not appear sufficient
> 
> That's very strange. It should get compiled if CONFIG_HSA_AMD is
> enabled.

Okay, I figured it out.

Apparently you can't give 'drivers/gpu/drm/amd' as a build param.

'drivers/gpu/drm' works as I expect however.

> I will at least compile-test it before I submit.

Great, thank you.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH v2 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-03-31 Thread Lee Jones
This ensures userspace cannot prematurely clean-up the client before
it is fully initialised which has been proven to cause issues in the
past.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---

CAVEAT: This patch is completely untested
I can't seem to find a configuration strategy to compile test this
allyesconfig and allmodconfig do not appear sufficient

v2: Also remove Client from RCU list in error path

 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 24 +
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index e4beebb1c80a2..f2e1d506ba211 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -247,15 +247,6 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
return ret;
}
 
-   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
-  O_RDWR);
-   if (ret < 0) {
-   kfifo_free(&client->fifo);
-   kfree(client);
-   return ret;
-   }
-   *fd = ret;
-
init_waitqueue_head(&client->wait_queue);
spin_lock_init(&client->lock);
client->events = 0;
@@ -265,5 +256,20 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
list_add_rcu(&client->list, &dev->smi_clients);
spin_unlock(&dev->smi_lock);
 
+   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
+  O_RDWR);
+   if (ret < 0) {
+   spin_lock(&dev->smi_lock);
+   list_del_rcu(&client->list);
+   spin_unlock(&dev->smi_lock);
+
+   synchronize_rcu();
+
+   kfifo_free(&client->fifo);
+   kfree(client);
+   return ret;
+   }
+   *fd = ret;
+
return 0;
 }
-- 
2.35.1.1021.g381101b075-goog



Re: [PATCH 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-03-30 Thread Lee Jones
On Wed, 30 Mar 2022, Felix Kuehling wrote:

> 
> Am 2022-03-30 um 03:51 schrieb Lee Jones:
> > This ensures userspace cannot prematurely clean-up the client before
> > it is fully initialised which has been proven to cause issues in the
> > past.
> > 
> > Cc: Felix Kuehling 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: "Pan, Xinhui" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >   drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 18 +-
> >   1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> > b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > index e4beebb1c80a2..c5d5398d45cbf 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > @@ -247,15 +247,6 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t 
> > *fd)
> > return ret;
> > }
> > -   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
> > -  O_RDWR);
> > -   if (ret < 0) {
> > -   kfifo_free(&client->fifo);
> > -   kfree(client);
> > -   return ret;
> > -   }
> > -   *fd = ret;
> > -
> > init_waitqueue_head(&client->wait_queue);
> > spin_lock_init(&client->lock);
> > client->events = 0;
> > @@ -265,5 +256,14 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t 
> > *fd)
> > list_add_rcu(&client->list, &dev->smi_clients);
> > spin_unlock(&dev->smi_lock);
> > +   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
> > +  O_RDWR);
> > +   if (ret < 0) {
> 
> Thank you for the patch. This looks like the correct solution. But you also
> need to remove the client from the dev->smi_clients list here before
> kfree(client). With that fixed, the patch is

Yes, that makes perfect sense.

> Reviewed-by: Felix Kuehling 

Thanks Felix.  I will provide a follow-up tomorrow.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH 1/1] drm/amdkfd: Create file descriptor after client is added to smi_clients list

2022-03-30 Thread Lee Jones
This ensures userspace cannot prematurely clean-up the client before
it is fully initialised which has been proven to cause issues in the
past.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index e4beebb1c80a2..c5d5398d45cbf 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -247,15 +247,6 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
return ret;
}
 
-   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
-  O_RDWR);
-   if (ret < 0) {
-   kfifo_free(&client->fifo);
-   kfree(client);
-   return ret;
-   }
-   *fd = ret;
-
init_waitqueue_head(&client->wait_queue);
spin_lock_init(&client->lock);
client->events = 0;
@@ -265,5 +256,14 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
list_add_rcu(&client->list, &dev->smi_clients);
spin_unlock(&dev->smi_lock);
 
+   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
+  O_RDWR);
+   if (ret < 0) {
+   kfifo_free(&client->fifo);
+   kfree(client);
+   return ret;
+   }
+   *fd = ret;
+
return 0;
 }
-- 
2.35.1.1021.g381101b075-goog



Re: [PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-23 Thread Lee Jones
On Thu, 17 Mar 2022, Lee Jones wrote:

> On Thu, 17 Mar 2022, philip yang wrote:
> 
> >On 2022-03-17 11:13 a.m., Lee Jones wrote:
> > 
> > On Thu, 17 Mar 2022, Felix Kuehling wrote:
> > 
> > 
> > Am 2022-03-17 um 11:00 schrieb Lee Jones:
> > 
> > Good afternoon Felix,
> > 
> > Thanks for your review.
> > 
> > 
> > Am 2022-03-17 um 09:16 schrieb Lee Jones:
> > 
> > Presently the Client can be freed whilst still in use.
> > 
> > Use the already provided lock to prevent this.
> > 
> > Cc: Felix Kuehling [1]
> > Cc: Alex Deucher [2]
> > Cc: "Christian König" [3]
> > Cc: "Pan, Xinhui" [4]
> > Cc: David Airlie [5]
> > Cc: Daniel Vetter [6]
> > Cc: [7]amd-gfx@lists.freedesktop.org
> > Cc: [8]dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones [9]
> > ---
> >drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
> >1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> > b/drivers/gpu/drm/amd/a
> > mdkfd/kfd_smi_events.c
> > index e4beebb1c80a2..3b9ac1e87231f 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > @@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, 
> > struct f
> > ile *filep)
> > spin_unlock(&dev->smi_lock);
> > synchronize_rcu();
> > +
> > +   spin_lock(&client->lock);
> > kfifo_free(&client->fifo);
> > kfree(client);
> > +   spin_unlock(&client->lock);
> > 
> > The spin_unlock is after the spinlock data structure has been freed.
> > 
> > Good point.
> > 
> > If we go forward with this approach the unlock should perhaps be moved
> > to just before the kfree().
> > 
> > 
> > There
> > should be no concurrent users here, since we are freeing the data structure.
> > If there still are concurrent users at this point, they will crash anyway.
> > So the locking is unnecessary.
> > 
> > The users may well crash, as does the kernel unfortunately.
> > 
> > We only get to kfd_smi_ev_release when the file descriptor is closed. User
> > mode has no way to use the client any more at this point. This function also
> > removes the client from the dev->smi_cllients list. So no more events will
> > be added to the client. Therefore it is safe to free the client.
> > 
> > If any of the above were not true, it would not be safe to kfree(client).
> > 
> > But if it is safe to kfree(client), then there is no need for the locking.
> > 
> > I'm not keen to go into too much detail until it's been patched.
> > 
> > However, there is a way to free the client while it is still in use.
> > 
> > Remember we are multi-threaded.
> > 
> >files_struct->count refcount is used to handle this race, as
> >vfs_read/vfs_write takes file refcount and fput calls release only if
> >refcount is 1, to guarantee that read/write from user space is finished
> >here.
> > 
> >Another race is driver add_event_to_kfifo while closing the handler. We
> >use rcu_read_lock in add_event_to_kfifo, and kfd_smi_ev_release calls
> >synchronize_rcu to wait for all rcu_read done. So it is safe to call
> >kfifo_free(&client->fifo) and kfree(client).
> 
> Philip, please reach out to Felix.

Philip, Felix, are you receiving my direct messages?

I have a feeling they're being filtered out by AMD's mail server.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-17 Thread Lee Jones
On Thu, 17 Mar 2022, philip yang wrote:

>On 2022-03-17 11:13 a.m., Lee Jones wrote:
> 
> On Thu, 17 Mar 2022, Felix Kuehling wrote:
> 
> 
> Am 2022-03-17 um 11:00 schrieb Lee Jones:
> 
> Good afternoon Felix,
> 
> Thanks for your review.
> 
> 
> Am 2022-03-17 um 09:16 schrieb Lee Jones:
> 
> Presently the Client can be freed whilst still in use.
> 
> Use the already provided lock to prevent this.
> 
> Cc: Felix Kuehling [1]
> Cc: Alex Deucher [2]
> Cc: "Christian König" [3]
> Cc: "Pan, Xinhui" [4]
> Cc: David Airlie [5]
> Cc: Daniel Vetter [6]
> Cc: [7]amd-gfx@lists.freedesktop.org
> Cc: [8]dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones [9]
> ---
>drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
>1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> b/drivers/gpu/drm/amd/a
> mdkfd/kfd_smi_events.c
> index e4beebb1c80a2..3b9ac1e87231f 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> @@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, 
> struct f
> ile *filep)
> spin_unlock(&dev->smi_lock);
> synchronize_rcu();
> +
> +   spin_lock(&client->lock);
> kfifo_free(&client->fifo);
> kfree(client);
> +   spin_unlock(&client->lock);
> 
> The spin_unlock is after the spinlock data structure has been freed.
> 
> Good point.
> 
> If we go forward with this approach the unlock should perhaps be moved
> to just before the kfree().
> 
> 
> There
> should be no concurrent users here, since we are freeing the data structure.
> If there still are concurrent users at this point, they will crash anyway.
> So the locking is unnecessary.
> 
> The users may well crash, as does the kernel unfortunately.
> 
> We only get to kfd_smi_ev_release when the file descriptor is closed. User
> mode has no way to use the client any more at this point. This function also
> removes the client from the dev->smi_cllients list. So no more events will
> be added to the client. Therefore it is safe to free the client.
> 
> If any of the above were not true, it would not be safe to kfree(client).
> 
> But if it is safe to kfree(client), then there is no need for the locking.
> 
> I'm not keen to go into too much detail until it's been patched.
> 
> However, there is a way to free the client while it is still in use.
> 
> Remember we are multi-threaded.
> 
>files_struct->count refcount is used to handle this race, as
>vfs_read/vfs_write takes file refcount and fput calls release only if
>refcount is 1, to guarantee that read/write from user space is finished
>here.
> 
>Another race is driver add_event_to_kfifo while closing the handler. We
>use rcu_read_lock in add_event_to_kfifo, and kfd_smi_ev_release calls
>synchronize_rcu to wait for all rcu_read done. So it is safe to call
>kfifo_free(&client->fifo) and kfree(client).

Philip, please reach out to Felix.

We have discussed this in more detail off-line.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-17 Thread Lee Jones
On Thu, 17 Mar 2022, Felix Kuehling wrote:

> 
> Am 2022-03-17 um 11:00 schrieb Lee Jones:
> > Good afternoon Felix,
> > 
> > Thanks for your review.
> > 
> > > Am 2022-03-17 um 09:16 schrieb Lee Jones:
> > > > Presently the Client can be freed whilst still in use.
> > > > 
> > > > Use the already provided lock to prevent this.
> > > > 
> > > > Cc: Felix Kuehling 
> > > > Cc: Alex Deucher 
> > > > Cc: "Christian König" 
> > > > Cc: "Pan, Xinhui" 
> > > > Cc: David Airlie 
> > > > Cc: Daniel Vetter 
> > > > Cc: amd-gfx@lists.freedesktop.org
> > > > Cc: dri-de...@lists.freedesktop.org
> > > > Signed-off-by: Lee Jones 
> > > > ---
> > > >drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
> > > >1 file changed, 6 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> > > > b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > > > index e4beebb1c80a2..3b9ac1e87231f 100644
> > > > --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > > > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > > > @@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, 
> > > > struct file *filep)
> > > > spin_unlock(&dev->smi_lock);
> > > > synchronize_rcu();
> > > > +
> > > > +   spin_lock(&client->lock);
> > > > kfifo_free(&client->fifo);
> > > > kfree(client);
> > > > +   spin_unlock(&client->lock);
> > > The spin_unlock is after the spinlock data structure has been freed.
> > Good point.
> > 
> > If we go forward with this approach the unlock should perhaps be moved
> > to just before the kfree().
> > 
> > > There
> > > should be no concurrent users here, since we are freeing the data 
> > > structure.
> > > If there still are concurrent users at this point, they will crash anyway.
> > > So the locking is unnecessary.
> > The users may well crash, as does the kernel unfortunately.
> We only get to kfd_smi_ev_release when the file descriptor is closed. User
> mode has no way to use the client any more at this point. This function also
> removes the client from the dev->smi_cllients list. So no more events will
> be added to the client. Therefore it is safe to free the client.
> 
> If any of the above were not true, it would not be safe to kfree(client).
> 
> But if it is safe to kfree(client), then there is no need for the locking.

I'm not keen to go into too much detail until it's been patched.

However, there is a way to free the client while it is still in use.

Remember we are multi-threaded.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-17 Thread Lee Jones
Good afternoon Felix,

Thanks for your review.

> Am 2022-03-17 um 09:16 schrieb Lee Jones:
> > Presently the Client can be freed whilst still in use.
> > 
> > Use the already provided lock to prevent this.
> > 
> > Cc: Felix Kuehling 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: "Pan, Xinhui" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >   drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
> >   1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> > b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > index e4beebb1c80a2..3b9ac1e87231f 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> > @@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, 
> > struct file *filep)
> > spin_unlock(&dev->smi_lock);
> > synchronize_rcu();
> > +
> > +   spin_lock(&client->lock);
> > kfifo_free(&client->fifo);
> > kfree(client);
> > +   spin_unlock(&client->lock);
> 
> The spin_unlock is after the spinlock data structure has been freed.

Good point.

If we go forward with this approach the unlock should perhaps be moved
to just before the kfree().

> There
> should be no concurrent users here, since we are freeing the data structure.
> If there still are concurrent users at this point, they will crash anyway.
> So the locking is unnecessary.

The users may well crash, as does the kernel unfortunately.

> > return 0;
> >   }
> > @@ -247,11 +250,13 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t 
> > *fd)
> > return ret;
> > }
> > +   spin_lock(&client->lock);
> 
> The client was just allocated, and it wasn't added to the client list or
> given to user mode yet. So there can be no concurrent users at this point.
> The locking is unnecessary.
> 
> There could be potential issues if someone uses the file descriptor by dumb
> luck before this function returns. So maybe we need to move the
> anon_inode_getfd to the end of the function (just before list_add_rcu) so
> that we only create the file descriptor after the client structure is fully
> initialized.

Bingo.  Well done. :)

I can move the function as suggested if that is the best route forward?

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-17 Thread Lee Jones
On Thu, 17 Mar 2022, Lee Jones wrote:

> Presently the Client can be freed whilst still in use.
> 
> Use the already provided lock to prevent this.
> 
> Cc: Felix Kuehling 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: "Pan, Xinhui" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---

I should have clarified here, that:

This patch has only been *build* tested.

Since I have no way to run this on real H/W.

Please ensure this is tested on real H/W before it gets applied, since
it *may* have some undesired side-effects.  For instance, I have no
idea if client->lock plays nicely with dev->smi_lock or whether this
may well end up in deadlock.

TIA.

>  drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
> b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> index e4beebb1c80a2..3b9ac1e87231f 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> @@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, 
> struct file *filep)
>   spin_unlock(&dev->smi_lock);
>  
>   synchronize_rcu();
> +
> + spin_lock(&client->lock);
>   kfifo_free(&client->fifo);
>   kfree(client);
> + spin_unlock(&client->lock);
>  
>   return 0;
>  }
> @@ -247,11 +250,13 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t 
> *fd)
>   return ret;
>   }
>  
> + spin_lock(&client->lock);
>   ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
>  O_RDWR);
>   if (ret < 0) {
>   kfifo_free(&client->fifo);
>   kfree(client);
> + spin_unlock(&client->lock);
>   return ret;
>   }
>   *fd = ret;
> @@ -264,6 +269,7 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
>   spin_lock(&dev->smi_lock);
>   list_add_rcu(&client->list, &dev->smi_clients);
>   spin_unlock(&dev->smi_lock);
> + spin_unlock(&client->lock);
>  
>   return 0;
>  }

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH 1/1] drm/amdkfd: Protect the Client whilst it is being operated on

2022-03-17 Thread Lee Jones
Presently the Client can be freed whilst still in use.

Use the already provided lock to prevent this.

Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: "Pan, Xinhui" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index e4beebb1c80a2..3b9ac1e87231f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -145,8 +145,11 @@ static int kfd_smi_ev_release(struct inode *inode, struct 
file *filep)
spin_unlock(&dev->smi_lock);
 
synchronize_rcu();
+
+   spin_lock(&client->lock);
kfifo_free(&client->fifo);
kfree(client);
+   spin_unlock(&client->lock);
 
return 0;
 }
@@ -247,11 +250,13 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
return ret;
}
 
+   spin_lock(&client->lock);
ret = anon_inode_getfd(kfd_smi_name, &kfd_smi_ev_fops, (void *)client,
   O_RDWR);
if (ret < 0) {
kfifo_free(&client->fifo);
kfree(client);
+   spin_unlock(&client->lock);
return ret;
}
*fd = ret;
@@ -264,6 +269,7 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)
spin_lock(&dev->smi_lock);
list_add_rcu(&client->list, &dev->smi_clients);
spin_unlock(&dev->smi_lock);
+   spin_unlock(&client->lock);
 
return 0;
 }
-- 
2.35.1.894.gb6a874cedc-goog



Re: [RESEND 00/26] Rid W=1 warnings from GPU

2021-06-03 Thread Lee Jones
On Thu, 03 Jun 2021, Daniel Vetter wrote:

> On Wed, Jun 02, 2021 at 03:32:34PM +0100, Lee Jones wrote:
> > Some off these patches have been knocking around for a while.
> > 
> > Who will hoover them up please?
> > 
> > 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 (26):
> >   drm/mediatek/mtk_disp_color: Strip incorrect doc and demote header
> >   drm/mediatek/mtk_disp_gamma: Strip and demote non-conformant
> > kernel-doc header
> >   drm/mediatek/mtk_disp_ovl: Strip and demote non-conformant header
> >   drm/mediatek/mtk_disp_rdma: Strip and demote non-conformant kernel-doc
> > header
> >   drm/sti/sti_hdmi_tx3g4c28phy: Provide function names for kernel-doc
> > headers
> >   drm/sti/sti_hda: Provide missing function names
> >   drm/sti/sti_tvout: Provide a bunch of missing function names
> >   drm/sti/sti_hqvdp: Fix incorrectly named function 'sti_hqvdp_vtg_cb()'
> >   drm/msm/disp/dpu1/dpu_encoder_phys_cmd: Remove unused variable
> > 'cmd_enc'
> >   drm/msm/disp/dpu1/dpu_hw_interrupts: Demote a bunch of kernel-doc
> > abuses
> >   drm/msm/disp/dpu1/dpu_plane: Fix a couple of naming issues
> >   drm/msm/msm_gem: Demote kernel-doc abuses
> >   drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog'
> >   drm/msm/dp/dp_link: Fix some potential doc-rot
> >   drm/nouveau/nvkm/subdev/mc/tu102: Make functions called by reference
> > static
> >   drm/amd/display/dc/dce/dce_transform: Remove superfluous
> > re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,
> >   drm/xlnx/zynqmp_disp: Fix incorrectly named enum
> > 'zynqmp_disp_layer_id'
> >   drm/xlnx/zynqmp_dp: Fix incorrectly name function 'zynqmp_dp_train()'
> >   drm/ttm/ttm_tt: Demote non-conformant kernel-doc header
> >   drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse
> >   drm/panel/panel-sitronix-st7701: Demote kernel-doc abuse
> >   drm/vgem/vgem_drv: Standard comment blocks should not use kernel-doc
> > format
> >   drm/exynos/exynos7_drm_decon: Fix incorrect naming of
> > 'decon_shadow_protect_win()'
> >   drm/exynos/exynos_drm_ipp: Fix documentation for
> > 'exynos_drm_ipp_get_{caps,res}_ioctl()'
> >   drm/vboxvideo/hgsmi_base: Place function names into headers
> >   drm/vboxvideo/modesetting: Provide function names for prototype
> > headers
> 
> Except for msm (Rob Clark promised on irc he'll pick them up for 5.14
> soon) and amd (Alex is on top of things I think) I picked them all up and
> merged into drm-misc-next.

Superstar!  Thanks Daniel.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [RESEND 16/26] drm/amd/display/dc/dce/dce_transform: Remove superfluous re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,

2021-06-02 Thread Lee Jones
On Wed, 02 Jun 2021, Alex Deucher wrote:

> On Wed, Jun 2, 2021 at 10:33 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: 
> > warning: no previous prototype for 
> > ‘mod_hdcp_hdcp1_get_link_encryption_status’
> >  In file included from 
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:
> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: 
> > warning: initialized field overwritten [-Woverride-init]
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: 
> > note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: 
> > in expansion of macro ‘SRI’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: 
> > note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: 
> > note: in expansion of macro ‘transform_regs’
> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: 
> > note: (near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: 
> > note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: 
> > in expansion of macro ‘SRI’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: 
> > note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: 
> > note: in expansion of macro ‘transform_regs’
> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: 
> > warning: initialized field overwritten [-Woverride-init]
> >
> > Cc: Harry Wentland 
> > Cc: Leo Li 
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: Mauro Rossi 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h 
> > b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
> > index cbce194ec7b82..e98b5d4141739 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
> > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
> > @@ -166,8 +166,7 @@
> > SRI(SCL_F_SHARP_CONTROL, SCL, id)
> >
> >  #define XFM_COMMON_REG_LIST_DCE60(id) \
> > -   XFM_COMMON_REG_LIST_DCE60_BASE(id), \
> > -   SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)
> > +   XFM_COMMON_REG_LIST_DCE60_BASE(id)
> 
> I believe DCFE_MEM_LIGHT_SLEEP_CNTL should be kept here and it should
> be removed from
> XFM_COMMON_REG_LIST_DCE60_BASE() to align with other asics.

Ack.  Sorry for missing this.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[RESEND 00/26] Rid W=1 warnings from GPU

2021-06-02 Thread Lee Jones
Some off these patches have been knocking around for a while.

Who will hoover them up please?

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 (26):
  drm/mediatek/mtk_disp_color: Strip incorrect doc and demote header
  drm/mediatek/mtk_disp_gamma: Strip and demote non-conformant
kernel-doc header
  drm/mediatek/mtk_disp_ovl: Strip and demote non-conformant header
  drm/mediatek/mtk_disp_rdma: Strip and demote non-conformant kernel-doc
header
  drm/sti/sti_hdmi_tx3g4c28phy: Provide function names for kernel-doc
headers
  drm/sti/sti_hda: Provide missing function names
  drm/sti/sti_tvout: Provide a bunch of missing function names
  drm/sti/sti_hqvdp: Fix incorrectly named function 'sti_hqvdp_vtg_cb()'
  drm/msm/disp/dpu1/dpu_encoder_phys_cmd: Remove unused variable
'cmd_enc'
  drm/msm/disp/dpu1/dpu_hw_interrupts: Demote a bunch of kernel-doc
abuses
  drm/msm/disp/dpu1/dpu_plane: Fix a couple of naming issues
  drm/msm/msm_gem: Demote kernel-doc abuses
  drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog'
  drm/msm/dp/dp_link: Fix some potential doc-rot
  drm/nouveau/nvkm/subdev/mc/tu102: Make functions called by reference
static
  drm/amd/display/dc/dce/dce_transform: Remove superfluous
re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,
  drm/xlnx/zynqmp_disp: Fix incorrectly named enum
'zynqmp_disp_layer_id'
  drm/xlnx/zynqmp_dp: Fix incorrectly name function 'zynqmp_dp_train()'
  drm/ttm/ttm_tt: Demote non-conformant kernel-doc header
  drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse
  drm/panel/panel-sitronix-st7701: Demote kernel-doc abuse
  drm/vgem/vgem_drv: Standard comment blocks should not use kernel-doc
format
  drm/exynos/exynos7_drm_decon: Fix incorrect naming of
'decon_shadow_protect_win()'
  drm/exynos/exynos_drm_ipp: Fix documentation for
'exynos_drm_ipp_get_{caps,res}_ioctl()'
  drm/vboxvideo/hgsmi_base: Place function names into headers
  drm/vboxvideo/modesetting: Provide function names for prototype
headers

 .../drm/amd/display/dc/dce/dce_transform.h|  3 +-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   |  4 +--
 drivers/gpu/drm/mediatek/mtk_disp_color.c |  3 +-
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c |  4 +--
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c   |  3 +-
 drivers/gpu/drm/mediatek/mtk_disp_rdma.c  |  4 +--
 .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c  |  4 ---
 .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 32 +--
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c |  4 +--
 drivers/gpu/drm/msm/dp/dp_catalog.c   |  2 +-
 drivers/gpu/drm/msm/dp/dp_link.c  |  6 ++--
 drivers/gpu/drm/msm/msm_gem.c |  4 +--
 .../gpu/drm/nouveau/nvkm/subdev/mc/tu102.c|  6 ++--
 .../drm/panel/panel-raspberrypi-touchscreen.c |  2 +-
 drivers/gpu/drm/panel/panel-sitronix-st7701.c |  2 +-
 drivers/gpu/drm/sti/sti_hda.c |  6 ++--
 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c|  4 +--
 drivers/gpu/drm/sti/sti_hqvdp.c   |  2 +-
 drivers/gpu/drm/sti/sti_tvout.c   | 18 +--
 drivers/gpu/drm/ttm/ttm_tt.c  |  2 +-
 drivers/gpu/drm/vboxvideo/hgsmi_base.c| 19 +++
 drivers/gpu/drm/vboxvideo/modesetting.c   | 20 +++-
 drivers/gpu/drm/vgem/vgem_drv.c   |  2 +-
 drivers/gpu/drm/xlnx/zynqmp_disp.c|  2 +-
 drivers/gpu/drm/xlnx/zynqmp_dp.c  |  2 +-
 26 files changed, 80 insertions(+), 82 deletions(-)

Cc: Adam Jackson 
Cc: Ajay Kumar 
Cc: Akshu Agarwal 
Cc: Alex Deucher 
Cc: Alistair Popple 
Cc: amd-gfx@lists.freedesktop.org
Cc: AngeloGioacchino Del Regno 
Cc: Benjamin Gaignard 
Cc: Ben Skeggs 
Cc: Ben Widawsky 
Cc: Chandan Uddaraju 
Cc: Christian Koenig 
Cc: "Christian König" 
Cc: Chun-Kuang Hu 
Cc: Daniel Vetter 
Cc: David Airlie 
Cc: dri-de...@lists.freedesktop.org
Cc: Eric Anholt 
Cc: Fabien Dessenne 
Cc: freedr...@lists.freedesktop.org
Cc: Hans de Goede 
Cc: Harry Wentland 
Cc: Huang Rui 
Cc: Hyun Kwon 
Cc: Inki Dae 
Cc: Jagan Teki 
Cc: Joonyoung Shim 
Cc: Krishna Manikandan 
Cc: Krzysztof Kozlowski 
Cc: Kuogee Hsieh 
Cc: Kyungmin Park 
Cc: Laurent Pinchart 
Cc: Leo Li 
Cc: linaro-mm-...@lists.linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-arm-...@vger.kernel.org
Cc: linux-media...@lists.infradead.org
Cc: linux-me...@vger.kernel.org
Cc: linux-samsung-...@vger.kernel.org
Cc: Marek Szyprowski 
Cc: Matthias Brugger 
Cc: Mauro Rossi 
Cc: Michal Simek 
Cc: nouv...@lists.freedesktop.org
Cc: Philipp Zabel 
Cc: Rob Clark 
Cc: Sam Ravnborg 
Cc: Sean Paul 
Cc: Seung-Woo Kim 
Cc: Stephen Boyd 
Cc: Sumit Semwal 
Cc: Thierry Reding 
Cc: Vincent Abriou 
-- 
2.31.1


[RESEND 16/26] drm/amd/display/dc/dce/dce_transform: Remove superfluous re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,

2021-06-02 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: 
no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’
 In file included from 
drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: 
in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: 
(near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: 
in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: 
warning: initialized field overwritten [-Woverride-init]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mauro Rossi 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
index cbce194ec7b82..e98b5d4141739 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
@@ -166,8 +166,7 @@
SRI(SCL_F_SHARP_CONTROL, SCL, id)
 
 #define XFM_COMMON_REG_LIST_DCE60(id) \
-   XFM_COMMON_REG_LIST_DCE60_BASE(id), \
-   SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)
+   XFM_COMMON_REG_LIST_DCE60_BASE(id)
 #endif
 
 #define XFM_SF(reg_name, field_name, post_fix)\
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu/swsmu/aldebaran: fix check in is_dpm_running

2021-05-27 Thread Lee Jones
On Wed, 26 May 2021, Alex Deucher wrote:

> If smu_cmn_get_enabled_mask() fails, return false to be
> consistent with other asics.
> 
> Signed-off-by: Alex Deucher 
> Cc: Lee Jones 
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Lee Jones 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 15/34] drm/amd/display/dc/dce110/dce110_hw_sequencer: Include our own header

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:927:6: 
warning: no previous prototype for ‘dce110_edp_wait_for_T12’ 
[-Wmissing-prototypes]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 5ddeee96bf235..9219db79f32b6 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -63,6 +63,8 @@
 
 #include "atomfirmware.h"
 
+#include "dce110_hw_sequencer.h"
+
 #define GAMMA_HW_POINTS_NUM 256
 
 /*
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 08/34] drm/amd/display/dc/bios/command_table_helper: Fix function name for 'dal_cmd_table_helper_transmitter_bp_to_atom()'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper.c:127: 
warning: expecting prototype for translate_transmitter_bp_to_atom(). Prototype 
was for dal_cmd_table_helper_transmitter_bp_to_atom() instead

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Lee Jones 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c 
b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
index 5b77251e05909..e317a36151477 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
@@ -114,7 +114,7 @@ bool dal_cmd_table_helper_controller_id_to_atom(
 }
 
 /**
- * translate_transmitter_bp_to_atom - Translate the Transmitter to the
+ * dal_cmd_table_helper_transmitter_bp_to_atom - Translate the Transmitter to 
the
  *corresponding ATOM BIOS value
  * @t: transmitter
  * returns: output digitalTransmitter
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 13/34] drm/amd/display/dc/dce/dmub_outbox: Convert over to kernel-doc

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_outbox.c:30: warning: Cannot 
understand  
*

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Rodrigo Siqueira 
Cc: Meenakshikumar Somasundaram 
Cc: Jun Lei 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../gpu/drm/amd/display/dc/dce/dmub_outbox.c| 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_outbox.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_outbox.c
index 295596d1f47f2..faad8555ddbb6 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_outbox.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_outbox.c
@@ -27,19 +27,10 @@
 #include "dmub/inc/dmub_cmd.h"
 
 /**
- *
- *  Function: dmub_enable_outbox_notification
- *
- *  @brief
- * Sends inbox cmd to dmub to enable outbox1 messages with 
interrupt.
- * Dmub sends outbox1 message and triggers outbox1 interrupt.
- *
- *  @param
- * [in] dc: dc structure
- *
- *  @return
- * None
- *
+ *  dmub_enable_outbox_notification - Sends inbox cmd to dmub to enable outbox1
+ *messages with interrupt. Dmub sends 
outbox1
+ *message and triggers outbox1 interrupt.
+ * @dc: dc structure
  */
 void dmub_enable_outbox_notification(struct dc *dc)
 {
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 21/34] drm/amd/display/dc/dce110/dce110_hw_sequencer: Include header containing our prototypes

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:929:6: 
warning: no previous prototype for ‘dce110_edp_wait_for_T12’ 
[-Wmissing-prototypes]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 9219db79f32b6..1ef1b1b33fb09 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -64,6 +64,7 @@
 #include "atomfirmware.h"
 
 #include "dce110_hw_sequencer.h"
+#include "dcn10/dcn10_hw_sequencer.h"
 
 #define GAMMA_HW_POINTS_NUM 256
 
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 16/34] drm/amd/display/dc/dce/dce_transform: Remove superfluous re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: 
no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’
 In file included from 
drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: 
in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: 
(near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: 
in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in 
expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: 
in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: 
in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: 
warning: initialized field overwritten [-Woverride-init]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mauro Rossi 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
index cbce194ec7b82..e98b5d4141739 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
@@ -166,8 +166,7 @@
SRI(SCL_F_SHARP_CONTROL, SCL, id)
 
 #define XFM_COMMON_REG_LIST_DCE60(id) \
-   XFM_COMMON_REG_LIST_DCE60_BASE(id), \
-   SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)
+   XFM_COMMON_REG_LIST_DCE60_BASE(id)
 #endif
 
 #define XFM_SF(reg_name, field_name, post_fix)\
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 09/34] drm/amd/display/dc/bios/command_table_helper2: Fix function name 'dal_cmd_table_helper_transmitter_bp_to_atom2()'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper2.c:141: 
warning: expecting prototype for translate_transmitter_bp_to_atom2(). Prototype 
was for dal_cmd_table_helper_transmitter_bp_to_atom2() instead

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c 
b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
index 00706b072b5f8..6d2fb112ad9f9 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
@@ -129,7 +129,7 @@ bool dal_cmd_table_helper_controller_id_to_atom2(
 }
 
 /**
- * translate_transmitter_bp_to_atom2 - Translate the Transmitter to the
+ * dal_cmd_table_helper_transmitter_bp_to_atom2 - Translate the Transmitter to 
the
  * corresponding ATOM BIOS value
  *  @t: transmitter
  *  returns: digitalTransmitter
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 00/34] Rid W=1 warnings from GPU

2021-05-26 Thread Lee Jones
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 (34):
  drm/amd/pm/inc/smu_v13_0: Move table into the only source file that
uses it
  drm/amd/pm/swsmu/smu13/aldebaran_ppt: Remove unused variable 'ret'
  drm/amd/pm/powerplay/hwmgr/smu7_thermal: Provide function name for
'smu7_fan_ctrl_set_default_mode()'
  drm/amd/pm/powerplay/hwmgr/vega12_thermal: Provide function name
  drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Provide
'vega12_init_smc_table()' function name
  drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Kernel-doc headers must
contain function names
  drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Provide function name
'vega20_init_smc_table()'
  drm/amd/display/dc/bios/command_table_helper: Fix function name for
'dal_cmd_table_helper_transmitter_bp_to_atom()'
  drm/amd/display/dc/bios/command_table_helper2: Fix function name
'dal_cmd_table_helper_transmitter_bp_to_atom2()'
  drm/amd/display/dc/bios/bios_parser: Fix formatting and misnaming
issues
  drm/nouveau/nvkm/subdev/mc/tu102: Make functions called by reference
static
  drm/amd/display/amdgpu_dm/amdgpu_dm: Functions must directly follow
their headers
  drm/amd/display/dc/dce/dmub_outbox: Convert over to kernel-doc
  drm/amd/display/dc/gpio/gpio_service: Pass around correct
dce_{version,environment} types
  drm/amd/display/dc/dce110/dce110_hw_sequencer: Include our own header
  drm/amd/display/dc/dce/dce_transform: Remove superfluous
re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,
  drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation
of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT,MASK}
  drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation
of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT,MASK
  drm/amd/amdgpu/amdgpu_device: Make local function static
  drm/amd/display/amdgpu_dm/amdgpu_dm: Fix kernel-doc formatting issue
  drm/amd/display/dc/dce110/dce110_hw_sequencer: Include header
containing our prototypes
  drm/amd/display/dc/core/dc: Convert function headers to kernel-doc
  drm/amd/display/dmub/src/dmub_srv_stat: Convert function header to
kernel-doc
  drm/amd/display/modules/hdcp/hdcp_psp: Remove unused function
'mod_hdcp_hdcp1_get_link_encryption_status()'
  drm/xlnx/zynqmp_disp: Fix incorrectly named enum
'zynqmp_disp_layer_id'
  drm/xlnx/zynqmp_dp: Fix incorrectly name function 'zynqmp_dp_train()'
  drm/ttm/ttm_tt: Demote non-conformant kernel-doc header
  drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse
  drm/panel/panel-sitronix-st7701: Demote kernel-doc abuse
  drm/vgem/vgem_drv: Standard comment blocks should not use kernel-doc
format
  drm/exynos/exynos7_drm_decon: Fix incorrect naming of
'decon_shadow_protect_win()'
  drm/exynos/exynos_drm_ipp: Fix documentation for
'exynos_drm_ipp_get_{caps,res}_ioctl()'
  drm/vboxvideo/hgsmi_base: Place function names into headers
  drm/vboxvideo/modesetting: Provide function names for prototype
headers

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  4 +-
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  6 +--
 .../display/dc/bios/command_table_helper.c|  2 +-
 .../display/dc/bios/command_table_helper2.c   |  2 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c  | 46 +--
 .../drm/amd/display/dc/dce/dce_mem_input.h|  2 -
 .../drm/amd/display/dc/dce/dce_transform.h|  3 +-
 .../gpu/drm/amd/display/dc/dce/dmub_outbox.c  | 17 ++-
 .../display/dc/dce110/dce110_hw_sequencer.c   |  3 ++
 .../drm/amd/display/dc/gpio/gpio_service.c| 12 ++---
 .../drm/amd/display/dmub/src/dmub_srv_stat.c  | 19 +++-
 .../display/include/gpio_service_interface.h  |  4 +-
 .../drm/amd/display/modules/hdcp/hdcp_psp.c   | 13 --
 drivers/gpu/drm/amd/pm/inc/smu_v13_0.h|  6 ---
 .../drm/amd/pm/powerplay/hwmgr/smu7_thermal.c |  8 ++--
 .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 26 ++-
 .../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c |  2 +-
 .../amd/pm/powerplay/hwmgr/vega12_thermal.c   |  3 +-
 .../drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c |  2 +-
 .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c|  9 +++-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   |  4 +-
 .../gpu/drm/nouveau/nvkm/subdev/mc/tu102.c|  6 +--
 .../drm/panel/panel-raspberrypi-touchscreen.c |  2 +-
 drivers/gpu/drm/panel/panel-sitronix-st7701.c |  2 +-
 drivers/gpu/drm/ttm/ttm_tt.c  |  2 +-
 drivers/gpu/drm/vboxvideo/hgsmi_base.c| 19 +---
 drivers/gpu/drm/vboxvideo/modesetting.c   | 20 
 drivers/gpu/drm/vgem/vgem_drv.c   |  2 +-
 drivers/gpu/drm/xlnx/zynqmp_disp.c|  2 +-
 drivers/gpu/drm/xlnx/zynqmp_dp.c

[PATCH 01/34] drm/amd/pm/inc/smu_v13_0: Move table into the only source file that uses it

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v13_0.h:54:43: warning: 
‘smu13_thermal_policy’ defined but not used [-Wunused-const-variable=]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Kevin Wang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 6 --
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 6 ++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/smu_v13_0.h 
b/drivers/gpu/drm/amd/pm/inc/smu_v13_0.h
index 1687709507b3d..6119a36b2cba0 100644
--- a/drivers/gpu/drm/amd/pm/inc/smu_v13_0.h
+++ b/drivers/gpu/drm/amd/pm/inc/smu_v13_0.h
@@ -51,12 +51,6 @@
 #define CTF_OFFSET_HOTSPOT 5
 #define CTF_OFFSET_MEM 5
 
-static const struct smu_temperature_range smu13_thermal_policy[] =
-{
-   {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
-   { 12, 12, 12, 12, 12, 12, 12, 12, 
12},
-};
-
 struct smu_13_0_max_sustainable_clocks {
uint32_t display_clock;
uint32_t phy_clock;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index d62cc6bb1a305..d6ce665baaf3b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -78,6 +78,12 @@
 
 #define smnPCIE_ESM_CTRL   0x111003D0
 
+static const struct smu_temperature_range smu13_thermal_policy[] =
+{
+   {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
+   { 12, 12, 12, 12, 12, 12, 12, 12, 
12},
+};
+
 static const struct cmn2asic_msg_mapping 
aldebaran_message_map[SMU_MSG_MAX_COUNT] = {
MSG_MAP(TestMessage, PPSMC_MSG_TestMessage, 
0),
MSG_MAP(GetSmuVersion,   PPSMC_MSG_GetSmuVersion,   
1),
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 23/34] drm/amd/display/dmub/src/dmub_srv_stat: Convert function header to kernel-doc

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv_stat.c:38: warning: 
Cannot understand  
*

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Jun Lei 
Cc: Meenakshikumar Somasundaram 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../drm/amd/display/dmub/src/dmub_srv_stat.c  | 19 ++-
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c
index e6f3bfab33d3e..70766d534c9c8 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c
@@ -35,20 +35,13 @@
  */
 
 /**
- *
- *  Function: dmub_srv_stat_get_notification
+ * dmub_srv_stat_get_notification - Retrieves a dmub outbox notification, set 
up dmub notification
+ *  structure with message information. Also a 
pending bit if queue
+ *  is having more notifications
+ *  @dmub: dmub srv structure
+ *  @notify: dmub notification structure to be filled up
  *
- *  @brief
- * Retrieves a dmub outbox notification, set up dmub notification
- * structure with message information. Also a pending bit if queue
- * is having more notifications
- *
- *  @param [in] dmub: dmub srv structure
- *  @param [out] pnotify: dmub notification structure to be filled up
- *
- *  @return
- * dmub_status
- *
+ *  Returns: dmub_status
  */
 enum dmub_status dmub_srv_stat_get_notification(struct dmub_srv *dmub,
struct dmub_notification 
*notify)
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 19/34] drm/amd/amdgpu/amdgpu_device: Make local function static

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4624:6: warning: no previous 
prototype for ‘amdgpu_device_recheck_guilty_jobs’ [-Wmissing-prototypes]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a040f89ca5aa..f15e180762d2e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4692,7 +4692,7 @@ static int amdgpu_device_suspend_display_audio(struct 
amdgpu_device *adev)
return 0;
 }
 
-void amdgpu_device_recheck_guilty_jobs(
+static void amdgpu_device_recheck_guilty_jobs(
struct amdgpu_device *adev, struct list_head *device_list_handle,
struct amdgpu_reset_context *reset_context)
 {
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 07/34] drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Provide function name 'vega20_init_smc_table()'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:781: warning: 
expecting prototype for Initializes the SMC table and uploads it(). Prototype 
was for vega20_init_smc_table() instead

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
index d3177a534fdf0..0791309586c58 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
@@ -772,7 +772,7 @@ static int vega20_setup_default_dpm_tables(struct pp_hwmgr 
*hwmgr)
 }
 
 /**
- * Initializes the SMC table and uploads it
+ * vega20_init_smc_table - Initializes the SMC table and uploads it
  *
  * @hwmgr:  the address of the powerplay hardware manager.
  * return:  always 0
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 18/34] drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT, MASK

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 In file included from 
drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:29:
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: 
note: (near initialization for ‘mi_shifts.GRPH_NUM_BANKS’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: 
note: (near initialization for ‘mi_masks.GRPH_NUM_BANKS’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mauro Rossi 
Cc: Lee Jones 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
index 9b1c4d56275a4..08a4c8d029d9f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
@@ -206,7 +206,6 @@ struct dce_mem_input_registers {
SFB(blk, GRPH_ENABLE, GRPH_ENABLE, mask_sh),\
SFB(blk, GRPH_CONTROL, GRPH_DEPTH, mask_sh),\
SFB(blk, GRPH_CONTROL, GRPH_FORMAT, mask_sh),\
-   SFB(blk, GRPH_CONTROL, GRPH_NUM_BANKS, mask_sh),\
SFB(blk, GRPH_X_START, GRPH_X_START, mask_sh),\
SFB(blk, GRPH_Y_START, GRPH_Y_START, mask_sh),\
SFB(blk, GRPH_X_END, GRPH_X_END, mask_sh),\
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 02/34] drm/amd/pm/swsmu/smu13/aldebaran_ppt: Remove unused variable 'ret'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c: In function 
‘aldebaran_is_dpm_running’:
 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c:1260:6: warning: 
variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index d6ce665baaf3b..d077e211017a9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1368,10 +1368,9 @@ static int aldebaran_usr_edit_dpm_table(struct 
smu_context *smu, enum PP_OD_DPM_
 
 static bool aldebaran_is_dpm_running(struct smu_context *smu)
 {
-   int ret = 0;
uint32_t feature_mask[2];
unsigned long feature_enabled;
-   ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2);
+   smu_cmn_get_enabled_mask(smu, feature_mask, 2);
feature_enabled = (unsigned long)((uint64_t)feature_mask[0] |
  ((uint64_t)feature_mask[1] << 32));
return !!(feature_enabled & SMC_DPM_FEATURE);
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 04/34] drm/amd/pm/powerplay/hwmgr/vega12_thermal: Provide function name

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:171: 
warning: expecting prototype for Set the requested temperature range for high 
and low alert signals(). Prototype was for 
vega12_thermal_set_temperature_range() instead

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
index 0dc16f25a463b..ed3dff0b52d21 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
@@ -159,7 +159,8 @@ int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Set the requested temperature range for high and low alert signals
+ * vega12_thermal_set_temperature_range - Set the requested temperature range
+ *for high and low alert signals
  *
  * @hwmgr: The address of the hardware manager.
  * @range: Temperature range to be programmed for
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 14/34] drm/amd/display/dc/gpio/gpio_service: Pass around correct dce_{version, environment} types

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c: In function 
‘dal_gpio_service_create’:
 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:71:4: warning: 
implicit conversion from ‘enum dce_version’ to ‘enum dce_environment’ 
[-Wenum-conversion]
 drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:77:4: warning: 
implicit conversion from ‘enum dce_version’ to ‘enum dce_environment’ 
[-Wenum-conversion]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c   | 12 ++--
 .../drm/amd/display/include/gpio_service_interface.h |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c 
b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
index 92280cc05e2db..dae8e489c8cf4 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
+++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
@@ -53,8 +53,8 @@
  */
 
 struct gpio_service *dal_gpio_service_create(
-   enum dce_version dce_version_major,
-   enum dce_version dce_version_minor,
+   enum dce_version dce_version,
+   enum dce_environment dce_environment,
struct dc_context *ctx)
 {
struct gpio_service *service;
@@ -67,14 +67,14 @@ struct gpio_service *dal_gpio_service_create(
return NULL;
}
 
-   if (!dal_hw_translate_init(&service->translate, dce_version_major,
-   dce_version_minor)) {
+   if (!dal_hw_translate_init(&service->translate, dce_version,
+   dce_environment)) {
BREAK_TO_DEBUGGER();
goto failure_1;
}
 
-   if (!dal_hw_factory_init(&service->factory, dce_version_major,
-   dce_version_minor)) {
+   if (!dal_hw_factory_init(&service->factory, dce_version,
+   dce_environment)) {
BREAK_TO_DEBUGGER();
goto failure_1;
}
diff --git a/drivers/gpu/drm/amd/display/include/gpio_service_interface.h 
b/drivers/gpu/drm/amd/display/include/gpio_service_interface.h
index 9c55d247227ea..7e3240e73c1fc 100644
--- a/drivers/gpu/drm/amd/display/include/gpio_service_interface.h
+++ b/drivers/gpu/drm/amd/display/include/gpio_service_interface.h
@@ -42,8 +42,8 @@ void dal_gpio_destroy(
struct gpio **ptr);
 
 struct gpio_service *dal_gpio_service_create(
-   enum dce_version dce_version_major,
-   enum dce_version dce_version_minor,
+   enum dce_version dce_version,
+   enum dce_environment dce_environment,
struct dc_context *ctx);
 
 struct gpio *dal_gpio_service_create_irq(
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 17/34] drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT, MASK}

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 In file included from 
drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:29:
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: 
note: (near initialization for ‘mi_shifts.GRPH_NUM_BANKS’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: 
warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: 
note: (near initialization for ‘mi_masks.GRPH_NUM_BANKS’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in 
expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in 
expansion of macro ‘SFB’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in 
expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: 
in expansion of macro ‘MI_DCE6_MASK_SH_LIST’

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Mauro Rossi 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
index 23db5c72f07ed..9b1c4d56275a4 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
@@ -181,7 +181,6 @@ struct dce_mem_input_registers {
SFB(blk, GRPH_ENABLE, GRPH_ENABLE, mask_sh),\
SFB(blk, GRPH_CONTROL, GRPH_DEPTH, mask_sh),\
SFB(blk, GRPH_CONTROL, GRPH_FORMAT, mask_sh),\
-   SFB(blk, GRPH_CONTROL, GRPH_NUM_BANKS, mask_sh),\
SFB(blk, GRPH_X_START, GRPH_X_START, mask_sh),\
SFB(blk, GRPH_Y_START, GRPH_Y_START, mask_sh),\
SFB(blk, GRPH_X_END, GRPH_X_END, mask_sh),\
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 20/34] drm/amd/display/amdgpu_dm/amdgpu_dm: Fix kernel-doc formatting issue

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:608: warning: 
Function parameter or member 'interrupt_params' not described in 
'dm_dcn_vertical_interrupt0_high_irq'

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ae0a95c5f1d8c..0b4841f377e41 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -605,7 +605,7 @@ static void dm_crtc_high_irq(void *interrupt_params)
 /**
  * dm_dcn_vertical_interrupt0_high_irq() - Handles OTG Vertical interrupt0 for
  * DCN generation ASICs
- * @interrupt params - interrupt parameters
+ * @interrupt_params: interrupt parameters
  *
  * Used to set crc window/read out crc value at vertical line 0 position
  */
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 06/34] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Kernel-doc headers must contain function names

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:547: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:603: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:629: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1006: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1155: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1608: warning: 
expecting prototype for Populates single SMC GFXSCLK structure using the 
provided engine clock(). Prototype was for vega10_populate_single_gfx_level() 
instead
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1663: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1713: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1862: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2546: warning: 
expecting prototype for Initializes the SMC table and uploads it(). Prototype 
was for vega10_init_smc_table() instead
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2922: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 26 +++
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
index 31c61ac3bd5e1..25979106fd255 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
@@ -544,7 +544,7 @@ static int vega10_get_socclk_for_voltage_evv(struct 
pp_hwmgr *hwmgr,
 
 #define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01
 /**
- * Get Leakage VDDC based on leakage ID.
+ * vega10_get_evv_voltages - Get Leakage VDDC based on leakage ID.
  *
  * @hwmgr:  the address of the powerplay hardware manager.
  * return:  always 0.
@@ -600,7 +600,7 @@ static int vega10_get_evv_voltages(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Change virtual leakage voltage to actual value.
+ * vega10_patch_with_vdd_leakage - Change virtual leakage voltage to actual 
value.
  *
  * @hwmgr: the address of the powerplay hardware manager.
  * @voltage:   pointer to changing voltage
@@ -626,7 +626,7 @@ static void vega10_patch_with_vdd_leakage(struct pp_hwmgr 
*hwmgr,
 }
 
 /**
- * Patch voltage lookup table by EVV leakages.
+ * vega10_patch_lookup_table_with_leakage - Patch voltage lookup table by EVV 
leakages.
  *
  * @hwmgr: the address of the powerplay hardware manager.
  * @lookup_table:  pointer to voltage lookup table
@@ -1003,7 +1003,7 @@ static int vega10_setup_asic_task(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Remove repeated voltage values and create table with unique values.
+ * vega10_trim_voltage_table - Remove repeated voltage values and create table 
with unique values.
  *
  * @hwmgr:  the address of the powerplay hardware manager.
  * @vol_table:  the pointer to changing voltage table
@@ -1152,7 +1152,7 @@ static void vega10_trim_voltage_table_to_fit_state_table(
 }
 
 /**
- * Create Voltage Tables.
+ * vega10_construct_voltage_tables - Create Voltage Tables.
  *
  * @hwmgr:  the address of the powerplay hardware manager.
  * return:  always 0
@@ -1595,7 +1595,8 @@ static int vega10_populate_smc_link_levels(struct 
pp_hwmgr *hwmgr)
 }
 
 /**
- * Populates single SMC GFXSCLK structure using the provided engine clock
+ * vega10_populate_single_gfx_level - Populates single SMC GFXSCLK structure
+ *using the provided engine clock
  *
  * @

[PATCH 05/34] drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Provide 'vega12_init_smc_table()' function name

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:812: warning: 
expecting prototype for Initializes the SMC table and uploads it(). Prototype 
was for vega12_init_smc_table() instead

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
index 1a097e608808e..29e0d1d4035ad 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
@@ -803,7 +803,7 @@ static int vega12_save_default_power_profile(struct 
pp_hwmgr *hwmgr)
 #endif
 
 /**
- * Initializes the SMC table and uploads it
+ * vega12_init_smc_table - Initializes the SMC table and uploads it
  *
  * @hwmgr:  the address of the powerplay hardware manager.
  * return:  always 0
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 24/34] drm/amd/display/modules/hdcp/hdcp_psp: Remove unused function 'mod_hdcp_hdcp1_get_link_encryption_status()'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: 
no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’ 
[-Wmissing-prototypes]

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c 
b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c
index 26f96c05e0ec8..06910d2fd57a0 100644
--- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c
+++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c
@@ -371,19 +371,6 @@ enum mod_hdcp_status 
mod_hdcp_hdcp1_link_maintenance(struct mod_hdcp *hdcp)
return status;
 }
 
-enum mod_hdcp_status mod_hdcp_hdcp1_get_link_encryption_status(struct mod_hdcp 
*hdcp,
-  enum 
mod_hdcp_encryption_status *encryption_status)
-{
-   *encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF;
-
-   if (mod_hdcp_hdcp1_link_maintenance(hdcp) != MOD_HDCP_STATUS_SUCCESS)
-   return MOD_HDCP_STATUS_FAILURE;
-
-   *encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP1_ON;
-
-   return MOD_HDCP_STATUS_SUCCESS;
-}
-
 enum mod_hdcp_status mod_hdcp_hdcp2_create_session(struct mod_hdcp *hdcp)
 {
struct psp_context *psp = hdcp->config.psp.handle;
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 22/34] drm/amd/display/dc/core/dc: Convert function headers to kernel-doc

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3324: warning: Cannot 
understand  
*
 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3344: warning: Cannot 
understand  
*
 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3417: warning: Cannot 
understand  
*

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 46 ++--
 1 file changed, 11 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index ef157b83bacd2..34c207f92df98 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3335,18 +3335,10 @@ void dc_hardware_release(struct dc *dc)
 #endif
 
 /**
- *
- *  Function: dc_enable_dmub_notifications
+ * dc_enable_dmub_notifications - Returns whether dmub notification can be 
enabled
+ * @dc: dc structure
  *
- *  @brief
- * Returns whether dmub notification can be enabled
- *
- *  @param
- * [in] dc: dc structure
- *
- * @return
- * True to enable dmub notifications, False otherwise
- *
+ * Returns: True to enable dmub notifications, False otherwise
  */
 bool dc_enable_dmub_notifications(struct dc *dc)
 {
@@ -3355,21 +3347,13 @@ bool dc_enable_dmub_notifications(struct dc *dc)
 }
 
 /**
- *
- *  Function: dc_process_dmub_aux_transfer_async
- *
- *  @brief
- * Submits aux command to dmub via inbox message
- * Sets port index appropriately for legacy DDC
- *
- *  @param
- * [in] dc: dc structure
- * [in] link_index: link index
- * [in] payload: aux payload
+ * dc_process_dmub_aux_transfer_async - Submits aux command to dmub via inbox 
message
+ *  Sets port index appropriately for 
legacy DDC
+ * @dc: dc structure
+ * @link_index: link index
+ * @payload: aux payload
  *
- * @return
- * True if successful, False if failure
- *
+ * Returns: True if successful, False if failure
  */
 bool dc_process_dmub_aux_transfer_async(struct dc *dc,
uint32_t link_index,
@@ -3428,16 +3412,8 @@ bool dc_process_dmub_aux_transfer_async(struct dc *dc,
 }
 
 /**
- *
- *  Function: dc_disable_accelerated_mode
- *
- *  @brief
- * disable accelerated mode
- *
- *  @param
- * [in] dc: dc structure
- *
- *
+ * dc_disable_accelerated_mode - disable accelerated mode
+ * @dc: dc structure
  */
 void dc_disable_accelerated_mode(struct dc *dc)
 {
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 10/34] drm/amd/display/dc/bios/bios_parser: Fix formatting and misnaming issues

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: 
expecting prototype for get_ss_info_from_table(). Prototype was for 
get_ss_info_from_tbl() instead
 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1562: warning: 
expecting prototype for BiosParserObject(). Prototype was for 
bios_parser_get_ss_entry_number() instead
 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1739: warning: 
expecting prototype for get_ss_entry_number_from_internal_ss_info_table_V3_1(). 
Prototype was for get_ss_entry_number_from_internal_ss_info_tbl_V3_1() instead

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Lee Jones 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c 
b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index c67d21a5ee52f..9b8ea6e9a2b96 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -979,7 +979,7 @@ static enum bp_result 
get_ss_info_from_internal_ss_info_tbl_V2_1(
struct spread_spectrum_info *info);
 
 /**
- * get_ss_info_from_table
+ * get_ss_info_from_tbl
  * Get spread sprectrum information from the ASIC_InternalSS_Info Ver 2.1 or
  * SS_Info table from the VBIOS
  * There can not be more than 1 entry for  ASIC_InternalSS_Info Ver 2.1 or
@@ -1548,7 +1548,7 @@ static uint32_t get_ss_entry_number_from_ss_info_tbl(
uint32_t id);
 
 /**
- * BiosParserObject::GetNumberofSpreadSpectrumEntry
+ * bios_parser_get_ss_entry_number
  * Get Number of SpreadSpectrum Entry from the ASIC_InternalSS_Info table from
  * the VBIOS that match the SSid (to be converted from signal)
  *
@@ -1725,7 +1725,7 @@ static uint32_t 
get_ss_entry_number_from_internal_ss_info_tbl_v2_1(
return 0;
 }
 /**
- * get_ss_entry_number_from_internal_ss_info_table_V3_1
+ * get_ss_entry_number_from_internal_ss_info_tbl_V3_1
  * Get Number of SpreadSpectrum Entry from the ASIC_InternalSS_Info table of
  * the VBIOS that matches id
  *
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 03/34] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Provide function name for 'smu7_fan_ctrl_set_default_mode()'

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:132: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Evan Quan 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
index 0d38d4206848a..6cfe148ed45bb 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
@@ -129,10 +129,10 @@ int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, 
uint32_t mode)
 }
 
 /**
-* Reset Fan Speed Control to default mode.
-* @hwmgr:  the address of the powerplay hardware manager.
-* Exception: Should always succeed.
-*/
+ * smu7_fan_ctrl_set_default_mode - Reset Fan Speed Control to default mode.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Exception: Should always succeed.
+ */
 int smu7_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
 {
if (!hwmgr->fan_ctrl_is_in_default_mode) {
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 12/34] drm/amd/display/amdgpu_dm/amdgpu_dm: Functions must directly follow their headers

2021-05-26 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:608: warning: 
Function parameter or member 'interrupt_params' not described in 
'dm_dcn_vertical_interrupt0_high_irq'

Cc: Harry Wentland 
Cc: Leo Li 
Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b4e95d3ff3b88..ae0a95c5f1d8c 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -601,6 +601,7 @@ static void dm_crtc_high_irq(void *interrupt_params)
 }
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
 /**
  * dm_dcn_vertical_interrupt0_high_irq() - Handles OTG Vertical interrupt0 for
  * DCN generation ASICs
@@ -608,7 +609,6 @@ static void dm_crtc_high_irq(void *interrupt_params)
  *
  * Used to set crc window/read out crc value at vertical line 0 position
  */
-#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
 static void dm_dcn_vertical_interrupt0_high_irq(void *interrupt_params)
 {
struct common_irq_params *irq_params = interrupt_params;
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 38/38] drm/amd/amdgpu/smuio_v13_0: Realign 'smuio_v13_0_is_host_gpu_xgmi_supported()' header

2021-05-21 Thread Lee Jones
On Thu, 20 May 2021, Alex Deucher wrote:

> Applied.  Thanks!

Thanks again Alex.

> On Thu, May 20, 2021 at 8:03 AM Lee Jones  wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c:99: warning: expecting prototype 
> > for smuio_v13_0_supports_host_gpu_xgmi(). Prototype was for 
> > smuio_v13_0_is_host_gpu_xgmi_supported() instead
> >
> > Cc: Alex Deucher 
> > Cc: "Christian König" 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: Hawking Zhang 
> > Cc: amd-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c 
> > b/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
> > index 3c47c94846d6d..39b7c206770f6 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
> > @@ -106,7 +106,7 @@ static u32 smuio_v13_0_get_socket_id(struct 
> > amdgpu_device *adev)
> >  }
> >
> >  /**
> > - * smuio_v13_0_supports_host_gpu_xgmi - detect xgmi interface between cpu 
> > and gpu/s.
> > + * smuio_v13_0_is_host_gpu_xgmi_supported - detect xgmi interface between 
> > cpu and gpu/s.
> >   *
> >   * @adev: amdgpu device pointer
> >   *
> >

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 19/38] drm/radeon/cik: Fix incorrectly named function 'cik_irq_suspend()'

2021-05-20 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/cik.c:7450: warning: expecting prototype for 
cik_irq_disable(). Prototype was for cik_irq_suspend() instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/radeon/cik.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 42a8afa839cbb..73ea5189dfb1a 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -7439,7 +7439,7 @@ static void cik_irq_disable(struct radeon_device *rdev)
 }
 
 /**
- * cik_irq_disable - disable interrupts for suspend
+ * cik_irq_suspend - disable interrupts for suspend
  *
  * @rdev: radeon_device pointer
  *
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 00/38] Rid W=1 warnings from GPU

2021-05-20 Thread Lee Jones
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 (38):
  drm/mediatek/mtk_disp_color: Strip incorrect doc and demote header
  drm/mediatek/mtk_disp_gamma: Strip and demote non-conformant
kernel-doc header
  drm/radeon/radeon_cs: Fix incorrectly documented function
'radeon_cs_parser_fini'
  drm/mediatek/mtk_disp_ovl: Strip and demote non-conformant header
  drm/mediatek/mtk_disp_rdma: Strip and demote non-conformant kernel-doc
header
  drm/sti/sti_hdmi_tx3g4c28phy: Provide function names for kernel-doc
headers
  drm/sti/sti_hda: Provide missing function names
  drm/sti/sti_tvout: Provide a bunch of missing function names
  drm/sti/sti_hqvdp: Fix incorrectly named function 'sti_hqvdp_vtg_cb()'
  drm/amd/amdgpu/amdgpu_ids: Correct some function name disparity
  drm/amd/amdgpu/amdgpu_debugfs: Fix a couple of misnamed functions
  drm/amd/amdgpu/amdgpu_gmc: Fix a little naming related doc-rot
  drm/amd/amdgpu/cik_sdma: Fix a few incorrectly named functions
  drm/amd/amdgpu/gfx_v7_0: Repair function names in the documentation
  drm/msm/disp/dpu1/dpu_encoder_phys_cmd: Remove unused variable
'cmd_enc'
  drm/amd/amdgpu/si_dma: Fix some function name disparity
  drm/amd/amdgpu/dce_v6_0: Repair function name of
'si_get_number_of_dram_channels()'
  drm/msm/disp/dpu1/dpu_hw_interrupts: Demote a bunch of kernel-doc
abuses
  drm/radeon/cik: Fix incorrectly named function 'cik_irq_suspend()'
  drm/radeon/radeon_vm: Fix function naming disparities
  drm/amd/include/aldebaran_ip_offset: Mark top-level IP_BASE as
__maybe_unused
  drm/msm/disp/dpu1/dpu_plane: Fix a couple of naming issues
  drm/amd/amdgpu/gmc_v7_0: Fix potential copy/paste issue
  drm/amd/amdgpu/mmhub_v9_4: Fix naming disparity with
'mmhub_v9_4_set_fault_enable_default()'
  drm/msm/msm_gem: Demote kernel-doc abuses
  drm/amd/amdgpu/gmc_v10_0: Fix potential copy/paste issue
  drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog'
  drm/msm/dp/dp_link: Fix some potential doc-rot
  drm/radeon/r100: Realign doc header with function
'r100_cs_packet_parse_vline()'
  drm/amd/amdgpu/gfx_v9_4_2: Mark functions called by reference as
static
  drm/amd/amdgpu/sdma_v2_4: Correct misnamed function
'sdma_v2_4_ring_emit_hdp_flush()'
  drm/amd/amdgpu/sdma_v4_0: Realign functions with their headers
  drm/amd/amdgpu/sdma_v5_0: Fix typo in function name
  drm/amd/amdgpu/amdgpu_vce: Fix a few incorrectly named functions
  drm/amd/amdgpu/sdma_v5_2: Repair typo in function name
  drm/amd/amdgpu/vcn_v1_0: Fix some function naming disparity
  drm/amd/amdgpu/gfx_v10_0: Demote kernel-doc abuse
  drm/amd/amdgpu/smuio_v13_0: Realign
'smuio_v13_0_is_host_gpu_xgmi_supported()' header

 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   |  4 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c   |  4 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c   |  8 ++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c   | 10 +++---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c |  8 ++---
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c |  6 ++--
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c   | 14 
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c|  4 +--
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/si_dma.c   |  6 ++--
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c  |  2 +-
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c |  4 +--
 .../gpu/drm/amd/include/aldebaran_ip_offset.h |  2 +-
 drivers/gpu/drm/mediatek/mtk_disp_color.c |  3 +-
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c |  4 +--
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c   |  3 +-
 drivers/gpu/drm/mediatek/mtk_disp_rdma.c  |  4 +--
 .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c  |  4 ---
 .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 32 +--
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c |  4 +--
 drivers/gpu/drm/msm/dp/dp_catalog.c   |  2 +-
 drivers/gpu/drm/msm/dp/dp_link.c  |  6 ++--
 drivers/gpu/drm/msm/msm_gem.c |  4 +--
 drivers/gpu/drm/radeon/cik.c  |  2 +-
 drivers/gpu/drm/radeon/r100.c |  2 +-
 drivers/gpu/drm/radeon/radeon_cs.c|  2 +-
 drivers/gpu/drm/radeon/radeon_vm.c|  4 +--
 drivers/gpu/drm/sti/sti_hda.c |  6 ++--
 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c|  4 +--
 drivers/gpu/drm/sti/sti_hqvdp.c

[PATCH 38/38] drm/amd/amdgpu/smuio_v13_0: Realign 'smuio_v13_0_is_host_gpu_xgmi_supported()' header

2021-05-20 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c:99: warning: expecting prototype for 
smuio_v13_0_supports_host_gpu_xgmi(). Prototype was for 
smuio_v13_0_is_host_gpu_xgmi_supported() instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Hawking Zhang 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c 
b/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
index 3c47c94846d6d..39b7c206770f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
@@ -106,7 +106,7 @@ static u32 smuio_v13_0_get_socket_id(struct amdgpu_device 
*adev)
 }
 
 /**
- * smuio_v13_0_supports_host_gpu_xgmi - detect xgmi interface between cpu and 
gpu/s.
+ * smuio_v13_0_is_host_gpu_xgmi_supported - detect xgmi interface between cpu 
and gpu/s.
  *
  * @adev: amdgpu device pointer
  *
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 13/38] drm/amd/amdgpu/cik_sdma: Fix a few incorrectly named functions

2021-05-20 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/cik_sdma.c:735: warning: expecting prototype for 
cik_sdma_vm_copy_pages(). Prototype was for cik_sdma_vm_copy_pte() instead
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c:762: warning: expecting prototype for 
cik_sdma_vm_write_pages(). Prototype was for cik_sdma_vm_write_pte() instead
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c:792: warning: expecting prototype for 
cik_sdma_vm_set_pages(). Prototype was for cik_sdma_vm_set_pte_pde() instead
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c:814: warning: expecting prototype for 
cik_sdma_vm_pad_ib(). Prototype was for cik_sdma_ring_pad_ib() instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Evan Quan 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c 
b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index c4bb8eed246d6..c8ebd108548d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -720,7 +720,7 @@ static int cik_sdma_ring_test_ib(struct amdgpu_ring *ring, 
long timeout)
 }
 
 /**
- * cik_sdma_vm_copy_pages - update PTEs by copying them from the GART
+ * cik_sdma_vm_copy_pte - update PTEs by copying them from the GART
  *
  * @ib: indirect buffer to fill with commands
  * @pe: addr of the page entry
@@ -746,7 +746,7 @@ static void cik_sdma_vm_copy_pte(struct amdgpu_ib *ib,
 }
 
 /**
- * cik_sdma_vm_write_pages - update PTEs by writing them manually
+ * cik_sdma_vm_write_pte - update PTEs by writing them manually
  *
  * @ib: indirect buffer to fill with commands
  * @pe: addr of the page entry
@@ -775,7 +775,7 @@ static void cik_sdma_vm_write_pte(struct amdgpu_ib *ib, 
uint64_t pe,
 }
 
 /**
- * cik_sdma_vm_set_pages - update the page tables using sDMA
+ * cik_sdma_vm_set_pte_pde - update the page tables using sDMA
  *
  * @ib: indirect buffer to fill with commands
  * @pe: addr of the page entry
@@ -804,7 +804,7 @@ static void cik_sdma_vm_set_pte_pde(struct amdgpu_ib *ib, 
uint64_t pe,
 }
 
 /**
- * cik_sdma_vm_pad_ib - pad the IB to the required number of dw
+ * cik_sdma_ring_pad_ib - pad the IB to the required number of dw
  *
  * @ring: amdgpu_ring structure holding ring information
  * @ib: indirect buffer to fill with padding
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 14/38] drm/amd/amdgpu/gfx_v7_0: Repair function names in the documentation

2021-05-20 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2126: warning: expecting prototype for 
gfx_v7_0_ring_emit_hdp(). Prototype was for gfx_v7_0_ring_emit_hdp_flush() 
instead
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2262: warning: expecting prototype for 
gfx_v7_0_ring_emit_ib(). Prototype was for gfx_v7_0_ring_emit_ib_gfx() instead
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3207: warning: expecting prototype for 
gfx_v7_0_ring_emit_vm_flush(). Prototype was for 
gfx_v7_0_ring_emit_pipeline_sync() instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index c35fdd2ef2d4d..685212c3ddae5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -2116,7 +2116,7 @@ static int gfx_v7_0_ring_test_ring(struct amdgpu_ring 
*ring)
 }
 
 /**
- * gfx_v7_0_ring_emit_hdp - emit an hdp flush on the cp
+ * gfx_v7_0_ring_emit_hdp_flush - emit an hdp flush on the cp
  *
  * @ring: amdgpu_ring structure holding ring information
  *
@@ -2242,7 +2242,7 @@ static void gfx_v7_0_ring_emit_fence_compute(struct 
amdgpu_ring *ring,
  * IB stuff
  */
 /**
- * gfx_v7_0_ring_emit_ib - emit an IB (Indirect Buffer) on the ring
+ * gfx_v7_0_ring_emit_ib_gfx - emit an IB (Indirect Buffer) on the ring
  *
  * @ring: amdgpu_ring structure holding ring information
  * @job: job to retrieve vmid from
@@ -3196,7 +3196,7 @@ static int gfx_v7_0_cp_resume(struct amdgpu_device *adev)
 }
 
 /**
- * gfx_v7_0_ring_emit_vm_flush - cik vm flush using the CP
+ * gfx_v7_0_ring_emit_pipeline_sync - cik vm flush using the CP
  *
  * @ring: the ring to emit the commands to
  *
-- 
2.31.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


  1   2   3   4   5   6   >