2020-11-06 21:51:36

by Lee Jones

[permalink] [raw]
Subject: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

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

There are 5000 warnings to work through. It will take a couple more
sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
variables to where they're used") does take care of 2000 of them!

Lee Jones (19):
drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
drm/r128/ati_pcigart: Source file headers are not good candidates for
kernel-doc
drm/selftests/test-drm_dp_mst_helper: Move
'sideband_msg_req_encode_decode' onto the heap
drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
drm/mga/mga_state: Remove unused variable 'buf_priv'
drm/radeon/atom: Move prototype into shared location
drm/radeon/radeon_kms: Include header containing our own prototypes
drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
drm/radeon/radeon: Move prototype into shared header
drm/radeon/radeon_drv: Source file headers are not good candidates for
kernel-doc
drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
used
drm/radeon/radeon_drv: Move prototypes to a shared headerfile
drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
params
drm/radeon: Move prototypes to shared header
drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
dev_info' from the stack
drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
drm/radeon/atombios_crtc: Remove description of non-existent function
param 'encoder'
drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
.../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
.../gpu/drm/amd/display/include/fixed31_32.h | 6 -
drivers/gpu/drm/mga/mga_dma.c | 10 +-
drivers/gpu/drm/mga/mga_state.c | 2 -
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
drivers/gpu/drm/radeon/atom.h | 6 +
drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
drivers/gpu/drm/radeon/radeon.h | 6 +
drivers/gpu/drm/radeon/radeon_device.c | 1 +
drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
drivers/gpu/drm/radeon/radeon_display.c | 4 -
drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
.../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
22 files changed, 138 insertions(+), 126 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_device.h

Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Cc: Andy Gross <[email protected]>
Cc: by <[email protected]>
Cc: Christian Koenig <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: Eric Anholt <[email protected]>
Cc: Faith <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Huang Rui <[email protected]>
Cc: Jeff Hartmann <[email protected]>
Cc: Keith Whitwell <[email protected]>
Cc: Leo Li <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Philipp Zabel <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
--
2.25.1


2020-11-06 21:51:46

by Lee Jones

[permalink] [raw]
Subject: [PATCH 01/19] drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header

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

drivers/gpu/drm/ttm/ttm_range_manager.c:46: warning: cannot understand function prototype: 'struct ttm_range_manager '

Cc: Christian Koenig <[email protected]>
Cc: Huang Rui <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
index ea77919569a2e..e0952444cea93 100644
--- a/drivers/gpu/drm/ttm/ttm_range_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
@@ -37,7 +37,7 @@
#include <linux/spinlock.h>
#include <linux/module.h>

-/**
+/*
* Currently we use a spinlock for the lock, but a mutex *may* be
* more appropriate to reduce scheduling latency if the range manager
* ends up with very fragmented allocation patterns.
--
2.25.1

2020-11-06 21:51:59

by Lee Jones

[permalink] [raw]
Subject: [PATCH 05/19] drm/mga/mga_state: Remove unused variable 'buf_priv'

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

drivers/gpu/drm/mga/mga_state.c: In function ‘mga_dma_iload’:
drivers/gpu/drm/mga/mga_state.c:945:22: warning: variable ‘buf_priv’ set but not used [-Wunused-but-set-variable]

Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: by <[email protected]>
Cc: Jeff Hartmann <[email protected]>
Cc: Keith Whitwell <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/mga/mga_state.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c
index 77a0b006f0669..0dec4062e5a2f 100644
--- a/drivers/gpu/drm/mga/mga_state.c
+++ b/drivers/gpu/drm/mga/mga_state.c
@@ -942,7 +942,6 @@ static int mga_dma_iload(struct drm_device *dev, void *data, struct drm_file *fi
struct drm_device_dma *dma = dev->dma;
drm_mga_private_t *dev_priv = dev->dev_private;
struct drm_buf *buf;
- drm_mga_buf_priv_t *buf_priv;
drm_mga_iload_t *iload = data;
DRM_DEBUG("\n");

@@ -959,7 +958,6 @@ static int mga_dma_iload(struct drm_device *dev, void *data, struct drm_file *fi
return -EINVAL;

buf = dma->buflist[iload->idx];
- buf_priv = buf->dev_private;

if (mga_verify_iload(dev_priv, iload->dstorg, iload->length)) {
mga_freelist_put(dev, buf);
--
2.25.1

2020-11-06 21:52:16

by Lee Jones

[permalink] [raw]
Subject: [PATCH 15/19] drm/radeon: Move prototypes to shared header

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

drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon.h | 6 ++++++
drivers/gpu/drm/radeon/radeon_display.c | 4 ----
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index e1132d86d2507..961a31b8805c2 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -2832,6 +2832,12 @@ extern void radeon_program_register_sequence(struct radeon_device *rdev,
const u32 array_size);
struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev);

+/* KMS */
+
+u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
+int radeon_enable_vblank_kms(struct drm_crtc *crtc);
+void radeon_disable_vblank_kms(struct drm_crtc *crtc);
+
/*
* vm
*/
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index b79686cf8bdbd..bd60f16fd0d78 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -45,10 +45,6 @@
#include "atom.h"
#include "radeon.h"

-u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
-int radeon_enable_vblank_kms(struct drm_crtc *crtc);
-void radeon_disable_vblank_kms(struct drm_crtc *crtc);
-
static void avivo_crtc_load_lut(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
--
2.25.1

2020-11-06 21:52:26

by Lee Jones

[permalink] [raw]
Subject: [PATCH 16/19] drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device dev_info' from the stack

Place it on the heap instead.

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

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c: In function ‘amdgpu_info_ioctl’:
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:979:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++++++-----------
1 file changed, 55 insertions(+), 49 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 918d4e9c6461a..ef6fa5007d135 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -721,38 +721,42 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
return n ? -EFAULT : 0;
}
case AMDGPU_INFO_DEV_INFO: {
- struct drm_amdgpu_info_device dev_info;
+ struct drm_amdgpu_info_device *dev_info;
uint64_t vm_size;
+ int ret;
+
+ dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
+ if (!dev_info)
+ return -ENOMEM;

- memset(&dev_info, 0, sizeof(dev_info));
- dev_info.device_id = dev->pdev->device;
- dev_info.chip_rev = adev->rev_id;
- dev_info.external_rev = adev->external_rev_id;
- dev_info.pci_rev = dev->pdev->revision;
- dev_info.family = adev->family;
- dev_info.num_shader_engines = adev->gfx.config.max_shader_engines;
- dev_info.num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
+ dev_info->device_id = dev->pdev->device;
+ dev_info->chip_rev = adev->rev_id;
+ dev_info->external_rev = adev->external_rev_id;
+ dev_info->pci_rev = dev->pdev->revision;
+ dev_info->family = adev->family;
+ dev_info->num_shader_engines = adev->gfx.config.max_shader_engines;
+ dev_info->num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
/* return all clocks in KHz */
- dev_info.gpu_counter_freq = amdgpu_asic_get_xclk(adev) * 10;
+ dev_info->gpu_counter_freq = amdgpu_asic_get_xclk(adev) * 10;
if (adev->pm.dpm_enabled) {
- dev_info.max_engine_clock = amdgpu_dpm_get_sclk(adev, false) * 10;
- dev_info.max_memory_clock = amdgpu_dpm_get_mclk(adev, false) * 10;
+ dev_info->max_engine_clock = amdgpu_dpm_get_sclk(adev, false) * 10;
+ dev_info->max_memory_clock = amdgpu_dpm_get_mclk(adev, false) * 10;
} else {
- dev_info.max_engine_clock = adev->clock.default_sclk * 10;
- dev_info.max_memory_clock = adev->clock.default_mclk * 10;
+ dev_info->max_engine_clock = adev->clock.default_sclk * 10;
+ dev_info->max_memory_clock = adev->clock.default_mclk * 10;
}
- dev_info.enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
- dev_info.num_rb_pipes = adev->gfx.config.max_backends_per_se *
+ dev_info->enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
+ dev_info->num_rb_pipes = adev->gfx.config.max_backends_per_se *
adev->gfx.config.max_shader_engines;
- dev_info.num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
- dev_info._pad = 0;
- dev_info.ids_flags = 0;
+ dev_info->num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
+ dev_info->_pad = 0;
+ dev_info->ids_flags = 0;
if (adev->flags & AMD_IS_APU)
- dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
+ dev_info->ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
if (amdgpu_mcbp || amdgpu_sriov_vf(adev))
- dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
+ dev_info->ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
if (amdgpu_is_tmz(adev))
- dev_info.ids_flags |= AMDGPU_IDS_FLAGS_TMZ;
+ dev_info->ids_flags |= AMDGPU_IDS_FLAGS_TMZ;

vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
vm_size -= AMDGPU_VA_RESERVED_SIZE;
@@ -762,45 +766,47 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
adev->vce.fw_version < AMDGPU_VCE_FW_53_45)
vm_size = min(vm_size, 1ULL << 40);

- dev_info.virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;
- dev_info.virtual_address_max =
+ dev_info->virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;
+ dev_info->virtual_address_max =
min(vm_size, AMDGPU_GMC_HOLE_START);

if (vm_size > AMDGPU_GMC_HOLE_START) {
- dev_info.high_va_offset = AMDGPU_GMC_HOLE_END;
- dev_info.high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
+ dev_info->high_va_offset = AMDGPU_GMC_HOLE_END;
+ dev_info->high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
}
- dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
- dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
- dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE;
- dev_info.cu_active_number = adev->gfx.cu_info.number;
- dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
- dev_info.ce_ram_size = adev->gfx.ce_ram_size;
- memcpy(&dev_info.cu_ao_bitmap[0], &adev->gfx.cu_info.ao_cu_bitmap[0],
+ dev_info->virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
+ dev_info->pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
+ dev_info->gart_page_size = AMDGPU_GPU_PAGE_SIZE;
+ dev_info->cu_active_number = adev->gfx.cu_info.number;
+ dev_info->cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
+ dev_info->ce_ram_size = adev->gfx.ce_ram_size;
+ memcpy(&dev_info->cu_ao_bitmap[0], &adev->gfx.cu_info.ao_cu_bitmap[0],
sizeof(adev->gfx.cu_info.ao_cu_bitmap));
- memcpy(&dev_info.cu_bitmap[0], &adev->gfx.cu_info.bitmap[0],
+ memcpy(&dev_info->cu_bitmap[0], &adev->gfx.cu_info.bitmap[0],
sizeof(adev->gfx.cu_info.bitmap));
- dev_info.vram_type = adev->gmc.vram_type;
- dev_info.vram_bit_width = adev->gmc.vram_width;
- dev_info.vce_harvest_config = adev->vce.harvest_config;
- dev_info.gc_double_offchip_lds_buf =
+ dev_info->vram_type = adev->gmc.vram_type;
+ dev_info->vram_bit_width = adev->gmc.vram_width;
+ dev_info->vce_harvest_config = adev->vce.harvest_config;
+ dev_info->gc_double_offchip_lds_buf =
adev->gfx.config.double_offchip_lds_buf;
- dev_info.wave_front_size = adev->gfx.cu_info.wave_front_size;
- dev_info.num_shader_visible_vgprs = adev->gfx.config.max_gprs;
- dev_info.num_cu_per_sh = adev->gfx.config.max_cu_per_sh;
- dev_info.num_tcc_blocks = adev->gfx.config.max_texture_channel_caches;
- dev_info.gs_vgt_table_depth = adev->gfx.config.gs_vgt_table_depth;
- dev_info.gs_prim_buffer_depth = adev->gfx.config.gs_prim_buffer_depth;
- dev_info.max_gs_waves_per_vgt = adev->gfx.config.max_gs_threads;
+ dev_info->wave_front_size = adev->gfx.cu_info.wave_front_size;
+ dev_info->num_shader_visible_vgprs = adev->gfx.config.max_gprs;
+ dev_info->num_cu_per_sh = adev->gfx.config.max_cu_per_sh;
+ dev_info->num_tcc_blocks = adev->gfx.config.max_texture_channel_caches;
+ dev_info->gs_vgt_table_depth = adev->gfx.config.gs_vgt_table_depth;
+ dev_info->gs_prim_buffer_depth = adev->gfx.config.gs_prim_buffer_depth;
+ dev_info->max_gs_waves_per_vgt = adev->gfx.config.max_gs_threads;

if (adev->family >= AMDGPU_FAMILY_NV)
- dev_info.pa_sc_tile_steering_override =
+ dev_info->pa_sc_tile_steering_override =
adev->gfx.config.pa_sc_tile_steering_override;

- dev_info.tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;
+ dev_info->tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;

- return copy_to_user(out, &dev_info,
- min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
+ ret = copy_to_user(out, dev_info,
+ min((size_t)size, sizeof(*dev_info))) ? -EFAULT : 0;
+ kfree(dev_info);
+ return ret;
}
case AMDGPU_INFO_VCE_CLOCK_TABLE: {
unsigned i;
--
2.25.1

2020-11-06 21:52:35

by Lee Jones

[permalink] [raw]
Subject: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

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

drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'

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

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 0d8fbabffcead..21c206795c364 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
/**
* radeon_info_ioctl - answer a device specific request.
*
- * @rdev: radeon device pointer
+ * @dev: radeon device pointer
* @data: request object
* @filp: drm filp
*
--
2.25.1

2020-11-06 21:52:35

by Lee Jones

[permalink] [raw]
Subject: [PATCH 18/19] drm/radeon/atombios_crtc: Remove description of non-existent function param 'encoder'

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

drivers/gpu/drm/radeon/atombios_crtc.c:1796: warning: Excess function parameter 'encoder' description in 'radeon_get_shared_nondp_ppll'

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

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 91811757104c0..1979ed3d65472 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1787,7 +1787,6 @@ static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
* radeon_get_shared_nondp_ppll - return the PPLL used by another non-DP crtc
*
* @crtc: drm crtc
- * @encoder: drm encoder
*
* Returns the PPLL (Pixel PLL) used by another non-DP crtc/encoder which can
* be shared (i.e., same clock).
--
2.25.1

2020-11-06 21:52:40

by Lee Jones

[permalink] [raw]
Subject: [PATCH 12/19] drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're used

Also rid some unused ones.

This patch solves 2000 warnings!

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

In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:35:
At top level:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: ‘dc_fixpt_ln2_div_2’ defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: ‘dc_fixpt_ln2’ defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: ‘dc_fixpt_e’ defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: ‘dc_fixpt_two_pi’ defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~

Cc: Harry Wentland <[email protected]>
Cc: Leo Li <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 5 +++++
drivers/gpu/drm/amd/display/include/fixed31_32.h | 6 ------
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
index 1e9a2d3520684..59f37563704ad 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
@@ -26,6 +26,11 @@
#include "dm_services.h"
#include "include/fixed31_32.h"

+static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
+static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
+static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
+static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
+
static inline unsigned long long abs_i64(
long long arg)
{
diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h b/drivers/gpu/drm/amd/display/include/fixed31_32.h
index 16df2a485dd0d..22053d7ea6ced 100644
--- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
+++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
@@ -69,12 +69,6 @@ static const struct fixed31_32 dc_fixpt_epsilon = { 1LL };
static const struct fixed31_32 dc_fixpt_half = { 0x80000000LL };
static const struct fixed31_32 dc_fixpt_one = { 0x100000000LL };

-static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
-static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
-static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
-static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
-static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
-
/*
* @brief
* Initialization routines
--
2.25.1

2020-11-06 21:52:50

by Lee Jones

[permalink] [raw]
Subject: [PATCH 14/19] drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr' params

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

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:594: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg'
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:624: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg64'

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 300fcade4a2b1..63374d12e00fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -585,6 +585,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)
* @adev: amdgpu_device pointer
* @pcie_index: mmio register offset
* @pcie_data: mmio register offset
+ * @reg_addr: indirect register address to read from
*
* Returns the value of indirect register @reg_addr
*/
@@ -615,6 +616,7 @@ u32 amdgpu_device_indirect_rreg(struct amdgpu_device *adev,
* @adev: amdgpu_device pointer
* @pcie_index: mmio register offset
* @pcie_data: mmio register offset
+ * @reg_addr: indirect register address to read from
*
* Returns the value of indirect register @reg_addr
*/
--
2.25.1

2020-11-06 21:53:04

by Lee Jones

[permalink] [raw]
Subject: [PATCH 13/19] drm/radeon/radeon_drv: Move prototypes to a shared headerfile

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

62 | void radeon_driver_unload_kms(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:105:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
105 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:619:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
619 | void radeon_driver_lastclose_kms(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:634:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
634 | int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kms.c:705:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
705 | void radeon_driver_postclose_kms(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon_drv.c | 6 ------
drivers/gpu/drm/radeon/radeon_drv.h | 7 +++++++
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index bb7b33e535f81..e0d664e9e2feb 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -112,12 +112,6 @@
#define KMS_DRIVER_MAJOR 2
#define KMS_DRIVER_MINOR 50
#define KMS_DRIVER_PATCHLEVEL 0
-int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
-void radeon_driver_unload_kms(struct drm_device *dev);
-void radeon_driver_lastclose_kms(struct drm_device *dev);
-int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
-void radeon_driver_postclose_kms(struct drm_device *dev,
- struct drm_file *file_priv);
int radeon_suspend_kms(struct drm_device *dev, bool suspend,
bool fbcon, bool freeze);
int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
index 173deb4634146..ac7970919c4d3 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.h
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -118,4 +118,11 @@
long radeon_drm_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg);

+int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
+void radeon_driver_unload_kms(struct drm_device *dev);
+void radeon_driver_lastclose_kms(struct drm_device *dev);
+int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
+void radeon_driver_postclose_kms(struct drm_device *dev,
+ struct drm_file *file_priv);
+
#endif /* __RADEON_DRV_H__ */
--
2.25.1

2020-11-06 21:53:08

by Lee Jones

[permalink] [raw]
Subject: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

Unfortunately, a suitable one didn't already exist.

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

drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
637 | bool radeon_device_is_virtual(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon_device.c | 1 +
drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
3 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/radeon/radeon_device.h

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 7f384ffe848a7..ad572f965190b 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -42,6 +42,7 @@
#include <drm/drm_probe_helper.h>
#include <drm/radeon_drm.h>

+#include "radeon_device.h"
#include "radeon_reg.h"
#include "radeon.h"
#include "atom.h"
diff --git a/drivers/gpu/drm/radeon/radeon_device.h b/drivers/gpu/drm/radeon/radeon_device.h
new file mode 100644
index 0000000000000..c8e6dd2005224
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_device.h
@@ -0,0 +1,32 @@
+/* radeon_drv.h -- Private header for radeon device -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __RADEON_DEV_H__
+#define __RADEON_DEV_H__
+
+bool radeon_device_is_virtual(void);
+
+#endif /* __RADEON_DEV_H__ */
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index f5f1cb700d873..560267cc25892 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -51,6 +51,7 @@
#include <drm/radeon_drm.h>

#include "radeon_drv.h"
+#include "radeon_device.h"

/*
* KMS wrapper.
@@ -300,8 +301,6 @@ MODULE_DEVICE_TABLE(pci, pciidlist);

static struct drm_driver kms_driver;

-bool radeon_device_is_virtual(void);
-
static int radeon_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
--
2.25.1

2020-11-06 21:53:12

by Lee Jones

[permalink] [raw]
Subject: [PATCH 11/19] drm/radeon/radeon_drv: Source file headers are not good candidates for kernel-doc

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

drivers/gpu/drm/radeon/radeon_drv.c:2: warning: Cannot understand * file radeon_drv.c

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 560267cc25892..bb7b33e535f81 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -1,4 +1,4 @@
-/**
+/*
* \file radeon_drv.c
* ATI Radeon driver
*
--
2.25.1

2020-11-06 21:53:27

by Lee Jones

[permalink] [raw]
Subject: [PATCH 08/19] drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions

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

drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Function parameter or member 'file' not described in 'omap_gem_dumb_create'
drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Excess function parameter 'drm_file' description in 'omap_gem_dumb_create'
drivers/gpu/drm/omapdrm/omap_gem.c:619: warning: Function parameter or member 'offset' not described in 'omap_gem_dumb_map_offset'

Cc: Tomi Valkeinen <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/omapdrm/omap_gem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index d8e09792793ab..0e5adfaae6455 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -580,7 +580,7 @@ int omap_gem_mmap_obj(struct drm_gem_object *obj,

/**
* omap_gem_dumb_create - create a dumb buffer
- * @drm_file: our client file
+ * @file: our client file
* @dev: our device
* @args: the requested arguments copied from userspace
*
@@ -610,6 +610,7 @@ int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
* @file: our drm client file
* @dev: drm device
* @handle: GEM handle to the object (from dumb_create)
+ * @offset: memory map offset placeholder
*
* Do the necessary setup to allow the mapping of the frame buffer
* into user memory. We don't have to do much here at the moment.
--
2.25.1

2020-11-06 21:53:29

by Lee Jones

[permalink] [raw]
Subject: [PATCH 07/19] drm/radeon/radeon_kms: Include header containing our own prototypes

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

drivers/gpu/drm/radeon/radeon_kms.c:61:6: warning: no previous prototype for ‘radeon_driver_unload_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:104:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:618:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:633:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:704:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:755:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:825:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:852:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/radeon_kms.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 99ee60f8b604d..0d8fbabffcead 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -40,6 +40,7 @@

#include "radeon.h"
#include "radeon_asic.h"
+#include "radeon_drv.h"

#if defined(CONFIG_VGA_SWITCHEROO)
bool radeon_has_atpx(void);
--
2.25.1

2020-11-06 21:53:36

by Lee Jones

[permalink] [raw]
Subject: [PATCH 04/19] drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks

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

drivers/gpu/drm/mga/mga_dma.c:29: warning: Cannot understand * file mga_dma.c
drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dev' not described in 'mga_do_agp_dma_bootstrap'
drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dma_bs' not described in 'mga_do_agp_dma_bootstrap'
drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dev' not described in 'mga_do_pci_dma_bootstrap'
drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dma_bs' not described in 'mga_do_pci_dma_bootstrap'
drivers/gpu/drm/mga/mga_dma.c:1150: warning: Function parameter or member 'dev' not described in 'mga_driver_unload'
drivers/gpu/drm/mga/mga_dma.c:1159: warning: Function parameter or member 'dev' not described in 'mga_driver_lastclose'

Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: by <[email protected]>
Cc: Faith <[email protected]>
Cc: Jeff Hartmann <[email protected]>
Cc: Keith Whitwell <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/mga/mga_dma.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c
index 85c74364ce24c..1cb7d120d18fe 100644
--- a/drivers/gpu/drm/mga/mga_dma.c
+++ b/drivers/gpu/drm/mga/mga_dma.c
@@ -25,7 +25,7 @@
* DEALINGS IN THE SOFTWARE.
*/

-/**
+/*
* \file mga_dma.c
* DMA support for MGA G200 / G400.
*
@@ -435,7 +435,7 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags)
}

#if IS_ENABLED(CONFIG_AGP)
-/**
+/*
* Bootstrap the driver for AGP DMA.
*
* \todo
@@ -610,7 +610,7 @@ static int mga_do_agp_dma_bootstrap(struct drm_device *dev,
}
#endif

-/**
+/*
* Bootstrap the driver for PCI DMA.
*
* \todo
@@ -1143,7 +1143,7 @@ int mga_dma_buffers(struct drm_device *dev, void *data,
return ret;
}

-/**
+/*
* Called just before the module is unloaded.
*/
void mga_driver_unload(struct drm_device *dev)
@@ -1152,7 +1152,7 @@ void mga_driver_unload(struct drm_device *dev)
dev->dev_private = NULL;
}

-/**
+/*
* Called when the last opener of the device is closed.
*/
void mga_driver_lastclose(struct drm_device *dev)
--
2.25.1

2020-11-06 21:53:43

by Lee Jones

[permalink] [raw]
Subject: [PATCH 03/19] drm/selftests/test-drm_dp_mst_helper: Move 'sideband_msg_req_encode_decode' onto the heap

There is too much data being stored on the stack.

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

drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c: In function ‘sideband_msg_req_encode_decode’:
drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c:168:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
index e00bdc557f880..6b4759ed6bfd4 100644
--- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
+++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
@@ -122,7 +122,7 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
{
struct drm_dp_sideband_msg_req_body *out;
struct drm_printer p = drm_err_printer(PREFIX_STR);
- struct drm_dp_sideband_msg_tx txmsg;
+ struct drm_dp_sideband_msg_tx *txmsg;
int i, ret;
bool result = true;

@@ -130,8 +130,12 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
if (!out)
return false;

- drm_dp_encode_sideband_req(in, &txmsg);
- ret = drm_dp_decode_sideband_req(&txmsg, out);
+ txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
+ if (!txmsg)
+ return false;
+
+ drm_dp_encode_sideband_req(in, txmsg);
+ ret = drm_dp_decode_sideband_req(txmsg, out);
if (ret < 0) {
drm_printf(&p, "Failed to decode sideband request: %d\n",
ret);
@@ -166,6 +170,7 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)

out:
kfree(out);
+ kfree(txmsg);
return result;
}

--
2.25.1

2020-11-06 21:53:50

by Lee Jones

[permalink] [raw]
Subject: [PATCH 02/19] drm/r128/ati_pcigart: Source file headers are not good candidates for kernel-doc

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

drivers/gpu/drm/r128/ati_pcigart.c:2: warning: Cannot understand * file ati_pcigart.c

Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/r128/ati_pcigart.c b/drivers/gpu/drm/r128/ati_pcigart.c
index 3e76ae5a17eea..1234ec60c0aff 100644
--- a/drivers/gpu/drm/r128/ati_pcigart.c
+++ b/drivers/gpu/drm/r128/ati_pcigart.c
@@ -1,4 +1,4 @@
-/**
+/*
* \file ati_pcigart.c
* ATI PCI GART support
*
--
2.25.1

2020-11-06 21:53:58

by Lee Jones

[permalink] [raw]
Subject: [PATCH 06/19] drm/radeon/atom: Move prototype into shared location

Both source files include atom.h, which seems like a reasonable
location to place an atom based function into.

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

drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes]
1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/radeon/atom.h | 6 ++++++
drivers/gpu/drm/radeon/atombios_encoders.c | 4 ----
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
index 1bf06c91cd959..cb93b83114dbe 100644
--- a/drivers/gpu/drm/radeon/atom.h
+++ b/drivers/gpu/drm/radeon/atom.h
@@ -154,6 +154,12 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
bool atom_parse_cmd_header(struct atom_context *ctx, int index,
uint8_t *frev, uint8_t *crev);
int atom_allocate_fb_scratch(struct atom_context *ctx);
+
+struct drm_display_mode;
+struct radeon_device;
+bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
+ struct drm_display_mode *mode);
+
#include "atom-types.h"
#include "atombios.h"
#include "ObjectID.h"
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index cc5ee1b3af84f..85f903caf12e1 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -296,10 +296,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder)

#endif

-/* evil but including atombios.h is much worse */
-bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
- struct drm_display_mode *mode);
-
static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
--
2.25.1

2020-11-06 21:54:18

by Lee Jones

[permalink] [raw]
Subject: [PATCH 19/19] drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'

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

drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning: ‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=]

Cc: Eric Anholt <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/v3d/v3d_drv.c | 36 -----------------------------------
1 file changed, 36 deletions(-)

diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 9f7c261938312..a5bf09458451c 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -38,42 +38,6 @@
#define DRIVER_MINOR 0
#define DRIVER_PATCHLEVEL 0

-#ifdef CONFIG_PM
-static int v3d_runtime_suspend(struct device *dev)
-{
- struct drm_device *drm = dev_get_drvdata(dev);
- struct v3d_dev *v3d = to_v3d_dev(drm);
-
- v3d_irq_disable(v3d);
-
- clk_disable_unprepare(v3d->clk);
-
- return 0;
-}
-
-static int v3d_runtime_resume(struct device *dev)
-{
- struct drm_device *drm = dev_get_drvdata(dev);
- struct v3d_dev *v3d = to_v3d_dev(drm);
- int ret;
-
- ret = clk_prepare_enable(v3d->clk);
- if (ret != 0)
- return ret;
-
- /* XXX: VPM base */
-
- v3d_mmu_set_page_table(v3d);
- v3d_irq_enable(v3d);
-
- return 0;
-}
-#endif
-
-static const struct dev_pm_ops v3d_v3d_pm_ops = {
- SET_RUNTIME_PM_OPS(v3d_runtime_suspend, v3d_runtime_resume, NULL)
-};
-
static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
--
2.25.1

2020-11-06 21:55:11

by Lee Jones

[permalink] [raw]
Subject: [PATCH 09/19] drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format

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

drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'dmm' not described in 'dmm_txn_init'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'tcm' not described in 'dmm_txn_init'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'txn' not described in 'dmm_txn_append'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'area' not described in 'dmm_txn_append'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'pages' not described in 'dmm_txn_append'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'npages' not described in 'dmm_txn_append'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'roll' not described in 'dmm_txn_append'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'txn' not described in 'dmm_txn_commit'
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'wait' not described in 'dmm_txn_commit'

Cc: Tomi Valkeinen <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Andy Gross <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 42ec51bb7b1b0..cedaab456041a 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -306,7 +306,7 @@ static irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
return IRQ_HANDLED;
}

-/**
+/*
* Get a handle for a DMM transaction
*/
static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)
@@ -344,7 +344,7 @@ static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)
return txn;
}

-/**
+/*
* Add region to DMM transaction. If pages or pages[i] is NULL, then the
* corresponding slot is cleared (ie. dummy_pa is programmed)
*/
@@ -392,7 +392,7 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
return;
}

-/**
+/*
* Commit the DMM transaction.
*/
static int dmm_txn_commit(struct dmm_txn *txn, bool wait)
--
2.25.1

2020-11-06 22:25:26

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 02/19] drm/r128/ati_pcigart: Source file headers are not good candidates for kernel-doc

On Fri, Nov 06, 2020 at 09:49:32PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/r128/ati_pcigart.c:2: warning: Cannot understand * file ati_pcigart.c
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
Thanks, applied to drm-misc-next.

Sam

> ---
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/r128/ati_pcigart.c b/drivers/gpu/drm/r128/ati_pcigart.c
> index 3e76ae5a17eea..1234ec60c0aff 100644
> --- a/drivers/gpu/drm/r128/ati_pcigart.c
> +++ b/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -1,4 +1,4 @@
> -/**
> +/*
> * \file ati_pcigart.c
> * ATI PCI GART support
> *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-06 22:25:36

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 04/19] drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks

On Fri, Nov 06, 2020 at 09:49:34PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/mga/mga_dma.c:29: warning: Cannot understand * file mga_dma.c
> drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dev' not described in 'mga_do_agp_dma_bootstrap'
> drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dma_bs' not described in 'mga_do_agp_dma_bootstrap'
> drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dev' not described in 'mga_do_pci_dma_bootstrap'
> drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dma_bs' not described in 'mga_do_pci_dma_bootstrap'
> drivers/gpu/drm/mga/mga_dma.c:1150: warning: Function parameter or member 'dev' not described in 'mga_driver_unload'
> drivers/gpu/drm/mga/mga_dma.c:1159: warning: Function parameter or member 'dev' not described in 'mga_driver_lastclose'
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: by <[email protected]>
> Cc: Faith <[email protected]>
> Cc: Jeff Hartmann <[email protected]>
> Cc: Keith Whitwell <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
Thanks, apllied to drm-misc-next.

Sam

2020-11-06 22:25:39

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 05/19] drm/mga/mga_state: Remove unused variable 'buf_priv'

On Fri, Nov 06, 2020 at 09:49:35PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/mga/mga_state.c: In function ‘mga_dma_iload’:
> drivers/gpu/drm/mga/mga_state.c:945:22: warning: variable ‘buf_priv’ set but not used [-Wunused-but-set-variable]
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: by <[email protected]>
> Cc: Jeff Hartmann <[email protected]>
> Cc: Keith Whitwell <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
Likewise applied,

Sam

2020-11-06 22:29:15

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

Hi Lee and DRM folks.

On Fri, Nov 06, 2020 at 09:49:30PM +0000, 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.
>
> There are 5000 warnings to work through. It will take a couple more
> sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> variables to where they're used") does take care of 2000 of them!
>
> Lee Jones (19):
> drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> drm/r128/ati_pcigart: Source file headers are not good candidates for
> kernel-doc
Applied

> drm/selftests/test-drm_dp_mst_helper: Move
> 'sideband_msg_req_encode_decode' onto the heap
> drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> drm/mga/mga_state: Remove unused variable 'buf_priv'
Applied x2

> drm/radeon/atom: Move prototype into shared location
> drm/radeon/radeon_kms: Include header containing our own prototypes
> drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> drm/radeon/radeon: Move prototype into shared header
> drm/radeon/radeon_drv: Source file headers are not good candidates for
> kernel-doc
> drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> used
> drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> params
> drm/radeon: Move prototypes to shared header
> drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> dev_info' from the stack
> drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> drm/radeon/atombios_crtc: Remove description of non-existent function
> param 'encoder'
> drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'

I have applied the three patches that has no obvious maintainer as indicated
above. I assume the respective maintaines to pick radeon, omapdrm, ttm,
amd, v3d and selftest patches.

Sam

2020-11-07 12:17:30

by Christian König

[permalink] [raw]
Subject: Re: [PATCH 01/19] drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header

Am 06.11.20 um 22:49 schrieb Lee Jones:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/ttm/ttm_range_manager.c:46: warning: cannot understand function prototype: 'struct ttm_range_manager '
>
> Cc: Christian Koenig <[email protected]>
> Cc: Huang Rui <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Reviewed-by: Christian König <[email protected]>

> ---
> drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
> index ea77919569a2e..e0952444cea93 100644
> --- a/drivers/gpu/drm/ttm/ttm_range_manager.c
> +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
> @@ -37,7 +37,7 @@
> #include <linux/spinlock.h>
> #include <linux/module.h>
>
> -/**
> +/*
> * Currently we use a spinlock for the lock, but a mutex *may* be
> * more appropriate to reduce scheduling latency if the range manager
> * ends up with very fragmented allocation patterns.

2020-11-07 12:31:32

by Christian König

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

Well that's quite a patch set.

First of all can you separate this a bit more by driver? I'm assuming we
maintainers are supposed to pick that up and apply it.

radeon and amdgpu can stick together since that is mostly Alex and me,
but I'm not sure if we want to do some of the suggested changes to radeon.

Going to pick up the single TTM change for upstreaming.

Thanks,
Christian.

Am 06.11.20 um 22:49 schrieb 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.
>
> There are 5000 warnings to work through. It will take a couple more
> sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> variables to where they're used") does take care of 2000 of them!
>
> Lee Jones (19):
> drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> drm/r128/ati_pcigart: Source file headers are not good candidates for
> kernel-doc
> drm/selftests/test-drm_dp_mst_helper: Move
> 'sideband_msg_req_encode_decode' onto the heap
> drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> drm/mga/mga_state: Remove unused variable 'buf_priv'
> drm/radeon/atom: Move prototype into shared location
> drm/radeon/radeon_kms: Include header containing our own prototypes
> drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> drm/radeon/radeon: Move prototype into shared header
> drm/radeon/radeon_drv: Source file headers are not good candidates for
> kernel-doc
> drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> used
> drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> params
> drm/radeon: Move prototypes to shared header
> drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> dev_info' from the stack
> drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> drm/radeon/atombios_crtc: Remove description of non-existent function
> param 'encoder'
> drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
> .../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
> .../gpu/drm/amd/display/include/fixed31_32.h | 6 -
> drivers/gpu/drm/mga/mga_dma.c | 10 +-
> drivers/gpu/drm/mga/mga_state.c | 2 -
> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
> drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> drivers/gpu/drm/radeon/atom.h | 6 +
> drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
> drivers/gpu/drm/radeon/radeon.h | 6 +
> drivers/gpu/drm/radeon/radeon_device.c | 1 +
> drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
> drivers/gpu/drm/radeon/radeon_display.c | 4 -
> drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
> drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
> drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
> .../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
> drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
> 22 files changed, 138 insertions(+), 126 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
>
> Cc: Alex Deucher <[email protected]>
> Cc: [email protected]
> Cc: Andy Gross <[email protected]>
> Cc: by <[email protected]>
> Cc: Christian Koenig <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: [email protected]
> Cc: Eric Anholt <[email protected]>
> Cc: Faith <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: Harry Wentland <[email protected]>
> Cc: Huang Rui <[email protected]>
> Cc: Jeff Hartmann <[email protected]>
> Cc: Keith Whitwell <[email protected]>
> Cc: Leo Li <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Philipp Zabel <[email protected]>
> Cc: Rob Clark <[email protected]>
> Cc: Rob Clark <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>

2020-11-07 14:32:17

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

Hi Lee,

On Fri, Nov 06, 2020 at 09:49:40PM +0000, Lee Jones wrote:
> Unfortunately, a suitable one didn't already exist.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
> 637 | bool radeon_device_is_virtual(void)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_device.c | 1 +
> drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
> drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
> 3 files changed, 34 insertions(+), 2 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_device.h

Other public functions in radeon_device.c have their prototype in
radeon.h - for example radeon_is_px()

Add radeon_device_is_virtual() there so we avoiid this new header.

Sam

2020-11-07 14:32:27

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

Hi Lee,

On Fri, Nov 06, 2020 at 09:49:47PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian K?nig" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 0d8fbabffcead..21c206795c364 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> /**
> * radeon_info_ioctl - answer a device specific request.
> *
> - * @rdev: radeon device pointer
> + * @dev: radeon device pointer
> * @data: request object
> * @filp: drm filp
> *

Delete all the kernel-doc annotation as we do not pull this file into
the kernel-doc anyway.

Keep the /* Answer a device specific request */ part.

At least thats what I see as the best way to deal with it.

Sam

2020-11-07 15:09:59

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Sat, 07 Nov 2020, Christian König wrote:

> Well that's quite a patch set.
>
> First of all can you separate this a bit more by driver? I'm assuming we
> maintainers are supposed to pick that up and apply it.

I'm not sure what would achieve? It's not a pull-request.

Either way, patches should be applied individually.

> radeon and amdgpu can stick together since that is mostly Alex and me, but
> I'm not sure if we want to do some of the suggested changes to radeon.

That's fine. Just review, providing your reasons as to why they are
not suitable and we'll work through the issues together, patch by
patch.

> Going to pick up the single TTM change for upstreaming.

Thanks.

> Am 06.11.20 um 22:49 schrieb 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.
> >
> > There are 5000 warnings to work through. It will take a couple more
> > sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> > variables to where they're used") does take care of 2000 of them!
> >
> > Lee Jones (19):
> > drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> > drm/r128/ati_pcigart: Source file headers are not good candidates for
> > kernel-doc
> > drm/selftests/test-drm_dp_mst_helper: Move
> > 'sideband_msg_req_encode_decode' onto the heap
> > drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> > drm/mga/mga_state: Remove unused variable 'buf_priv'
> > drm/radeon/atom: Move prototype into shared location
> > drm/radeon/radeon_kms: Include header containing our own prototypes
> > drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> > drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> > drm/radeon/radeon: Move prototype into shared header
> > drm/radeon/radeon_drv: Source file headers are not good candidates for
> > kernel-doc
> > drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> > used
> > drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> > drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> > params
> > drm/radeon: Move prototypes to shared header
> > drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> > dev_info' from the stack
> > drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> > drm/radeon/atombios_crtc: Remove description of non-existent function
> > param 'encoder'
> > drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
> > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
> > .../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
> > .../gpu/drm/amd/display/include/fixed31_32.h | 6 -
> > drivers/gpu/drm/mga/mga_dma.c | 10 +-
> > drivers/gpu/drm/mga/mga_state.c | 2 -
> > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
> > drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
> > drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> > drivers/gpu/drm/radeon/atom.h | 6 +
> > drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> > drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
> > drivers/gpu/drm/radeon/radeon.h | 6 +
> > drivers/gpu/drm/radeon/radeon_device.c | 1 +
> > drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
> > drivers/gpu/drm/radeon/radeon_display.c | 4 -
> > drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
> > drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
> > drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
> > .../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
> > drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> > drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
> > 22 files changed, 138 insertions(+), 126 deletions(-)
> > create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: [email protected]
> > Cc: Andy Gross <[email protected]>
> > Cc: by <[email protected]>
> > Cc: Christian Koenig <[email protected]>
> > Cc: "Christian König" <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: [email protected]
> > Cc: Eric Anholt <[email protected]>
> > Cc: Faith <[email protected]>
> > Cc: Gareth Hughes <[email protected]>
> > Cc: Harry Wentland <[email protected]>
> > Cc: Huang Rui <[email protected]>
> > Cc: Jeff Hartmann <[email protected]>
> > Cc: Keith Whitwell <[email protected]>
> > Cc: Leo Li <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: Philipp Zabel <[email protected]>
> > Cc: Rob Clark <[email protected]>
> > Cc: Rob Clark <[email protected]>
> > Cc: Sumit Semwal <[email protected]>
> > Cc: Tomi Valkeinen <[email protected]>
>

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

2020-11-07 15:15:38

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Sat, 07 Nov 2020, Sam Ravnborg wrote:

> Hi Lee,
>
> On Fri, Nov 06, 2020 at 09:49:47PM +0000, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: "Christian König" <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > index 0d8fbabffcead..21c206795c364 100644
> > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > /**
> > * radeon_info_ioctl - answer a device specific request.
> > *
> > - * @rdev: radeon device pointer
> > + * @dev: radeon device pointer
> > * @data: request object
> > * @filp: drm filp
> > *
>
> Delete all the kernel-doc annotation as we do not pull this file into
> the kernel-doc anyway.
>
> Keep the /* Answer a device specific request */ part.
>
> At least thats what I see as the best way to deal with it.

Demoting all headers, even if they are conformant, it not the way to
go. Some contributors/maintainers prefer to keep the kernel-doc
(pretty colours, automated checking [a la, this patch!] and the-like)
formatting, even if they are not directly referenced from
/Documentation.

For now, so long as the build is happy, I am happy.

If you wish to make the build unhappy about this, you should take up
the argument to encompass `scripts/find-unused-docs.sh` into it.

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

2020-11-07 15:18:57

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

On Sat, 07 Nov 2020, Sam Ravnborg wrote:

> Hi Lee,
>
> On Fri, Nov 06, 2020 at 09:49:40PM +0000, Lee Jones wrote:
> > Unfortunately, a suitable one didn't already exist.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
> > 637 | bool radeon_device_is_virtual(void)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: "Christian König" <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Sumit Semwal <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/radeon/radeon_device.c | 1 +
> > drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
> > drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
> > 3 files changed, 34 insertions(+), 2 deletions(-)
> > create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
>
> Other public functions in radeon_device.c have their prototype in
> radeon.h - for example radeon_is_px()
>
> Add radeon_device_is_virtual() there so we avoiid this new header.

I'm happy to do that, if it's deemed better.

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

2020-11-07 17:37:05

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

Hi Christian.

> I'm not sure if we want to do some of the suggested changes to radeon.

All patches for radeon looks good to me except "drm/radeon/radeon: Move
prototype into shared header".

Acked-by: Sam Ravnborg <[email protected]>
from me to have them applied (except the shared header one).
I can reply to the individual patches if you like.

Sam

2020-11-07 18:44:12

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Sat, 07 Nov 2020, Sam Ravnborg wrote:

> Hi Christian.
>
> > I'm not sure if we want to do some of the suggested changes to radeon.
>
> All patches for radeon looks good to me except "drm/radeon/radeon: Move
> prototype into shared header".

Was that the one where the prototype needs moving to radeon.h?

> Acked-by: Sam Ravnborg <[email protected]>
> from me to have them applied (except the shared header one).

Thanks Sam.

> I can reply to the individual patches if you like.

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

2020-11-07 19:32:15

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Sat, Nov 07, 2020 at 06:41:38PM +0000, Lee Jones wrote:
> On Sat, 07 Nov 2020, Sam Ravnborg wrote:
>
> > Hi Christian.
> >
> > > I'm not sure if we want to do some of the suggested changes to radeon.
> >
> > All patches for radeon looks good to me except "drm/radeon/radeon: Move
> > prototype into shared header".
>
> Was that the one where the prototype needs moving to radeon.h?
Yes,

Sam

2020-11-09 11:08:10

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

On Sat, 07 Nov 2020, Sam Ravnborg wrote:

> Hi Lee,
>
> On Fri, Nov 06, 2020 at 09:49:40PM +0000, Lee Jones wrote:
> > Unfortunately, a suitable one didn't already exist.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
> > 637 | bool radeon_device_is_virtual(void)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: "Christian König" <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Sumit Semwal <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/radeon/radeon_device.c | 1 +
> > drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
> > drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
> > 3 files changed, 34 insertions(+), 2 deletions(-)
> > create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
>
> Other public functions in radeon_device.c have their prototype in
> radeon.h - for example radeon_is_px()
>
> Add radeon_device_is_virtual() there so we avoiid this new header.

Oh yes, I remember why this wasn't a suitable solution now:

The macro "radeon_init" in radeon.h clashes with the init function of
the same name in radeon_drv.c:

In file included from drivers/gpu/drm/radeon/radeon_drv.c:53:
drivers/gpu/drm/radeon/radeon_drv.c:620:31: error: expected identifier or ‘(’ before ‘void’
620 | static int __init radeon_init(void)
| ^~~~
drivers/gpu/drm/radeon/radeon.h:2705:28: note: in definition of macro ‘radeon_init’
2705 | #define radeon_init(rdev) (rdev)->asic->init((rdev))
| ^~~~
In file included from drivers/gpu/drm/radeon/radeon_drv.c:35:
drivers/gpu/drm/radeon/radeon_drv.c: In function ‘__inittest’:
drivers/gpu/drm/radeon/radeon_drv.c:653:13: error: ‘radeon_init’ undeclared (first use in this function); did you mean ‘radeon_exit’?
653 | module_init(radeon_init);
| ^~~~~~~~~~~
include/linux/module.h:133:11: note: in definition of macro ‘module_init’
133 | { return initfn; } | ^~~~~~
drivers/gpu/drm/radeon/radeon_drv.c:653:13: note: each undeclared identifier is reported only once for each function it appears in
653 | module_init(radeon_init);
| ^~~~~~~~~~~
include/linux/module.h:133:11: note: in definition of macro ‘module_init’
133 | { return initfn; } | ^~~~~~
In file included from include/linux/compiler_types.h:65,
from <command-line>:
drivers/gpu/drm/radeon/radeon_drv.c: At top level:
drivers/gpu/drm/radeon/radeon_drv.c:653:13: error: ‘radeon_init’ undeclared here (not in a function); did you mean ‘radeon_exit’?
653 | module_init(radeon_init);
| ^~~~~~~~~~~
include/linux/compiler_attributes.h:109:65: note: in definition of macro ‘__copy’
109 | # define __copy(symbol) __attribute__((__copy__(symbol)))
| ^~~~~~
drivers/gpu/drm/radeon/radeon_drv.c:653:1: note: in expansion of macro ‘module_init’
653 | module_init(radeon_init);
| ^~~~~~~~~~~
In file included from drivers/gpu/drm/radeon/radeon_drv.c:35:
include/linux/module.h:134:6: error: ‘init_module’ aliased to undefined symbol ‘radeon_init’
134 | int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_drv.c:653:1: note: in expansion of macro ‘module_init’
653 | module_init(radeon_init);
| ^~~~~~~~~~~

How would you like me to move forward?

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

2020-11-09 15:28:32

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

Hi Lee,
> >
> > Other public functions in radeon_device.c have their prototype in
> > radeon.h - for example radeon_is_px()
> >
> > Add radeon_device_is_virtual() there so we avoiid this new header.
>
> Oh yes, I remember why this wasn't a suitable solution now:
>
> The macro "radeon_init" in radeon.h clashes with the init function of
> the same name in radeon_drv.c:
>
> In file included from drivers/gpu/drm/radeon/radeon_drv.c:53:
> drivers/gpu/drm/radeon/radeon_drv.c:620:31: error: expected identifier or ‘(’ before ‘void’
> 620 | static int __init radeon_init(void)
...
>
> How would you like me to move forward?

Fix the thousand of warnings in other places :-)
I will take a look at radeon and post a new series based on your work
with all W=1 warnings fixed.

Sam

2020-11-09 16:13:00

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 10/19] drm/radeon/radeon: Move prototype into shared header

On Mon, 09 Nov 2020, Sam Ravnborg wrote:

> Hi Lee,
> > >
> > > Other public functions in radeon_device.c have their prototype in
> > > radeon.h - for example radeon_is_px()
> > >
> > > Add radeon_device_is_virtual() there so we avoiid this new header.
> >
> > Oh yes, I remember why this wasn't a suitable solution now:
> >
> > The macro "radeon_init" in radeon.h clashes with the init function of
> > the same name in radeon_drv.c:
> >
> > In file included from drivers/gpu/drm/radeon/radeon_drv.c:53:
> > drivers/gpu/drm/radeon/radeon_drv.c:620:31: error: expected identifier or ‘(’ before ‘void’
> > 620 | static int __init radeon_init(void)
> ...
> >
> > How would you like me to move forward?
>
> Fix the thousand of warnings in other places :-)
> I will take a look at radeon and post a new series based on your work
> with all W=1 warnings fixed.

I'll drop this patch and carry on ploughing through the rest of them.

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

2020-11-09 19:54:36

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 0d8fbabffcead..21c206795c364 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> /**
> * radeon_info_ioctl - answer a device specific request.
> *
> - * @rdev: radeon device pointer
> + * @dev: radeon device pointer

This should be:
+ * @dev: drm device pointer

Alex

> * @data: request object
> * @filp: drm filp
> *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-09 19:58:56

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 14/19] drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr' params

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:594: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg'
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:624: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg64'
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 300fcade4a2b1..63374d12e00fe 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -585,6 +585,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)
> * @adev: amdgpu_device pointer
> * @pcie_index: mmio register offset
> * @pcie_data: mmio register offset
> + * @reg_addr: indirect register address to read from
> *
> * Returns the value of indirect register @reg_addr
> */
> @@ -615,6 +616,7 @@ u32 amdgpu_device_indirect_rreg(struct amdgpu_device *adev,
> * @adev: amdgpu_device pointer
> * @pcie_index: mmio register offset
> * @pcie_data: mmio register offset
> + * @reg_addr: indirect register address to read from
> *
> * Returns the value of indirect register @reg_addr
> */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-09 20:00:07

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

Hi Alex,
On Mon, Nov 09, 2020 at 02:50:35PM -0500, Alex Deucher wrote:
> On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: "Christian K?nig" <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > index 0d8fbabffcead..21c206795c364 100644
> > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > /**
> > * radeon_info_ioctl - answer a device specific request.
> > *
> > - * @rdev: radeon device pointer
> > + * @dev: radeon device pointer
>
> This should be:
> + * @dev: drm device pointer

good spot. I am continuing the work on radeon and will post a patchset
that contains only radeon fixes with Lee's patches and a few more by me.
I will fix the above.

Sam

2020-11-09 20:01:04

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 12/19] drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're used

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Also rid some unused ones.
>
> This patch solves 2000 warnings!
>
> Fixes the following W=1 kernel build warning(s):
>
> In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
> from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
> from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
> from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:35:
> At top level:
> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: ‘dc_fixpt_ln2_div_2’ defined but not used [-Wunused-const-variable=]
> 76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
> | ^~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: ‘dc_fixpt_ln2’ defined but not used [-Wunused-const-variable=]
> 75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
> | ^~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: ‘dc_fixpt_e’ defined but not used [-Wunused-const-variable=]
> 74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
> | ^~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: ‘dc_fixpt_two_pi’ defined but not used [-Wunused-const-variable=]
> 73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
> | ^~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]
> 72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
> | ^~~~~~~~~~~
>
> Cc: Harry Wentland <[email protected]>
> Cc: Leo Li <[email protected]>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 5 +++++
> drivers/gpu/drm/amd/display/include/fixed31_32.h | 6 ------
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> index 1e9a2d3520684..59f37563704ad 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> @@ -26,6 +26,11 @@
> #include "dm_services.h"
> #include "include/fixed31_32.h"
>
> +static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
> +static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
> +static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
> +static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
> +
> static inline unsigned long long abs_i64(
> long long arg)
> {
> diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h b/drivers/gpu/drm/amd/display/include/fixed31_32.h
> index 16df2a485dd0d..22053d7ea6ced 100644
> --- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
> +++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
> @@ -69,12 +69,6 @@ static const struct fixed31_32 dc_fixpt_epsilon = { 1LL };
> static const struct fixed31_32 dc_fixpt_half = { 0x80000000LL };
> static const struct fixed31_32 dc_fixpt_one = { 0x100000000LL };
>
> -static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
> -static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
> -static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
> -static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
> -static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
> -
> /*
> * @brief
> * Initialization routines
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-09 20:03:56

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Mon, 09 Nov 2020, Alex Deucher wrote:

> On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> >
> > Cc: Alex Deucher <[email protected]>
> > Cc: "Christian König" <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > index 0d8fbabffcead..21c206795c364 100644
> > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > /**
> > * radeon_info_ioctl - answer a device specific request.
> > *
> > - * @rdev: radeon device pointer
> > + * @dev: radeon device pointer
>
> This should be:
> + * @dev: drm device pointer

Makes sense. If you don't fancy fixing this up, I'll send out a
fix-up in a few days.

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

2020-11-09 20:07:59

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 16/19] drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device dev_info' from the stack

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Place it on the heap instead.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c: In function ‘amdgpu_info_ioctl’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:979:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex


> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++++++-----------
> 1 file changed, 55 insertions(+), 49 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 918d4e9c6461a..ef6fa5007d135 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -721,38 +721,42 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
> return n ? -EFAULT : 0;
> }
> case AMDGPU_INFO_DEV_INFO: {
> - struct drm_amdgpu_info_device dev_info;
> + struct drm_amdgpu_info_device *dev_info;
> uint64_t vm_size;
> + int ret;
> +
> + dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
> + if (!dev_info)
> + return -ENOMEM;
>
> - memset(&dev_info, 0, sizeof(dev_info));
> - dev_info.device_id = dev->pdev->device;
> - dev_info.chip_rev = adev->rev_id;
> - dev_info.external_rev = adev->external_rev_id;
> - dev_info.pci_rev = dev->pdev->revision;
> - dev_info.family = adev->family;
> - dev_info.num_shader_engines = adev->gfx.config.max_shader_engines;
> - dev_info.num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
> + dev_info->device_id = dev->pdev->device;
> + dev_info->chip_rev = adev->rev_id;
> + dev_info->external_rev = adev->external_rev_id;
> + dev_info->pci_rev = dev->pdev->revision;
> + dev_info->family = adev->family;
> + dev_info->num_shader_engines = adev->gfx.config.max_shader_engines;
> + dev_info->num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
> /* return all clocks in KHz */
> - dev_info.gpu_counter_freq = amdgpu_asic_get_xclk(adev) * 10;
> + dev_info->gpu_counter_freq = amdgpu_asic_get_xclk(adev) * 10;
> if (adev->pm.dpm_enabled) {
> - dev_info.max_engine_clock = amdgpu_dpm_get_sclk(adev, false) * 10;
> - dev_info.max_memory_clock = amdgpu_dpm_get_mclk(adev, false) * 10;
> + dev_info->max_engine_clock = amdgpu_dpm_get_sclk(adev, false) * 10;
> + dev_info->max_memory_clock = amdgpu_dpm_get_mclk(adev, false) * 10;
> } else {
> - dev_info.max_engine_clock = adev->clock.default_sclk * 10;
> - dev_info.max_memory_clock = adev->clock.default_mclk * 10;
> + dev_info->max_engine_clock = adev->clock.default_sclk * 10;
> + dev_info->max_memory_clock = adev->clock.default_mclk * 10;
> }
> - dev_info.enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
> - dev_info.num_rb_pipes = adev->gfx.config.max_backends_per_se *
> + dev_info->enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
> + dev_info->num_rb_pipes = adev->gfx.config.max_backends_per_se *
> adev->gfx.config.max_shader_engines;
> - dev_info.num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
> - dev_info._pad = 0;
> - dev_info.ids_flags = 0;
> + dev_info->num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
> + dev_info->_pad = 0;
> + dev_info->ids_flags = 0;
> if (adev->flags & AMD_IS_APU)
> - dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
> + dev_info->ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
> if (amdgpu_mcbp || amdgpu_sriov_vf(adev))
> - dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
> + dev_info->ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
> if (amdgpu_is_tmz(adev))
> - dev_info.ids_flags |= AMDGPU_IDS_FLAGS_TMZ;
> + dev_info->ids_flags |= AMDGPU_IDS_FLAGS_TMZ;
>
> vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
> vm_size -= AMDGPU_VA_RESERVED_SIZE;
> @@ -762,45 +766,47 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
> adev->vce.fw_version < AMDGPU_VCE_FW_53_45)
> vm_size = min(vm_size, 1ULL << 40);
>
> - dev_info.virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;
> - dev_info.virtual_address_max =
> + dev_info->virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;
> + dev_info->virtual_address_max =
> min(vm_size, AMDGPU_GMC_HOLE_START);
>
> if (vm_size > AMDGPU_GMC_HOLE_START) {
> - dev_info.high_va_offset = AMDGPU_GMC_HOLE_END;
> - dev_info.high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
> + dev_info->high_va_offset = AMDGPU_GMC_HOLE_END;
> + dev_info->high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
> }
> - dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
> - dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
> - dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE;
> - dev_info.cu_active_number = adev->gfx.cu_info.number;
> - dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
> - dev_info.ce_ram_size = adev->gfx.ce_ram_size;
> - memcpy(&dev_info.cu_ao_bitmap[0], &adev->gfx.cu_info.ao_cu_bitmap[0],
> + dev_info->virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
> + dev_info->pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
> + dev_info->gart_page_size = AMDGPU_GPU_PAGE_SIZE;
> + dev_info->cu_active_number = adev->gfx.cu_info.number;
> + dev_info->cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
> + dev_info->ce_ram_size = adev->gfx.ce_ram_size;
> + memcpy(&dev_info->cu_ao_bitmap[0], &adev->gfx.cu_info.ao_cu_bitmap[0],
> sizeof(adev->gfx.cu_info.ao_cu_bitmap));
> - memcpy(&dev_info.cu_bitmap[0], &adev->gfx.cu_info.bitmap[0],
> + memcpy(&dev_info->cu_bitmap[0], &adev->gfx.cu_info.bitmap[0],
> sizeof(adev->gfx.cu_info.bitmap));
> - dev_info.vram_type = adev->gmc.vram_type;
> - dev_info.vram_bit_width = adev->gmc.vram_width;
> - dev_info.vce_harvest_config = adev->vce.harvest_config;
> - dev_info.gc_double_offchip_lds_buf =
> + dev_info->vram_type = adev->gmc.vram_type;
> + dev_info->vram_bit_width = adev->gmc.vram_width;
> + dev_info->vce_harvest_config = adev->vce.harvest_config;
> + dev_info->gc_double_offchip_lds_buf =
> adev->gfx.config.double_offchip_lds_buf;
> - dev_info.wave_front_size = adev->gfx.cu_info.wave_front_size;
> - dev_info.num_shader_visible_vgprs = adev->gfx.config.max_gprs;
> - dev_info.num_cu_per_sh = adev->gfx.config.max_cu_per_sh;
> - dev_info.num_tcc_blocks = adev->gfx.config.max_texture_channel_caches;
> - dev_info.gs_vgt_table_depth = adev->gfx.config.gs_vgt_table_depth;
> - dev_info.gs_prim_buffer_depth = adev->gfx.config.gs_prim_buffer_depth;
> - dev_info.max_gs_waves_per_vgt = adev->gfx.config.max_gs_threads;
> + dev_info->wave_front_size = adev->gfx.cu_info.wave_front_size;
> + dev_info->num_shader_visible_vgprs = adev->gfx.config.max_gprs;
> + dev_info->num_cu_per_sh = adev->gfx.config.max_cu_per_sh;
> + dev_info->num_tcc_blocks = adev->gfx.config.max_texture_channel_caches;
> + dev_info->gs_vgt_table_depth = adev->gfx.config.gs_vgt_table_depth;
> + dev_info->gs_prim_buffer_depth = adev->gfx.config.gs_prim_buffer_depth;
> + dev_info->max_gs_waves_per_vgt = adev->gfx.config.max_gs_threads;
>
> if (adev->family >= AMDGPU_FAMILY_NV)
> - dev_info.pa_sc_tile_steering_override =
> + dev_info->pa_sc_tile_steering_override =
> adev->gfx.config.pa_sc_tile_steering_override;
>
> - dev_info.tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;
> + dev_info->tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;
>
> - return copy_to_user(out, &dev_info,
> - min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
> + ret = copy_to_user(out, dev_info,
> + min((size_t)size, sizeof(*dev_info))) ? -EFAULT : 0;
> + kfree(dev_info);
> + return ret;
> }
> case AMDGPU_INFO_VCE_CLOCK_TABLE: {
> unsigned i;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-09 20:08:08

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Mon, Nov 9, 2020 at 2:56 PM Sam Ravnborg <[email protected]> wrote:
>
> Hi Alex,
> On Mon, Nov 09, 2020 at 02:50:35PM -0500, Alex Deucher wrote:
> > On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> > >
> > > Fixes the following W=1 kernel build warning(s):
> > >
> > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> > >
> > > Cc: Alex Deucher <[email protected]>
> > > Cc: "Christian König" <[email protected]>
> > > Cc: David Airlie <[email protected]>
> > > Cc: Daniel Vetter <[email protected]>
> > > Cc: [email protected]
> > > Cc: [email protected]
> > > Signed-off-by: Lee Jones <[email protected]>
> > > ---
> > > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > > index 0d8fbabffcead..21c206795c364 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > > /**
> > > * radeon_info_ioctl - answer a device specific request.
> > > *
> > > - * @rdev: radeon device pointer
> > > + * @dev: radeon device pointer
> >
> > This should be:
> > + * @dev: drm device pointer
>
> good spot. I am continuing the work on radeon and will post a patchset
> that contains only radeon fixes with Lee's patches and a few more by me.
> I will fix the above.

Awesome. Thanks!

Alex

2020-11-09 20:12:50

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Mon, 09 Nov 2020, Sam Ravnborg wrote:

> Hi Alex,
> On Mon, Nov 09, 2020 at 02:50:35PM -0500, Alex Deucher wrote:
> > On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> > >
> > > Fixes the following W=1 kernel build warning(s):
> > >
> > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> > >
> > > Cc: Alex Deucher <[email protected]>
> > > Cc: "Christian König" <[email protected]>
> > > Cc: David Airlie <[email protected]>
> > > Cc: Daniel Vetter <[email protected]>
> > > Cc: [email protected]
> > > Cc: [email protected]
> > > Signed-off-by: Lee Jones <[email protected]>
> > > ---
> > > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > > index 0d8fbabffcead..21c206795c364 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > > /**
> > > * radeon_info_ioctl - answer a device specific request.
> > > *
> > > - * @rdev: radeon device pointer
> > > + * @dev: radeon device pointer
> >
> > This should be:
> > + * @dev: drm device pointer
>
> good spot. I am continuing the work on radeon and will post a patchset
> that contains only radeon fixes with Lee's patches and a few more by me.
> I will fix the above.

What do you mean by "continuing on"?

How will you prevent your work from conflicting with my current effort?

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

2020-11-09 20:56:30

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Mon, Nov 09, 2020 at 08:10:13PM +0000, Lee Jones wrote:
> On Mon, 09 Nov 2020, Sam Ravnborg wrote:
>
> > Hi Alex,
> > On Mon, Nov 09, 2020 at 02:50:35PM -0500, Alex Deucher wrote:
> > > On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> > > >
> > > > Fixes the following W=1 kernel build warning(s):
> > > >
> > > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> > > >
> > > > Cc: Alex Deucher <[email protected]>
> > > > Cc: "Christian K?nig" <[email protected]>
> > > > Cc: David Airlie <[email protected]>
> > > > Cc: Daniel Vetter <[email protected]>
> > > > Cc: [email protected]
> > > > Cc: [email protected]
> > > > Signed-off-by: Lee Jones <[email protected]>
> > > > ---
> > > > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > > > index 0d8fbabffcead..21c206795c364 100644
> > > > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > > > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > > > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > > > /**
> > > > * radeon_info_ioctl - answer a device specific request.
> > > > *
> > > > - * @rdev: radeon device pointer
> > > > + * @dev: radeon device pointer
> > >
> > > This should be:
> > > + * @dev: drm device pointer
> >
> > good spot. I am continuing the work on radeon and will post a patchset
> > that contains only radeon fixes with Lee's patches and a few more by me.
> > I will fix the above.
>
> What do you mean by "continuing on"?
>
> How will you prevent your work from conflicting with my current effort?

Quoting from previous mail in this thread:

"
> > How would you like me to move forward?
>
> Fix the thousand of warnings in other places :-)
> I will take a look at radeon and post a new series based on your work
> with all W=1 warnings fixed.

I'll drop this patch and carry on ploughing through the rest of them.
"

Here I promised you to fix all warnings in the radeon driver.
And despite this being more work than anticipated a promise is a
promise. So therefore I started working on this.

If you want to do the rest of the radeon driver you are welcome and I
will gladly drop this again. Just let me know your preference.

Sam

2020-11-09 21:17:41

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 17/19] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param

On Mon, 09 Nov 2020, Sam Ravnborg wrote:

> On Mon, Nov 09, 2020 at 08:10:13PM +0000, Lee Jones wrote:
> > On Mon, 09 Nov 2020, Sam Ravnborg wrote:
> >
> > > Hi Alex,
> > > On Mon, Nov 09, 2020 at 02:50:35PM -0500, Alex Deucher wrote:
> > > > On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
> > > > >
> > > > > Fixes the following W=1 kernel build warning(s):
> > > > >
> > > > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl'
> > > > > drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl'
> > > > >
> > > > > Cc: Alex Deucher <[email protected]>
> > > > > Cc: "Christian König" <[email protected]>
> > > > > Cc: David Airlie <[email protected]>
> > > > > Cc: Daniel Vetter <[email protected]>
> > > > > Cc: [email protected]
> > > > > Cc: [email protected]
> > > > > Signed-off-by: Lee Jones <[email protected]>
> > > > > ---
> > > > > drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> > > > > index 0d8fbabffcead..21c206795c364 100644
> > > > > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > > > > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > > > > @@ -213,7 +213,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
> > > > > /**
> > > > > * radeon_info_ioctl - answer a device specific request.
> > > > > *
> > > > > - * @rdev: radeon device pointer
> > > > > + * @dev: radeon device pointer
> > > >
> > > > This should be:
> > > > + * @dev: drm device pointer
> > >
> > > good spot. I am continuing the work on radeon and will post a patchset
> > > that contains only radeon fixes with Lee's patches and a few more by me.
> > > I will fix the above.
> >
> > What do you mean by "continuing on"?
> >
> > How will you prevent your work from conflicting with my current effort?
>
> Quoting from previous mail in this thread:
>
> "
> > > How would you like me to move forward?
> >
> > Fix the thousand of warnings in other places :-)
> > I will take a look at radeon and post a new series based on your work
> > with all W=1 warnings fixed.
>
> I'll drop this patch and carry on ploughing through the rest of them.
> "
>
> Here I promised you to fix all warnings in the radeon driver.
> And despite this being more work than anticipated a promise is a
> promise. So therefore I started working on this.
>
> If you want to do the rest of the radeon driver you are welcome and I
> will gladly drop this again. Just let me know your preference.

That was the plan. To continue on and solve as many warnings as I can
before I start bumping into more serious issues like the one mentioned
above. If you'd like to solve the radeon_init() issue right away;
however, that would be super helpful.

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

2020-11-10 12:03:59

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH 08/19] drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions

On 06/11/2020 23:49, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Function parameter or member 'file' not described in 'omap_gem_dumb_create'
> drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Excess function parameter 'drm_file' description in 'omap_gem_dumb_create'
> drivers/gpu/drm/omapdrm/omap_gem.c:619: warning: Function parameter or member 'offset' not described in 'omap_gem_dumb_map_offset'
>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: Rob Clark <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/omapdrm/omap_gem.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks! I'll pick this one and the next to drm-misc-next.

Tomi

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

2020-11-10 21:56:31

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 06/19] drm/radeon/atom: Move prototype into shared location

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Both source files include atom.h, which seems like a reasonable
> location to place an atom based function into.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes]
> 1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/radeon/atom.h | 6 ++++++
> drivers/gpu/drm/radeon/atombios_encoders.c | 4 ----
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
> index 1bf06c91cd959..cb93b83114dbe 100644
> --- a/drivers/gpu/drm/radeon/atom.h
> +++ b/drivers/gpu/drm/radeon/atom.h
> @@ -154,6 +154,12 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
> bool atom_parse_cmd_header(struct atom_context *ctx, int index,
> uint8_t *frev, uint8_t *crev);
> int atom_allocate_fb_scratch(struct atom_context *ctx);
> +
> +struct drm_display_mode;
> +struct radeon_device;
> +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
> + struct drm_display_mode *mode);
> +

I'd prefer to add radeon_atombios.h for all of the stuff exported from
radeon_atombios.c. When you add the .h file, please take the
copyright license from the .c file which implements the functions.

Thanks,

Alex

> #include "atom-types.h"
> #include "atombios.h"
> #include "ObjectID.h"
> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
> index cc5ee1b3af84f..85f903caf12e1 100644
> --- a/drivers/gpu/drm/radeon/atombios_encoders.c
> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
> @@ -296,10 +296,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder)
>
> #endif
>
> -/* evil but including atombios.h is much worse */
> -bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
> - struct drm_display_mode *mode);
> -
> static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
> const struct drm_display_mode *mode,
> struct drm_display_mode *adjusted_mode)
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:57:25

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 07/19] drm/radeon/radeon_kms: Include header containing our own prototypes

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:61:6: warning: no previous prototype for ‘radeon_driver_unload_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:104:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:618:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:633:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:704:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:755:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:825:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_kms.c:852:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex


> ---
> drivers/gpu/drm/radeon/radeon_kms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 99ee60f8b604d..0d8fbabffcead 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -40,6 +40,7 @@
>
> #include "radeon.h"
> #include "radeon_asic.h"
> +#include "radeon_drv.h"
>
> #if defined(CONFIG_VGA_SWITCHEROO)
> bool radeon_has_atpx(void);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:58:42

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 11/19] drm/radeon/radeon_drv: Source file headers are not good candidates for kernel-doc

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_drv.c:2: warning: Cannot understand * file radeon_drv.c
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 560267cc25892..bb7b33e535f81 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -1,4 +1,4 @@
> -/**
> +/*
> * \file radeon_drv.c
> * ATI Radeon driver
> *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 22:02:29

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 15/19] drm/radeon: Move prototypes to shared header

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
> 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
> 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
> 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex


> ---
> drivers/gpu/drm/radeon/radeon.h | 6 ++++++
> drivers/gpu/drm/radeon/radeon_display.c | 4 ----
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index e1132d86d2507..961a31b8805c2 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -2832,6 +2832,12 @@ extern void radeon_program_register_sequence(struct radeon_device *rdev,
> const u32 array_size);
> struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev);
>
> +/* KMS */
> +
> +u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
> +int radeon_enable_vblank_kms(struct drm_crtc *crtc);
> +void radeon_disable_vblank_kms(struct drm_crtc *crtc);
> +
> /*
> * vm
> */
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index b79686cf8bdbd..bd60f16fd0d78 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -45,10 +45,6 @@
> #include "atom.h"
> #include "radeon.h"
>
> -u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
> -int radeon_enable_vblank_kms(struct drm_crtc *crtc);
> -void radeon_disable_vblank_kms(struct drm_crtc *crtc);
> -
> static void avivo_crtc_load_lut(struct drm_crtc *crtc)
> {
> struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 22:02:35

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 13/19] drm/radeon/radeon_drv: Move prototypes to a shared headerfile

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> 62 | void radeon_driver_unload_kms(struct drm_device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:105:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
> 105 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:619:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
> 619 | void radeon_driver_lastclose_kms(struct drm_device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:634:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
> 634 | int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/radeon/radeon_kms.c:705:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
> 705 | void radeon_driver_postclose_kms(struct drm_device *dev,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Gareth Hughes <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/radeon/radeon_drv.c | 6 ------
> drivers/gpu/drm/radeon/radeon_drv.h | 7 +++++++
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index bb7b33e535f81..e0d664e9e2feb 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -112,12 +112,6 @@
> #define KMS_DRIVER_MAJOR 2
> #define KMS_DRIVER_MINOR 50
> #define KMS_DRIVER_PATCHLEVEL 0
> -int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
> -void radeon_driver_unload_kms(struct drm_device *dev);
> -void radeon_driver_lastclose_kms(struct drm_device *dev);
> -int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
> -void radeon_driver_postclose_kms(struct drm_device *dev,
> - struct drm_file *file_priv);
> int radeon_suspend_kms(struct drm_device *dev, bool suspend,
> bool fbcon, bool freeze);
> int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
> index 173deb4634146..ac7970919c4d3 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> @@ -118,4 +118,11 @@
> long radeon_drm_ioctl(struct file *filp,
> unsigned int cmd, unsigned long arg);
>
> +int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
> +void radeon_driver_unload_kms(struct drm_device *dev);
> +void radeon_driver_lastclose_kms(struct drm_device *dev);
> +int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
> +void radeon_driver_postclose_kms(struct drm_device *dev,
> + struct drm_file *file_priv);
> +
> #endif /* __RADEON_DRV_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 22:03:50

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 18/19] drm/radeon/atombios_crtc: Remove description of non-existent function param 'encoder'

On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/atombios_crtc.c:1796: warning: Excess function parameter 'encoder' description in 'radeon_get_shared_nondp_ppll'
>
> Cc: Alex Deucher <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
> index 91811757104c0..1979ed3d65472 100644
> --- a/drivers/gpu/drm/radeon/atombios_crtc.c
> +++ b/drivers/gpu/drm/radeon/atombios_crtc.c
> @@ -1787,7 +1787,6 @@ static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
> * radeon_get_shared_nondp_ppll - return the PPLL used by another non-DP crtc
> *
> * @crtc: drm crtc
> - * @encoder: drm encoder
> *
> * Returns the PPLL (Pixel PLL) used by another non-DP crtc/encoder which can
> * be shared (i.e., same clock).
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-13 07:22:04

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Fri, 06 Nov 2020, 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.
>
> There are 5000 warnings to work through. It will take a couple more
> sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> variables to where they're used") does take care of 2000 of them!
>
> Lee Jones (19):
> drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> drm/r128/ati_pcigart: Source file headers are not good candidates for
> kernel-doc
> drm/selftests/test-drm_dp_mst_helper: Move
> 'sideband_msg_req_encode_decode' onto the heap
> drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> drm/mga/mga_state: Remove unused variable 'buf_priv'
> drm/radeon/atom: Move prototype into shared location
> drm/radeon/radeon_kms: Include header containing our own prototypes
> drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> drm/radeon/radeon: Move prototype into shared header
> drm/radeon/radeon_drv: Source file headers are not good candidates for
> kernel-doc
> drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> used
> drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> params
> drm/radeon: Move prototypes to shared header
> drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> dev_info' from the stack
> drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> drm/radeon/atombios_crtc: Remove description of non-existent function
> param 'encoder'
> drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
> .../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
> .../gpu/drm/amd/display/include/fixed31_32.h | 6 -
> drivers/gpu/drm/mga/mga_dma.c | 10 +-
> drivers/gpu/drm/mga/mga_state.c | 2 -
> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
> drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> drivers/gpu/drm/radeon/atom.h | 6 +
> drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
> drivers/gpu/drm/radeon/radeon.h | 6 +
> drivers/gpu/drm/radeon/radeon_device.c | 1 +
> drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
> drivers/gpu/drm/radeon/radeon_display.c | 4 -
> drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
> drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
> drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
> .../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
> drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
> 22 files changed, 138 insertions(+), 126 deletions(-)
> create mode 100644 drivers/gpu/drm/radeon/radeon_device.h

Still no Radeon patches in today's -next.

I really wanted to have had this set rebased by now.

How long do they take to peculate through?

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

2020-11-13 07:30:39

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Fri, Nov 13, 2020 at 2:19 AM Lee Jones <[email protected]> wrote:
>
> On Fri, 06 Nov 2020, 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.
> >
> > There are 5000 warnings to work through. It will take a couple more
> > sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> > variables to where they're used") does take care of 2000 of them!
> >
> > Lee Jones (19):
> > drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> > drm/r128/ati_pcigart: Source file headers are not good candidates for
> > kernel-doc
> > drm/selftests/test-drm_dp_mst_helper: Move
> > 'sideband_msg_req_encode_decode' onto the heap
> > drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> > drm/mga/mga_state: Remove unused variable 'buf_priv'
> > drm/radeon/atom: Move prototype into shared location
> > drm/radeon/radeon_kms: Include header containing our own prototypes
> > drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> > drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> > drm/radeon/radeon: Move prototype into shared header
> > drm/radeon/radeon_drv: Source file headers are not good candidates for
> > kernel-doc
> > drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> > used
> > drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> > drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> > params
> > drm/radeon: Move prototypes to shared header
> > drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> > dev_info' from the stack
> > drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> > drm/radeon/atombios_crtc: Remove description of non-existent function
> > param 'encoder'
> > drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
> > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
> > .../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
> > .../gpu/drm/amd/display/include/fixed31_32.h | 6 -
> > drivers/gpu/drm/mga/mga_dma.c | 10 +-
> > drivers/gpu/drm/mga/mga_state.c | 2 -
> > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
> > drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
> > drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> > drivers/gpu/drm/radeon/atom.h | 6 +
> > drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> > drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
> > drivers/gpu/drm/radeon/radeon.h | 6 +
> > drivers/gpu/drm/radeon/radeon_device.c | 1 +
> > drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
> > drivers/gpu/drm/radeon/radeon_display.c | 4 -
> > drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
> > drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
> > drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
> > .../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
> > drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> > drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
> > 22 files changed, 138 insertions(+), 126 deletions(-)
> > create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
>
> Still no Radeon patches in today's -next.
>
> I really wanted to have had this set rebased by now.
>
> How long do they take to peculate through?

Usually a day or two, but I was swamped the last couple of days. I
pushed an updated -next branch today:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next

Alex

>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-13 07:38:50

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 00/19] [Set 2] Rid W=1 warnings from GPU

On Fri, 13 Nov 2020, Alex Deucher wrote:

> On Fri, Nov 13, 2020 at 2:19 AM Lee Jones <[email protected]> wrote:
> >
> > On Fri, 06 Nov 2020, 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.
> > >
> > > There are 5000 warnings to work through. It will take a couple more
> > > sets. Although, ("drm/amd/display/dc/basics/fixpt31_32: Move
> > > variables to where they're used") does take care of 2000 of them!
> > >
> > > Lee Jones (19):
> > > drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header
> > > drm/r128/ati_pcigart: Source file headers are not good candidates for
> > > kernel-doc
> > > drm/selftests/test-drm_dp_mst_helper: Move
> > > 'sideband_msg_req_encode_decode' onto the heap
> > > drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks
> > > drm/mga/mga_state: Remove unused variable 'buf_priv'
> > > drm/radeon/atom: Move prototype into shared location
> > > drm/radeon/radeon_kms: Include header containing our own prototypes
> > > drm/omapdrm/omap_gem: Fix misnamed and missing parameter descriptions
> > > drm/omapdrm/omap_dmm_tiler: Demote abusive use of kernel-doc format
> > > drm/radeon/radeon: Move prototype into shared header
> > > drm/radeon/radeon_drv: Source file headers are not good candidates for
> > > kernel-doc
> > > drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're
> > > used
> > > drm/radeon/radeon_drv: Move prototypes to a shared headerfile
> > > drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr'
> > > params
> > > drm/radeon: Move prototypes to shared header
> > > drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device
> > > dev_info' from the stack
> > > drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
> > > drm/radeon/atombios_crtc: Remove description of non-existent function
> > > param 'encoder'
> > > drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops'
> > >
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 104 +++++++++---------
> > > .../drm/amd/display/dc/basics/fixpt31_32.c | 5 +
> > > .../gpu/drm/amd/display/include/fixed31_32.h | 6 -
> > > drivers/gpu/drm/mga/mga_dma.c | 10 +-
> > > drivers/gpu/drm/mga/mga_state.c | 2 -
> > > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +-
> > > drivers/gpu/drm/omapdrm/omap_gem.c | 3 +-
> > > drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> > > drivers/gpu/drm/radeon/atom.h | 6 +
> > > drivers/gpu/drm/radeon/atombios_crtc.c | 1 -
> > > drivers/gpu/drm/radeon/atombios_encoders.c | 4 -
> > > drivers/gpu/drm/radeon/radeon.h | 6 +
> > > drivers/gpu/drm/radeon/radeon_device.c | 1 +
> > > drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++
> > > drivers/gpu/drm/radeon/radeon_display.c | 4 -
> > > drivers/gpu/drm/radeon/radeon_drv.c | 11 +-
> > > drivers/gpu/drm/radeon/radeon_drv.h | 7 ++
> > > drivers/gpu/drm/radeon/radeon_kms.c | 3 +-
> > > .../drm/selftests/test-drm_dp_mst_helper.c | 11 +-
> > > drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
> > > drivers/gpu/drm/v3d/v3d_drv.c | 36 ------
> > > 22 files changed, 138 insertions(+), 126 deletions(-)
> > > create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
> >
> > Still no Radeon patches in today's -next.
> >
> > I really wanted to have had this set rebased by now.
> >
> > How long do they take to peculate through?
>
> Usually a day or two, but I was swamped the last couple of days. I
> pushed an updated -next branch today:
> https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next

Ah, wonderful.

I'll rebase all of the sets on Monday and see what we're left with.

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