2020-11-05 14:53:56

by Lee Jones

[permalink] [raw]
Subject: [PATCH 00/19] [Set 1] 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.

Lee Jones (19):
gpu: host1x: bus: Add missing description for 'driver'
gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries
gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused
gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues
gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused
gpu: drm: scheduler: sched_main: Provide missing description for
'sched' paramter
gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc
headers
gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables
gpu: drm: selftests: test-drm_framebuffer: Remove set but unused
variable 'fb'
gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of
kernel-doc abuses
gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
'analogix_dp_write_byte_to_dpcd'
gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses
gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct
drm_dp_sideband_msg_req_body' onto the heap
gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
kernel-doc header
gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc
misdemeanours
gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
'analogix_dp_start_aux_transaction'

drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +-
.../gpu/drm/bridge/analogix/analogix_dp_reg.c | 88 -------------------
drivers/gpu/drm/imx/ipuv3-plane.c | 2 +-
drivers/gpu/drm/omapdrm/dss/dsi.c | 9 +-
drivers/gpu/drm/omapdrm/omap_irq.c | 6 +-
drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 +-
drivers/gpu/drm/panel/panel-simple.c | 2 +
drivers/gpu/drm/radeon/radeon_device.c | 23 ++---
drivers/gpu/drm/radeon/radeon_drv.c | 3 +-
drivers/gpu/drm/scheduler/sched_entity.c | 4 +-
drivers/gpu/drm/scheduler/sched_main.c | 1 +
.../drm/selftests/test-drm_dp_mst_helper.c | 29 +++---
.../gpu/drm/selftests/test-drm_framebuffer.c | 3 +-
drivers/gpu/drm/selftests/test-drm_mm.c | 2 +-
drivers/gpu/drm/ttm/ttm_bo.c | 23 ++---
drivers/gpu/drm/ttm/ttm_tt.c | 4 +-
drivers/gpu/host1x/bus.c | 1 +
drivers/gpu/ipu-v3/ipu-di.c | 4 -
18 files changed, 59 insertions(+), 153 deletions(-)

Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Cc: Andrzej Hajda <[email protected]>
Cc: Christian Koenig <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: David Francis <[email protected]>
Cc: [email protected]
Cc: Fabio Estevam <[email protected]>
Cc: Gareth Hughes <[email protected]>
Cc: Huang Rui <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: [email protected]
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Lyude Paul <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Nirmoy Das <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
--
2.25.1


2020-11-05 14:54:18

by Lee Jones

[permalink] [raw]
Subject: [PATCH 04/19] gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues

The API has been updated, but the header was not.

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

drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Function parameter or member 'crtc' not described in 'omap_irq_enable_vblank'
drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'dev' description in 'omap_irq_enable_vblank'
drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'pipe' description in 'omap_irq_enable_vblank'
drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Function parameter or member 'crtc' not described in 'omap_irq_disable_vblank'
drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'dev' description in 'omap_irq_disable_vblank'
drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'pipe' description in 'omap_irq_disable_vblank'

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

diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index 382bcdc72ac06..8643871e23a83 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -100,8 +100,7 @@ int omap_irq_enable_framedone(struct drm_crtc *crtc, bool enable)

/**
* enable_vblank - enable vblank interrupt events
- * @dev: DRM device
- * @pipe: which irq to enable
+ * @crtc: DRM CRTC
*
* Enable vblank interrupts for @crtc. If the device doesn't have
* a hardware vblank counter, this routine should be a no-op, since
@@ -131,8 +130,7 @@ int omap_irq_enable_vblank(struct drm_crtc *crtc)

/**
* disable_vblank - disable vblank interrupt events
- * @dev: DRM device
- * @pipe: which irq to enable
+ * @crtc: DRM CRTC
*
* Disable vblank interrupts for @crtc. If the device doesn't have
* a hardware vblank counter, this routine should be a no-op, since
--
2.25.1

2020-11-05 14:54:20

by Lee Jones

[permalink] [raw]
Subject: [PATCH 06/19] gpu: drm: scheduler: sched_main: Provide missing description for 'sched' paramter

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

drivers/gpu/drm/scheduler/sched_main.c:74: warning: Function parameter or member 'sched' not described in 'drm_sched_rq_init'

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

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 9a0d77a680180..da24c4e8b9fb3 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -65,6 +65,7 @@ static void drm_sched_process_job(struct dma_fence *f, struct dma_fence_cb *cb);
/**
* drm_sched_rq_init - initialize a given run queue struct
*
+ * @sched: scheduler instance to associate with this run queue
* @rq: scheduler run queue
*
* Initializes a scheduler runqueue.
--
2.25.1

2020-11-05 14:54:25

by Lee Jones

[permalink] [raw]
Subject: [PATCH 09/19] gpu: drm: selftests: test-drm_framebuffer: Remove set but unused variable 'fb'

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

drivers/gpu/drm/selftests/test-drm_framebuffer.c: In function ‘execute_drm_mode_fb_cmd2’:
drivers/gpu/drm/selftests/test-drm_framebuffer.c:333:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable]

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_framebuffer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/selftests/test-drm_framebuffer.c b/drivers/gpu/drm/selftests/test-drm_framebuffer.c
index 2d29ea6f92e2a..789f22773dbc9 100644
--- a/drivers/gpu/drm/selftests/test-drm_framebuffer.c
+++ b/drivers/gpu/drm/selftests/test-drm_framebuffer.c
@@ -330,10 +330,9 @@ static struct drm_device mock_drm_device = {
static int execute_drm_mode_fb_cmd2(struct drm_mode_fb_cmd2 *r)
{
int buffer_created = 0;
- struct drm_framebuffer *fb;

mock_drm_device.dev_private = &buffer_created;
- fb = drm_internal_framebuffer_create(&mock_drm_device, r, NULL);
+ drm_internal_framebuffer_create(&mock_drm_device, r, NULL);
return buffer_created;
}

--
2.25.1

2020-11-05 14:54:37

by Lee Jones

[permalink] [raw]
Subject: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

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

drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]

Cc: Tomi Valkeinen <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index eeccf40bae416..5929b320b3cfa 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -1128,13 +1128,12 @@ static void dsi_runtime_put(struct dsi_data *dsi)

static void _dsi_print_reset_status(struct dsi_data *dsi)
{
- u32 l;
int b0, b1, b2;

/* A dummy read using the SCP interface to any DSIPHY register is
* required after DSIPHY reset to complete the reset of the DSI complex
* I/O. */
- l = dsi_read_reg(dsi, DSI_DSIPHY_CFG5);
+ dsi_read_reg(dsi, DSI_DSIPHY_CFG5);

if (dsi->data->quirks & DSI_QUIRK_REVERSE_TXCLKESC) {
b0 = 28;
@@ -3940,7 +3939,6 @@ static int dsi_update(struct omap_dss_device *dssdev, int channel,
void (*callback)(int, void *), void *data)
{
struct dsi_data *dsi = to_dsi_data(dssdev);
- u16 dw, dh;

dsi_perf_mark_setup(dsi);

@@ -3949,11 +3947,8 @@ static int dsi_update(struct omap_dss_device *dssdev, int channel,
dsi->framedone_callback = callback;
dsi->framedone_data = data;

- dw = dsi->vm.hactive;
- dh = dsi->vm.vactive;
-
#ifdef DSI_PERF_MEASURE
- dsi->update_bytes = dw * dh *
+ dsi->update_bytes = dsi->vm.hactive * dsi->vm.vactive *
dsi_get_pixel_size(dsi->pix_fmt) / 8;
#endif
dsi_update_screen_dispc(dsi);
--
2.25.1

2020-11-05 14:54:56

by Lee Jones

[permalink] [raw]
Subject: [PATCH 15/19] gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'

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

drivers/gpu/drm/radeon/radeon_drv.c: In function ‘radeon_pmops_runtime_suspend’:
drivers/gpu/drm/radeon/radeon_drv.c:455:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 65061c949aeea..f5f1cb700d873 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -452,7 +452,6 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
- int ret;

if (!radeon_is_px(drm_dev)) {
pm_runtime_forbid(dev);
@@ -462,7 +461,7 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
drm_kms_helper_poll_disable(drm_dev);

- ret = radeon_suspend_kms(drm_dev, false, false, false);
+ radeon_suspend_kms(drm_dev, false, false, false);
pci_save_state(pdev);
pci_disable_device(pdev);
pci_ignore_hotplug(pdev);
--
2.25.1

2020-11-05 14:55:03

by Lee Jones

[permalink] [raw]
Subject: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

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

drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_THROUGH' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_ALIGNED' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_320X240' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_360X240' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_1' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_THROUGH' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_ALIGNED' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_640X320_YCBCR' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_720X360_YCBCR' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_2' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_720X360_YCBCR' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_640X320_YCBCR' not described in enum 'ili9322_input'
drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_UNKNOWN' not described in enum 'ili9322_input'

Cc: Thierry Reding <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
index 074e18559b9f6..8e84df9a0033d 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
@@ -152,7 +152,7 @@
#define ILI9322_GAMMA_7 0x16
#define ILI9322_GAMMA_8 0x17

-/**
+/*
* enum ili9322_input - the format of the incoming signal to the panel
*
* The panel can be connected to various input streams and four of them can
--
2.25.1

2020-11-05 14:55:13

by Lee Jones

[permalink] [raw]
Subject: [PATCH 17/19] gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc misdemeanours

- Demote non-conformant headers
- Fix misnaming issues
- Rename labels with identical names
- Remove incorrect descriptions

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]
drivers/gpu/drm/radeon/radeon_device.c:552: warning: duplicate section name 'Note'
drivers/gpu/drm/radeon/radeon_device.c:556: warning: duplicate section name 'Note'
drivers/gpu/drm/radeon/radeon_device.c:561: warning: duplicate section name 'Note'
drivers/gpu/drm/radeon/radeon_device.c:564: warning: duplicate section name 'Note'
drivers/gpu/drm/radeon/radeon_device.c:1106: warning: Function parameter or member 'family' not described in 'radeon_gart_size_auto'
drivers/gpu/drm/radeon/radeon_device.c:1291: warning: Function parameter or member 'ddev' not described in 'radeon_device_init'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'dev' not described in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'suspend' not described in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'fbcon' not described in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'freeze' not described in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'pdev' description in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'state' description in 'radeon_suspend_kms'
drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'dev' not described in 'radeon_resume_kms'
drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'resume' not described in 'radeon_resume_kms'
drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'fbcon' not described in 'radeon_resume_kms'
drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Excess function parameter 'pdev' description in 'radeon_resume_kms'

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_device.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 266e3cbbd09bd..7f384ffe848a7 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -544,21 +544,21 @@ int radeon_wb_init(struct radeon_device *rdev)
* Note: GTT start, end, size should be initialized before calling this
* function on AGP platform.
*
- * Note: We don't explicitly enforce VRAM start to be aligned on VRAM size,
+ * Note 1: We don't explicitly enforce VRAM start to be aligned on VRAM size,
* this shouldn't be a problem as we are using the PCI aperture as a reference.
* Otherwise this would be needed for rv280, all r3xx, and all r4xx, but
* not IGP.
*
- * Note: we use mc_vram_size as on some board we need to program the mc to
+ * Note 2: we use mc_vram_size as on some board we need to program the mc to
* cover the whole aperture even if VRAM size is inferior to aperture size
* Novell bug 204882 + along with lots of ubuntu ones
*
- * Note: when limiting vram it's safe to overwritte real_vram_size because
+ * Note 3: when limiting vram it's safe to overwritte real_vram_size because
* we are not in case where real_vram_size is inferior to mc_vram_size (ie
* note afected by bogus hw of Novell bug 204882 + along with lots of ubuntu
* ones)
*
- * Note: IGP TOM addr should be the same as the aperture addr, we don't
+ * Note 4: IGP TOM addr should be the same as the aperture addr, we don't
* explicitly check for that thought.
*
* FIXME: when reducing VRAM size align new size on power of 2.
@@ -627,7 +627,7 @@ void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
* GPU helpers function.
*/

-/**
+/*
* radeon_device_is_virtual - check if we are running is a virtual environment
*
* Check if the asic has been passed through to a VM (all asics).
@@ -1100,7 +1100,7 @@ static bool radeon_check_pot_argument(int arg)
/**
* Determine a sensible default GART size according to ASIC family.
*
- * @family ASIC family name
+ * @family: ASIC family name
*/
static int radeon_gart_size_auto(enum radeon_family family)
{
@@ -1276,7 +1276,7 @@ static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = {
* radeon_device_init - initialize the driver
*
* @rdev: radeon_device pointer
- * @pdev: drm dev pointer
+ * @ddev: drm dev pointer
* @pdev: pci dev pointer
* @flags: driver flags
*
@@ -1550,12 +1550,9 @@ void radeon_device_fini(struct radeon_device *rdev)
/*
* Suspend & resume.
*/
-/**
+/*
* radeon_suspend_kms - initiate device suspend
*
- * @pdev: drm dev pointer
- * @state: suspend state
- *
* Puts the hw in the suspend state (all asics).
* Returns 0 for success or an error on failure.
* Called at driver suspend.
@@ -1656,11 +1653,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
return 0;
}

-/**
+/*
* radeon_resume_kms - initiate device resume
*
- * @pdev: drm dev pointer
- *
* Bring the hw back to operating state (all asics).
* Returns 0 for success or an error on failure.
* Called at driver resume.
--
2.25.1

2020-11-05 14:55:51

by Lee Jones

[permalink] [raw]
Subject: [PATCH 13/19] gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses

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

drivers/gpu/drm/ttm/ttm_tt.c:45: warning: Function parameter or member 'bo' not described in 'ttm_tt_create'
drivers/gpu/drm/ttm/ttm_tt.c:45: warning: Function parameter or member 'zero_alloc' not described in 'ttm_tt_create'
drivers/gpu/drm/ttm/ttm_tt.c:83: warning: Function parameter or member 'ttm' not described in 'ttm_tt_alloc_page_directory'

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_tt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 8861a74ac3351..3190bafd8b783 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -38,7 +38,7 @@
#include <drm/drm_cache.h>
#include <drm/ttm/ttm_bo_driver.h>

-/**
+/*
* Allocates a ttm structure for the given BO.
*/
int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
@@ -76,7 +76,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
return 0;
}

-/**
+/*
* Allocates storage for pointers to the pages that back the ttm.
*/
static int ttm_tt_alloc_page_directory(struct ttm_tt *ttm)
--
2.25.1

2020-11-05 14:56:06

by Lee Jones

[permalink] [raw]
Subject: [PATCH 19/19] gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function 'analogix_dp_start_aux_transaction'

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

drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:527:12: warning: ‘analogix_dp_start_aux_transaction’ defined but not used [-Wunused-function]

Cc: Andrzej Hajda <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
.../gpu/drm/bridge/analogix/analogix_dp_reg.c | 44 -------------------
1 file changed, 44 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
index 9ce45c757f8c8..cab6c8b92efd4 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
@@ -524,50 +524,6 @@ void analogix_dp_enable_sw_function(struct analogix_dp_device *dp)
writel(reg, dp->reg_base + ANALOGIX_DP_FUNC_EN_1);
}

-static int analogix_dp_start_aux_transaction(struct analogix_dp_device *dp)
-{
- int reg;
- int retval = 0;
- int timeout_loop = 0;
-
- /* Enable AUX CH operation */
- reg = readl(dp->reg_base + ANALOGIX_DP_AUX_CH_CTL_2);
- reg |= AUX_EN;
- writel(reg, dp->reg_base + ANALOGIX_DP_AUX_CH_CTL_2);
-
- /* Is AUX CH command reply received? */
- reg = readl(dp->reg_base + ANALOGIX_DP_INT_STA);
- while (!(reg & RPLY_RECEIV)) {
- timeout_loop++;
- if (DP_TIMEOUT_LOOP_COUNT < timeout_loop) {
- dev_err(dp->dev, "AUX CH command reply failed!\n");
- return -ETIMEDOUT;
- }
- reg = readl(dp->reg_base + ANALOGIX_DP_INT_STA);
- usleep_range(10, 11);
- }
-
- /* Clear interrupt source for AUX CH command reply */
- writel(RPLY_RECEIV, dp->reg_base + ANALOGIX_DP_INT_STA);
-
- /* Clear interrupt source for AUX CH access error */
- reg = readl(dp->reg_base + ANALOGIX_DP_INT_STA);
- if (reg & AUX_ERR) {
- writel(AUX_ERR, dp->reg_base + ANALOGIX_DP_INT_STA);
- return -EREMOTEIO;
- }
-
- /* Check AUX CH error access status */
- reg = readl(dp->reg_base + ANALOGIX_DP_AUX_CH_STA);
- if ((reg & AUX_STATUS_MASK) != 0) {
- dev_err(dp->dev, "AUX CH error happens: %d\n\n",
- reg & AUX_STATUS_MASK);
- return -EREMOTEIO;
- }
-
- return retval;
-}
-
void analogix_dp_set_link_bandwidth(struct analogix_dp_device *dp, u32 bwtype)
{
u32 reg;
--
2.25.1

2020-11-05 14:56:09

by Lee Jones

[permalink] [raw]
Subject: [PATCH 01/19] gpu: host1x: bus: Add missing description for 'driver'

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

drivers/gpu/host1x/bus.c:40: warning: Function parameter or member 'driver' not described in 'host1x_subdev_add'

Cc: Thierry Reding <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/host1x/bus.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index e201f62d62c0c..347fb962b6c93 100644
--- a/drivers/gpu/host1x/bus.c
+++ b/drivers/gpu/host1x/bus.c
@@ -32,6 +32,7 @@ struct host1x_subdev {
/**
* host1x_subdev_add() - add a new subdevice with an associated device node
* @device: host1x device to add the subdevice to
+ * @driver: host1x driver containing the subdevices
* @np: device node
*/
static int host1x_subdev_add(struct host1x_device *device,
--
2.25.1

2020-11-05 14:56:11

by Lee Jones

[permalink] [raw]
Subject: [PATCH 07/19] gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc headers

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

drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'f' not described in 'drm_sched_entity_clear_dep'
drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_clear_dep'
drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'f' not described in 'drm_sched_entity_wakeup'
drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_wakeup'

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

diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
index f8ec277a6aa85..c1ac3e4003c6f 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -308,7 +308,7 @@ void drm_sched_entity_destroy(struct drm_sched_entity *entity)
}
EXPORT_SYMBOL(drm_sched_entity_destroy);

-/**
+/*
* drm_sched_entity_clear_dep - callback to clear the entities dependency
*/
static void drm_sched_entity_clear_dep(struct dma_fence *f,
@@ -321,7 +321,7 @@ static void drm_sched_entity_clear_dep(struct dma_fence *f,
dma_fence_put(f);
}

-/**
+/*
* drm_sched_entity_clear_dep - callback to clear the entities dependency and
* wake up scheduler
*/
--
2.25.1

2020-11-05 14:56:32

by Lee Jones

[permalink] [raw]
Subject: [PATCH 02/19] gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries

They're taking up too much space on the stack.

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

drivers/gpu/ipu-v3/ipu-di.c: In function ‘ipu_di_sync_config_noninterlaced’:
drivers/gpu/ipu-v3/ipu-di.c:391:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Philipp Zabel <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/ipu-v3/ipu-di.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c
index b4a31d506fccf..e617f60afeea3 100644
--- a/drivers/gpu/ipu-v3/ipu-di.c
+++ b/drivers/gpu/ipu-v3/ipu-di.c
@@ -310,10 +310,6 @@ static void ipu_di_sync_config_noninterlaced(struct ipu_di *di,
/* unused */
} , {
/* unused */
- } , {
- /* unused */
- } , {
- /* unused */
},
};
/* can't use #7 and #8 for line active and pixel active counters */
--
2.25.1

2020-11-05 14:56:38

by Lee Jones

[permalink] [raw]
Subject: [PATCH 12/19] gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function 'analogix_dp_write_byte_to_dpcd'

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

drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:571:5: warning: no previous prototype for ‘analogix_dp_write_byte_to_dpcd’ [-Wmissing-prototypes]

Cc: Andrzej Hajda <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jason Yan <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
.../gpu/drm/bridge/analogix/analogix_dp_reg.c | 44 -------------------
1 file changed, 44 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
index fafb4b492ea04..9ce45c757f8c8 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
@@ -568,50 +568,6 @@ static int analogix_dp_start_aux_transaction(struct analogix_dp_device *dp)
return retval;
}

-int analogix_dp_write_byte_to_dpcd(struct analogix_dp_device *dp,
- unsigned int reg_addr,
- unsigned char data)
-{
- u32 reg;
- int i;
- int retval;
-
- for (i = 0; i < 3; i++) {
- /* Clear AUX CH data buffer */
- reg = BUF_CLR;
- writel(reg, dp->reg_base + ANALOGIX_DP_BUFFER_DATA_CTL);
-
- /* Select DPCD device address */
- reg = AUX_ADDR_7_0(reg_addr);
- writel(reg, dp->reg_base + ANALOGIX_DP_AUX_ADDR_7_0);
- reg = AUX_ADDR_15_8(reg_addr);
- writel(reg, dp->reg_base + ANALOGIX_DP_AUX_ADDR_15_8);
- reg = AUX_ADDR_19_16(reg_addr);
- writel(reg, dp->reg_base + ANALOGIX_DP_AUX_ADDR_19_16);
-
- /* Write data buffer */
- reg = (unsigned int)data;
- writel(reg, dp->reg_base + ANALOGIX_DP_BUF_DATA_0);
-
- /*
- * Set DisplayPort transaction and write 1 byte
- * If bit 3 is 1, DisplayPort transaction.
- * If Bit 3 is 0, I2C transaction.
- */
- reg = AUX_TX_COMM_DP_TRANSACTION | AUX_TX_COMM_WRITE;
- writel(reg, dp->reg_base + ANALOGIX_DP_AUX_CH_CTL_1);
-
- /* Start AUX transaction */
- retval = analogix_dp_start_aux_transaction(dp);
- if (retval == 0)
- break;
-
- dev_dbg(dp->dev, "%s: Aux Transaction fail!\n", __func__);
- }
-
- return retval;
-}
-
void analogix_dp_set_link_bandwidth(struct analogix_dp_device *dp, u32 bwtype)
{
u32 reg;
--
2.25.1

2020-11-05 14:56:58

by Lee Jones

[permalink] [raw]
Subject: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

The stack is too full.

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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: David Francis <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
.../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
--- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
+++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
@@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
static bool
sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
{
- struct drm_dp_sideband_msg_req_body out = {0};
+ struct drm_dp_sideband_msg_req_body *out;
struct drm_printer p = drm_err_printer(PREFIX_STR);
struct drm_dp_sideband_msg_tx txmsg;
int i, ret;
+ bool result = true;
+
+ out = kzalloc(sizeof(*out), GFP_KERNEL);

drm_dp_encode_sideband_req(in, &txmsg);
- ret = drm_dp_decode_sideband_req(&txmsg, &out);
+ ret = drm_dp_decode_sideband_req(&txmsg, out);
if (ret < 0) {
drm_printf(&p, "Failed to decode sideband request: %d\n",
ret);
- return false;
+ result = false;
+ goto out;
}

- if (!sideband_msg_req_equal(in, &out)) {
+ if (!sideband_msg_req_equal(in, out)) {
drm_printf(&p, "Encode/decode failed, expected:\n");
drm_dp_dump_sideband_msg_req_body(in, 1, &p);
drm_printf(&p, "Got:\n");
- drm_dp_dump_sideband_msg_req_body(&out, 1, &p);
- return false;
+ drm_dp_dump_sideband_msg_req_body(out, 1, &p);
+ result = false;
+ goto out;
}

switch (in->req_type) {
case DP_REMOTE_DPCD_WRITE:
- kfree(out.u.dpcd_write.bytes);
+ kfree(out->u.dpcd_write.bytes);
break;
case DP_REMOTE_I2C_READ:
- for (i = 0; i < out.u.i2c_read.num_transactions; i++)
- kfree(out.u.i2c_read.transactions[i].bytes);
+ for (i = 0; i < out->u.i2c_read.num_transactions; i++)
+ kfree(out->u.i2c_read.transactions[i].bytes);
break;
case DP_REMOTE_I2C_WRITE:
- kfree(out.u.i2c_write.bytes);
+ kfree(out->u.i2c_write.bytes);
break;
}

/* Clear everything but the req_type for the input */
memset(&in->u, 0, sizeof(in->u));

- return true;
+out:
+ kfree(out);
+ return result;
}

int igt_dp_mst_sideband_msg_req_decode(void *unused)
--
2.25.1

2020-11-05 14:57:00

by Lee Jones

[permalink] [raw]
Subject: [PATCH 18/19] gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused

These 3 variables are used in *some* sourcefiles which include
amdgpu.h, but not *all*. This leads to a flurry of build warnings.

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

from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67,
drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=]

NB: Repeats ~650 times - snipped for brevity.

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.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 183b09d71b64a..5939753080056 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -193,9 +193,9 @@ extern int sched_policy;
extern bool debug_evictions;
extern bool no_system_mem_limit;
#else
-static const int sched_policy = KFD_SCHED_POLICY_HWS;
-static const bool debug_evictions; /* = false */
-static const bool no_system_mem_limit;
+static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;
+static const bool __maybe_unused debug_evictions; /* = false */
+static const bool __maybe_unused no_system_mem_limit;
#endif

extern int amdgpu_tmz;
--
2.25.1

2020-11-05 14:57:05

by Lee Jones

[permalink] [raw]
Subject: [PATCH 10/19] gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of kernel-doc abuses

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

drivers/gpu/drm/ttm/ttm_bo.c:51: warning: Function parameter or member 'ttm_global_mutex' not described in 'DEFINE_MUTEX'
drivers/gpu/drm/ttm/ttm_bo.c:286: warning: Function parameter or member 'bo' not described in 'ttm_bo_cleanup_memtype_use'
drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'bo' not described in 'ttm_bo_cleanup_refs'
drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'interruptible' not described in 'ttm_bo_cleanup_refs'
drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'no_wait_gpu' not described in 'ttm_bo_cleanup_refs'
drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'unlock_resv' not described in 'ttm_bo_cleanup_refs'
drivers/gpu/drm/ttm/ttm_bo.c:424: warning: Function parameter or member 'bdev' not described in 'ttm_bo_delayed_delete'
drivers/gpu/drm/ttm/ttm_bo.c:424: warning: Function parameter or member 'remove_all' not described in 'ttm_bo_delayed_delete'
drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'bo' not described in 'ttm_bo_evict_swapout_allowable'
drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'ctx' not described in 'ttm_bo_evict_swapout_allowable'
drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'locked' not described in 'ttm_bo_evict_swapout_allowable'
drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'busy' not described in 'ttm_bo_evict_swapout_allowable'
drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'bo' not described in 'ttm_bo_add_move_fence'
drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'man' not described in 'ttm_bo_add_move_fence'
drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'mem' not described in 'ttm_bo_add_move_fence'
drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'no_wait_gpu' not described in 'ttm_bo_add_move_fence'
drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'bo' not described in 'ttm_bo_mem_force_space'
drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'place' not described in 'ttm_bo_mem_force_space'
drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'mem' not described in 'ttm_bo_mem_force_space'
drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'ctx' not described in 'ttm_bo_mem_force_space'
drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'bo' not described in 'ttm_bo_mem_space'
drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'placement' not described in 'ttm_bo_mem_space'
drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'mem' not described in 'ttm_bo_mem_space'
drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'ctx' not described in 'ttm_bo_mem_space'
drivers/gpu/drm/ttm/ttm_bo.c:1387: warning: Function parameter or member 'ctx' not described in 'ttm_bo_swapout'

Cc: Christian Koenig <[email protected]>
Cc: Huang Rui <[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]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/ttm/ttm_bo.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index c63b7ea1cd5d0..2b69c959d7f4d 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -45,7 +45,7 @@

static void ttm_bo_global_kobj_release(struct kobject *kobj);

-/**
+/*
* ttm_global_mutex - protecting the global BO state
*/
DEFINE_MUTEX(ttm_global_mutex);
@@ -274,7 +274,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
return ret;
}

-/**
+/*
* Call bo::reserved.
* Will release GPU memory type usage on destruction.
* This is the place to put in driver specific hooks to release
@@ -348,9 +348,10 @@ static void ttm_bo_flush_all_fences(struct ttm_buffer_object *bo)
* Must be called with lru_lock and reservation held, this function
* will drop the lru lock and optionally the reservation lock before returning.
*
- * @interruptible Any sleeps should occur interruptibly.
- * @no_wait_gpu Never wait for gpu. Return -EBUSY instead.
- * @unlock_resv Unlock the reservation lock as well.
+ * @bo: The buffer object to clean-up
+ * @interruptible: Any sleeps should occur interruptibly.
+ * @no_wait_gpu: Never wait for gpu. Return -EBUSY instead.
+ * @unlock_resv: Unlock the reservation lock as well.
*/

static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
@@ -416,7 +417,7 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo,
return 0;
}

-/**
+/*
* Traverse the delayed list, and call ttm_bo_cleanup_refs on all
* encountered buffers.
*/
@@ -620,7 +621,7 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
}
EXPORT_SYMBOL(ttm_bo_eviction_valuable);

-/**
+/*
* Check the target bo is allowable to be evicted or swapout, including cases:
*
* a. if share same reservation object with ctx->resv, have assumption
@@ -759,7 +760,7 @@ int ttm_mem_evict_first(struct ttm_bo_device *bdev,
return ret;
}

-/**
+/*
* Add the last move fence to the BO and reserve a new shared slot.
*/
static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
@@ -795,7 +796,7 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
return 0;
}

-/**
+/*
* Repeatedly evict memory from the LRU for @mem_type until we create enough
* space, or we've evicted everything and there isn't enough space.
*/
@@ -857,7 +858,7 @@ static int ttm_bo_mem_placement(struct ttm_buffer_object *bo,
return 0;
}

-/**
+/*
* Creates space for memory region @mem according to its type.
*
* This function first searches for free space in compatible memory types in
@@ -1379,7 +1380,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
}
EXPORT_SYMBOL(ttm_bo_wait);

-/**
+/*
* A buffer object shrink method that tries to swap out the first
* buffer object on the bo_global::swap_lru list.
*/
--
2.25.1

2020-11-05 14:58:03

by Lee Jones

[permalink] [raw]
Subject: [PATCH 11/19] gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header

Struct headers should start with 'struct <name>'

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

drivers/gpu/drm/panel/panel-simple.c:42: warning: Cannot understand * @modes: Pointer to array of fixed modes appropriate for this panel. If

Cc: Thierry Reding <[email protected]>
Cc: Sam Ravnborg <[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/panel/panel-simple.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 8b82ec33f08ae..1327df0bddbd6 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -39,6 +39,7 @@
#include <drm/drm_panel.h>

/**
+ * struct panel_desc
* @modes: Pointer to array of fixed modes appropriate for this panel. If
* only one mode then this can just be the address of this the mode.
* NOTE: cannot be used with "timings" and also if this is specified
@@ -53,6 +54,7 @@
* @delay: Structure containing various delay values for this panel.
* @bus_format: See MEDIA_BUS_FMT_... defines.
* @bus_flags: See DRM_BUS_FLAG_... defines.
+ * @connector_type: LVDS, eDP, DSI, DPI, etc.
*/
struct panel_desc {
const struct drm_display_mode *modes;
--
2.25.1

2020-11-05 14:58:17

by Lee Jones

[permalink] [raw]
Subject: [PATCH 05/19] gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused

In the macro drm_mm_for_each_hole() 'hole_end' is provided as a
container for 'hole_start + pos->hole_size', but is not utilised in
this use-case. We cannot simply delete the variable, so here we tell
the compiler that we're intentionally discarding the read value.

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

drivers/gpu/drm/selftests/test-drm_mm.c: In function ‘assert_no_holes’:
drivers/gpu/drm/selftests/test-drm_mm.c:57:18: warning: variable ‘hole_end’ set but not used [-Wunused-but-set-variable]

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

diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
index 95e212a9a74d2..b768b53c4aee3 100644
--- a/drivers/gpu/drm/selftests/test-drm_mm.c
+++ b/drivers/gpu/drm/selftests/test-drm_mm.c
@@ -54,7 +54,7 @@ static int igt_sanitycheck(void *ignored)
static bool assert_no_holes(const struct drm_mm *mm)
{
struct drm_mm_node *hole;
- u64 hole_start, hole_end;
+ u64 hole_start, __always_unused hole_end;
unsigned long count;

count = 0;
--
2.25.1

2020-11-05 14:58:18

by Lee Jones

[permalink] [raw]
Subject: [PATCH 03/19] gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused

In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
as a container for state->crtcs[i].new_state, but is not utilised in
this use-case. We cannot simply delete the variable, so here we tell
the compiler that we're intentionally discarding the read value.

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

drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’:
drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable]

Cc: Philipp Zabel <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/gpu/drm/imx/ipuv3-plane.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 8a4235d9d9f1e..acc0a3ce4992f 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -743,7 +743,7 @@ bool ipu_plane_atomic_update_pending(struct drm_plane *plane)
int ipu_planes_assign_pre(struct drm_device *dev,
struct drm_atomic_state *state)
{
- struct drm_crtc_state *old_crtc_state, *crtc_state;
+ struct drm_crtc_state *old_crtc_state, __always_unused *crtc_state;
struct drm_plane_state *plane_state;
struct ipu_plane_state *ipu_state;
struct ipu_plane *ipu_plane;
--
2.25.1

2020-11-05 16:43:28

by Sam Ravnborg

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

Hi Lee.

On Thu, Nov 05, 2020 at 02:44:58PM +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.

Thanks for looking into this.

> There are 5000 warnings to work through.
>
> It will take a couple more sets.
:-)

> gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
I have a patch here that inline the comments - and fix the warning as a
side effect. I will get it posted tonight as this is better.

> gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> 'analogix_dp_write_byte_to_dpcd'
When I looked at his I had another unused function after removing the
first.

> gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> kernel-doc header
Agree on this simple approch, will apply.

> gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> 'analogix_dp_start_aux_transaction'
OK, this was the one I referred to above. They should be squashed into
one patch.

Sam

2020-11-05 16:47:47

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 01/19] gpu: host1x: bus: Add missing description for 'driver'

On Thu, Nov 05, 2020 at 02:44:59PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/host1x/bus.c:40: warning: Function parameter or member 'driver' not described in 'host1x_subdev_add'
>
> Cc: Thierry Reding <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/host1x/bus.c | 1 +
> 1 file changed, 1 insertion(+)

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (537.00 B)
signature.asc (849.00 B)
Download all attachments

2020-11-05 16:49:25

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 11/19] gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header

On Thu, Nov 05, 2020 at 02:45:09PM +0000, Lee Jones wrote:
> Struct headers should start with 'struct <name>'
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/panel/panel-simple.c:42: warning: Cannot understand * @modes: Pointer to array of fixed modes appropriate for this panel. If
>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[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/panel/panel-simple.c | 2 ++
> 1 file changed, 2 insertions(+)

I think a more common prefix for this file is:

drm/panel: simple:

Other than than:

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (812.00 B)
signature.asc (849.00 B)
Download all attachments

2020-11-05 16:51:05

by Thierry Reding

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

On Thu, Nov 05, 2020 at 02:44:58PM +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.
>
> Lee Jones (19):
> gpu: host1x: bus: Add missing description for 'driver'
> gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries
> gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused
> gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues
> gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused
> gpu: drm: scheduler: sched_main: Provide missing description for
> 'sched' paramter
> gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc
> headers
> gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables
> gpu: drm: selftests: test-drm_framebuffer: Remove set but unused
> variable 'fb'
> gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of
> kernel-doc abuses
> gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
> gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> 'analogix_dp_write_byte_to_dpcd'
> gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses
> gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct
> drm_dp_sideband_msg_req_body' onto the heap
> gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
> gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> kernel-doc header
> gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc
> misdemeanours
> gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
> gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> 'analogix_dp_start_aux_transaction'

As commented on the other patches, the subject prefixes on most of these
look wrong, but it's generally a nice cleanup.

Thanks!
Thierry


Attachments:
(No filename) (2.00 kB)
signature.asc (849.00 B)
Download all attachments

2020-11-05 16:51:46

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

On Thu, Nov 05, 2020 at 02:45:14PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_THROUGH' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_ALIGNED' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_320X240' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_360X240' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_1' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_THROUGH' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_ALIGNED' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_640X320_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_720X360_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_2' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_720X360_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_640X320_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_UNKNOWN' not described in enum 'ili9322_input'
>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Again, for the subject prefix, this should probably be:

drm/panel: ili9322:

but otherwise this seems okay:

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (2.51 kB)
signature.asc (849.00 B)
Download all attachments

2020-11-05 16:55:41

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

On 05/11/2020 16:45, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
> drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

I'd use "drm/omap: dsi: " subject prefix, the current one is fine too:

Reviewed-by: Tomi Valkeinen <[email protected]>

Should I pick this up or do you want to keep the series intact?

Tomi

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

2020-11-05 17:09:27

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH 04/19] gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues

On 05/11/2020 16:45, Lee Jones wrote:
> The API has been updated, but the header was not.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Function parameter or member 'crtc' not described in 'omap_irq_enable_vblank'
> drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'dev' description in 'omap_irq_enable_vblank'
> drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'pipe' description in 'omap_irq_enable_vblank'
> drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Function parameter or member 'crtc' not described in 'omap_irq_disable_vblank'
> drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'dev' description in 'omap_irq_disable_vblank'
> drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'pipe' description in 'omap_irq_disable_vblank'
>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Rob Clark <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/omapdrm/omap_irq.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
> index 382bcdc72ac06..8643871e23a83 100644
> --- a/drivers/gpu/drm/omapdrm/omap_irq.c
> +++ b/drivers/gpu/drm/omapdrm/omap_irq.c
> @@ -100,8 +100,7 @@ int omap_irq_enable_framedone(struct drm_crtc *crtc, bool enable)
>
> /**
> * enable_vblank - enable vblank interrupt events
> - * @dev: DRM device
> - * @pipe: which irq to enable
> + * @crtc: DRM CRTC
> *
> * Enable vblank interrupts for @crtc. If the device doesn't have
> * a hardware vblank counter, this routine should be a no-op, since
> @@ -131,8 +130,7 @@ int omap_irq_enable_vblank(struct drm_crtc *crtc)
>
> /**
> * disable_vblank - disable vblank interrupt events
> - * @dev: DRM device
> - * @pipe: which irq to enable
> + * @crtc: DRM CRTC
> *
> * Disable vblank interrupts for @crtc. If the device doesn't have
> * a hardware vblank counter, this routine should be a no-op, since
>

Hmm, I don't know why we have the doc texts there. These are omapdrm internal functions, and the
text sounds like it was copied from a framework function. I think we can drop the texts here.

But this patch is fine too, and I can drop the text later:

Reviewed-by: Tomi Valkeinen <[email protected]>

Tomi

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

2020-11-05 18:11:19

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

On Thu, 05 Nov 2020, Tomi Valkeinen wrote:

> On 05/11/2020 16:45, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
> > drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
> > drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
> > drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
> > drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
> >
> > Cc: Tomi Valkeinen <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Laurent Pinchart <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
> > 1 file changed, 2 insertions(+), 7 deletions(-)
>
> I'd use "drm/omap: dsi: " subject prefix, the current one is fine too:
>
> Reviewed-by: Tomi Valkeinen <[email protected]>
>
> Should I pick this up or do you want to keep the series intact?

If you are in a position to take it, please do so.

I rebase every day, so it will just vanish from my working set.

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

2020-11-05 18:12:51

by Lee Jones

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

On Thu, 05 Nov 2020, Thierry Reding wrote:

> On Thu, Nov 05, 2020 at 02:44:58PM +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.
> >
> > Lee Jones (19):
> > gpu: host1x: bus: Add missing description for 'driver'
> > gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries
> > gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused
> > gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues
> > gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused
> > gpu: drm: scheduler: sched_main: Provide missing description for
> > 'sched' paramter
> > gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc
> > headers
> > gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables
> > gpu: drm: selftests: test-drm_framebuffer: Remove set but unused
> > variable 'fb'
> > gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of
> > kernel-doc abuses
> > gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
> > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > 'analogix_dp_write_byte_to_dpcd'
> > gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses
> > gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct
> > drm_dp_sideband_msg_req_body' onto the heap
> > gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
> > gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> > kernel-doc header
> > gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc
> > misdemeanours
> > gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
> > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > 'analogix_dp_start_aux_transaction'
>
> As commented on the other patches, the subject prefixes on most of these
> look wrong, but it's generally a nice cleanup.

The prefixes are automated. I'll add this to my list of awkward
subsystems and go through them all manually again tomorrow. :D

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

2020-11-05 18:14:43

by Lee Jones

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

On Thu, 05 Nov 2020, Sam Ravnborg wrote:

> Hi Lee.
>
> On Thu, Nov 05, 2020 at 02:44:58PM +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.
>
> Thanks for looking into this.
>
> > There are 5000 warnings to work through.
> >
> > It will take a couple more sets.
> :-)
>
> > gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
> I have a patch here that inline the comments - and fix the warning as a
> side effect. I will get it posted tonight as this is better.
>
> > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > 'analogix_dp_write_byte_to_dpcd'
> When I looked at his I had another unused function after removing the
> first.
>
> > gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> > kernel-doc header
> Agree on this simple approch, will apply.
>
> > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > 'analogix_dp_start_aux_transaction'
> OK, this was the one I referred to above. They should be squashed into
> one patch.

I can squash them if you prefer.

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

2020-11-05 18:18:34

by Daniel Vetter

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

On Thu, Nov 5, 2020 at 7:10 PM Lee Jones <[email protected]> wrote:
>
> On Thu, 05 Nov 2020, Thierry Reding wrote:
>
> > On Thu, Nov 05, 2020 at 02:44:58PM +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.
> > >
> > > Lee Jones (19):
> > > gpu: host1x: bus: Add missing description for 'driver'
> > > gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries
> > > gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused
> > > gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues
> > > gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused
> > > gpu: drm: scheduler: sched_main: Provide missing description for
> > > 'sched' paramter
> > > gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc
> > > headers
> > > gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables
> > > gpu: drm: selftests: test-drm_framebuffer: Remove set but unused
> > > variable 'fb'
> > > gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of
> > > kernel-doc abuses
> > > gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
> > > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > > 'analogix_dp_write_byte_to_dpcd'
> > > gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses
> > > gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct
> > > drm_dp_sideband_msg_req_body' onto the heap
> > > gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
> > > gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> > > kernel-doc header
> > > gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc
> > > misdemeanours
> > > gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
> > > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > > 'analogix_dp_start_aux_transaction'
> >
> > As commented on the other patches, the subject prefixes on most of these
> > look wrong, but it's generally a nice cleanup.
>
> The prefixes are automated. I'll add this to my list of awkward
> subsystems and go through them all manually again tomorrow. :D

tbh for autmoation they look really good :-)

I'd say if you replace the intermediate ": " with just a / you'll be
perfectly in style for drivers/gpu. But really I think it's ok as-is,
imo no need to change since this is a giantic tree wide effort.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2020-11-05 18:29:35

by Lee Jones

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

On Thu, 05 Nov 2020, Daniel Vetter wrote:

> On Thu, Nov 5, 2020 at 7:10 PM Lee Jones <[email protected]> wrote:
> >
> > On Thu, 05 Nov 2020, Thierry Reding wrote:
> >
> > > On Thu, Nov 05, 2020 at 02:44:58PM +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.
> > > >
> > > > Lee Jones (19):
> > > > gpu: host1x: bus: Add missing description for 'driver'
> > > > gpu: ipu-v3: ipu-di: Strip out 2 unused 'di_sync_config' entries
> > > > gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused
> > > > gpu: drm: omapdrm: omap_irq: Fix a couple of doc-rot issues
> > > > gpu: drm: selftests: test-drm_mm: Mark 'hole_end' as always_unused
> > > > gpu: drm: scheduler: sched_main: Provide missing description for
> > > > 'sched' paramter
> > > > gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc
> > > > headers
> > > > gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables
> > > > gpu: drm: selftests: test-drm_framebuffer: Remove set but unused
> > > > variable 'fb'
> > > > gpu: drm: ttm: ttm_bo: Fix one function header - demote lots of
> > > > kernel-doc abuses
> > > > gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header
> > > > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > > > 'analogix_dp_write_byte_to_dpcd'
> > > > gpu: drm: ttm: ttm_tt: Demote kernel-doc header format abuses
> > > > gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct
> > > > drm_dp_sideband_msg_req_body' onto the heap
> > > > gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
> > > > gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant
> > > > kernel-doc header
> > > > gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc
> > > > misdemeanours
> > > > gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
> > > > gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function
> > > > 'analogix_dp_start_aux_transaction'
> > >
> > > As commented on the other patches, the subject prefixes on most of these
> > > look wrong, but it's generally a nice cleanup.
> >
> > The prefixes are automated. I'll add this to my list of awkward
> > subsystems and go through them all manually again tomorrow. :D
>
> tbh for autmoation they look really good :-)

Only the prefixes are automated unfortunately. :)

> I'd say if you replace the intermediate ": " with just a / you'll be
> perfectly in style for drivers/gpu. But really I think it's ok as-is,

It's up to you. Make the call and I'll abide.

> imo no need to change since this is a giantic tree wide effort.

Yes, you're not kidding, and thanks for noticing.

Only 10,000 (from 18,000) more to go though. :D

GPU is a biggy (5,000), although one patch in [Set 2] fixes 2,000 in
one hit, which is great! I'll probably submit that tomorrow.

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

2020-11-05 19:19:29

by Ahmad Fatoum

[permalink] [raw]
Subject: Re: [PATCH 03/19] gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused

Hello Lee,

On 11/5/20 3:45 PM, Lee Jones wrote:
> In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
> as a container for state->crtcs[i].new_state, but is not utilised in
> this use-case. We cannot simply delete the variable, so here we tell
> the compiler that we're intentionally discarding the read value.

for_each_oldnew_crtc_in_state already (void) casts the drm_crtc and the old
drm_crtc_state to silence unused-but-set-variable warning. Should we maybe
(void) cast the new crtc_state as well?

Cheers
Ahmad

>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’:
> drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable]
>
> Cc: Philipp Zabel <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
> Cc: Pengutronix Kernel Team <[email protected]>
> Cc: Fabio Estevam <[email protected]>
> Cc: NXP Linux Team <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/gpu/drm/imx/ipuv3-plane.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
> index 8a4235d9d9f1e..acc0a3ce4992f 100644
> --- a/drivers/gpu/drm/imx/ipuv3-plane.c
> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
> @@ -743,7 +743,7 @@ bool ipu_plane_atomic_update_pending(struct drm_plane *plane)
> int ipu_planes_assign_pre(struct drm_device *dev,
> struct drm_atomic_state *state)
> {
> - struct drm_crtc_state *old_crtc_state, *crtc_state;
> + struct drm_crtc_state *old_crtc_state, __always_unused *crtc_state;
> struct drm_plane_state *plane_state;
> struct ipu_plane_state *ipu_state;
> struct ipu_plane *ipu_plane;
>

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

2020-11-05 21:15:24

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 01/19] gpu: host1x: bus: Add missing description for 'driver'

Hi Lee.
On Thu, Nov 05, 2020 at 02:44:59PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/host1x/bus.c:40: warning: Function parameter or member 'driver' not described in 'host1x_subdev_add'
>
> Cc: Thierry Reding <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied to drm-misc-next - should appear in -next within a week.

Sam
> ---
> drivers/gpu/host1x/bus.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
> index e201f62d62c0c..347fb962b6c93 100644
> --- a/drivers/gpu/host1x/bus.c
> +++ b/drivers/gpu/host1x/bus.c
> @@ -32,6 +32,7 @@ struct host1x_subdev {
> /**
> * host1x_subdev_add() - add a new subdevice with an associated device node
> * @device: host1x device to add the subdevice to
> + * @driver: host1x driver containing the subdevices
> * @np: device node
> */
> static int host1x_subdev_add(struct host1x_device *device,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-05 21:20:05

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 11/19] gpu: drm: panel: panel-simple: Fix 'struct panel_desc's header

Hi Lee

On Thu, Nov 05, 2020 at 02:45:09PM +0000, Lee Jones wrote:
> Struct headers should start with 'struct <name>'
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/panel/panel-simple.c:42: warning: Cannot understand * @modes: Pointer to array of fixed modes appropriate for this panel. If
>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Despite my earlier comment I went ahead and applied this.
Then I can rebase my work on this later.

Sam

2020-11-05 21:20:06

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

Hi Lee.

On Thu, Nov 05, 2020 at 02:45:14PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_THROUGH' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_ALIGNED' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_320X240' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_360X240' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_1' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_THROUGH' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_ALIGNED' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_640X320_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_720X360_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_2' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_720X360_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_640X320_YCBCR' not described in enum 'ili9322_input'
> drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_UNKNOWN' not described in enum 'ili9322_input'
>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied to drm-misc-next.

Sam

2020-11-05 21:25:32

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 12/19] gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function 'analogix_dp_write_byte_to_dpcd'

Hi Lee

On Thu, Nov 05, 2020 at 02:45:10PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:571:5: warning: no previous prototype for ‘analogix_dp_write_byte_to_dpcd’ [-Wmissing-prototypes]
>
> Cc: Andrzej Hajda <[email protected]>
> Cc: Neil Armstrong <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: Jonas Karlman <[email protected]>
> Cc: Jernej Skrabec <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Jason Yan <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

I folded in the other analogix_dp_reg.c patch when I applied this.
So we have the full removal in one patch.

Sam

2020-11-06 04:28:52

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

Hi Lee,

Thank you for the patch.

On Thu, Nov 05, 2020 at 02:45:06PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
> drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index eeccf40bae416..5929b320b3cfa 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -1128,13 +1128,12 @@ static void dsi_runtime_put(struct dsi_data *dsi)
>
> static void _dsi_print_reset_status(struct dsi_data *dsi)
> {
> - u32 l;
> int b0, b1, b2;
>
> /* A dummy read using the SCP interface to any DSIPHY register is
> * required after DSIPHY reset to complete the reset of the DSI complex
> * I/O. */
> - l = dsi_read_reg(dsi, DSI_DSIPHY_CFG5);
> + dsi_read_reg(dsi, DSI_DSIPHY_CFG5);
>
> if (dsi->data->quirks & DSI_QUIRK_REVERSE_TXCLKESC) {
> b0 = 28;
> @@ -3940,7 +3939,6 @@ static int dsi_update(struct omap_dss_device *dssdev, int channel,
> void (*callback)(int, void *), void *data)
> {
> struct dsi_data *dsi = to_dsi_data(dssdev);
> - u16 dw, dh;
>
> dsi_perf_mark_setup(dsi);
>
> @@ -3949,11 +3947,8 @@ static int dsi_update(struct omap_dss_device *dssdev, int channel,
> dsi->framedone_callback = callback;
> dsi->framedone_data = data;
>
> - dw = dsi->vm.hactive;
> - dh = dsi->vm.vactive;
> -
> #ifdef DSI_PERF_MEASURE
> - dsi->update_bytes = dw * dh *
> + dsi->update_bytes = dsi->vm.hactive * dsi->vm.vactive *
> dsi_get_pixel_size(dsi->pix_fmt) / 8;
> #endif
> dsi_update_screen_dispc(dsi);

--
Regards,

Laurent Pinchart

2020-11-06 07:45:45

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 03/19] gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused

On Thu, 05 Nov 2020, Ahmad Fatoum wrote:

> Hello Lee,
>
> On 11/5/20 3:45 PM, Lee Jones wrote:
> > In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
> > as a container for state->crtcs[i].new_state, but is not utilised in
> > this use-case. We cannot simply delete the variable, so here we tell
> > the compiler that we're intentionally discarding the read value.
>
> for_each_oldnew_crtc_in_state already (void) casts the drm_crtc and the old
> drm_crtc_state to silence unused-but-set-variable warning. Should we maybe
> (void) cast the new crtc_state as well?

From what I saw, it only void casts the ones which aren't assigned.

> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’:
> > drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable]
> >
> > Cc: Philipp Zabel <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Shawn Guo <[email protected]>
> > Cc: Sascha Hauer <[email protected]>
> > Cc: Pengutronix Kernel Team <[email protected]>
> > Cc: Fabio Estevam <[email protected]>
> > Cc: NXP Linux Team <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/gpu/drm/imx/ipuv3-plane.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
> > index 8a4235d9d9f1e..acc0a3ce4992f 100644
> > --- a/drivers/gpu/drm/imx/ipuv3-plane.c
> > +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
> > @@ -743,7 +743,7 @@ bool ipu_plane_atomic_update_pending(struct drm_plane *plane)
> > int ipu_planes_assign_pre(struct drm_device *dev,
> > struct drm_atomic_state *state)
> > {
> > - struct drm_crtc_state *old_crtc_state, *crtc_state;
> > + struct drm_crtc_state *old_crtc_state, __always_unused *crtc_state;
> > struct drm_plane_state *plane_state;
> > struct ipu_plane_state *ipu_state;
> > struct ipu_plane *ipu_plane;
> >
>

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

2020-11-06 07:45:45

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

On Thu, 05 Nov 2020, Sam Ravnborg wrote:

> Hi Lee.
>
> On Thu, Nov 05, 2020 at 02:45:14PM +0000, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_THROUGH' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_ALIGNED' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_320X240' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_360X240' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_1' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_THROUGH' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_ALIGNED' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_640X320_YCBCR' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_720X360_YCBCR' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_2' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_720X360_YCBCR' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_640X320_YCBCR' not described in enum 'ili9322_input'
> > drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_UNKNOWN' not described in enum 'ili9322_input'
> >
> > Cc: Thierry Reding <[email protected]>
> > Cc: Sam Ravnborg <[email protected]>
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Linus Walleij <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
>
> Applied to drm-misc-next.

Thanks for all these Sam.

Any idea what happens to the other patches?

Do they go in via a different Maintainer?

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

2020-11-06 08:49:13

by Ahmad Fatoum

[permalink] [raw]
Subject: Re: [PATCH 03/19] gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused

On 11/6/20 8:41 AM, Lee Jones wrote:
> On Thu, 05 Nov 2020, Ahmad Fatoum wrote:
>
>> Hello Lee,
>>
>> On 11/5/20 3:45 PM, Lee Jones wrote:
>>> In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
>>> as a container for state->crtcs[i].new_state, but is not utilised in
>>> this use-case. We cannot simply delete the variable, so here we tell
>>> the compiler that we're intentionally discarding the read value.
>>
>> for_each_oldnew_crtc_in_state already (void) casts the drm_crtc and the old
>> drm_crtc_state to silence unused-but-set-variable warning. Should we maybe
>> (void) cast the new crtc_state as well?
>
> From what I saw, it only void casts the ones which aren't assigned.

How do you mean? I wonder if

#define for_each_oldnew_crtc_in_state(__state, crtc, old_crtc_state, new_crtc_state, __i) \
for ((__i) = 0; \
(__i) < (__state)->dev->mode_config.num_crtc; \
(__i)++) \
for_each_if ((__state)->crtcs[__i].ptr && \
((crtc) = (__state)->crtcs[__i].ptr, \
(void)(crtc) /* Only to avoid unused-but-set-variable warning */, \
(old_crtc_state) = (__state)->crtcs[__i].old_state, \
(void)(old_crtc_state) /* Only to avoid unused-but-set-variable warning */, \
- (new_crtc_state) = (__state)->crtcs[__i].new_state, 1))
+ (new_crtc_state) = (__state)->crtcs[__i].new_state, \
+ (void)(new_crtc_state), 1))

wouldn't be better.

>
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>> drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’:
>>> drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable]
>>>
>>> Cc: Philipp Zabel <[email protected]>
>>> Cc: David Airlie <[email protected]>
>>> Cc: Daniel Vetter <[email protected]>
>>> Cc: Shawn Guo <[email protected]>
>>> Cc: Sascha Hauer <[email protected]>
>>> Cc: Pengutronix Kernel Team <[email protected]>
>>> Cc: Fabio Estevam <[email protected]>
>>> Cc: NXP Linux Team <[email protected]>
>>> Cc: [email protected]
>>> Signed-off-by: Lee Jones <[email protected]>
>>> ---
>>> drivers/gpu/drm/imx/ipuv3-plane.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
>>> index 8a4235d9d9f1e..acc0a3ce4992f 100644
>>> --- a/drivers/gpu/drm/imx/ipuv3-plane.c
>>> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
>>> @@ -743,7 +743,7 @@ bool ipu_plane_atomic_update_pending(struct drm_plane *plane)
>>> int ipu_planes_assign_pre(struct drm_device *dev,
>>> struct drm_atomic_state *state)
>>> {
>>> - struct drm_crtc_state *old_crtc_state, *crtc_state;
>>> + struct drm_crtc_state *old_crtc_state, __always_unused *crtc_state;
>>> struct drm_plane_state *plane_state;
>>> struct ipu_plane_state *ipu_state;
>>> struct ipu_plane *ipu_plane;
>>>
>>
>

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

2020-11-06 08:50:55

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 03/19] gpu: drm: imx: ipuv3-plane: Mark 'crtc_state' as __always_unused

On Fri, 06 Nov 2020, Ahmad Fatoum wrote:

> On 11/6/20 8:41 AM, Lee Jones wrote:
> > On Thu, 05 Nov 2020, Ahmad Fatoum wrote:
> >
> >> Hello Lee,
> >>
> >> On 11/5/20 3:45 PM, Lee Jones wrote:
> >>> In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
> >>> as a container for state->crtcs[i].new_state, but is not utilised in
> >>> this use-case. We cannot simply delete the variable, so here we tell
> >>> the compiler that we're intentionally discarding the read value.
> >>
> >> for_each_oldnew_crtc_in_state already (void) casts the drm_crtc and the old
> >> drm_crtc_state to silence unused-but-set-variable warning. Should we maybe
> >> (void) cast the new crtc_state as well?
> >
> > From what I saw, it only void casts the ones which aren't assigned.
>
> How do you mean? I wonder if
>
> #define for_each_oldnew_crtc_in_state(__state, crtc, old_crtc_state, new_crtc_state, __i) \
> for ((__i) = 0; \
> (__i) < (__state)->dev->mode_config.num_crtc; \
> (__i)++) \
> for_each_if ((__state)->crtcs[__i].ptr && \
> ((crtc) = (__state)->crtcs[__i].ptr, \
> (void)(crtc) /* Only to avoid unused-but-set-variable warning */, \
> (old_crtc_state) = (__state)->crtcs[__i].old_state, \
> (void)(old_crtc_state) /* Only to avoid unused-but-set-variable warning */, \
> - (new_crtc_state) = (__state)->crtcs[__i].new_state, 1))
> + (new_crtc_state) = (__state)->crtcs[__i].new_state, \
> + (void)(new_crtc_state), 1))
>
> wouldn't be better.

That also works for me. I can fix this up.

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

2020-11-06 14:06:52

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

On 05/11/2020 20:07, Lee Jones wrote:
> On Thu, 05 Nov 2020, Tomi Valkeinen wrote:
>
>> On 05/11/2020 16:45, Lee Jones wrote:
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
>>> drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
>>> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
>>> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
>>> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
>>>
>>> Cc: Tomi Valkeinen <[email protected]>
>>> Cc: David Airlie <[email protected]>
>>> Cc: Daniel Vetter <[email protected]>
>>> Cc: Laurent Pinchart <[email protected]>
>>> Cc: [email protected]
>>> Signed-off-by: Lee Jones <[email protected]>
>>> ---
>>> drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
>>> 1 file changed, 2 insertions(+), 7 deletions(-)
>>
>> I'd use "drm/omap: dsi: " subject prefix, the current one is fine too:
>>
>> Reviewed-by: Tomi Valkeinen <[email protected]>
>>
>> Should I pick this up or do you want to keep the series intact?
>
> If you are in a position to take it, please do so.
>
> I rebase every day, so it will just vanish from my working set.

I have a 56 patch series on dsi.c that I sent yesterday, and it conflicts with this one. I'll pick
this one on top of my series.

Tomi

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

2020-11-06 14:34:36

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 08/19] gpu: drm: omapdrm: dss: dsi: Rework and remove a few unused variables

On Fri, 06 Nov 2020, Tomi Valkeinen wrote:

> On 05/11/2020 20:07, Lee Jones wrote:
> > On Thu, 05 Nov 2020, Tomi Valkeinen wrote:
> >
> >> On 05/11/2020 16:45, Lee Jones wrote:
> >>> Fixes the following W=1 kernel build warning(s):
> >>>
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
> >>>
> >>> Cc: Tomi Valkeinen <[email protected]>
> >>> Cc: David Airlie <[email protected]>
> >>> Cc: Daniel Vetter <[email protected]>
> >>> Cc: Laurent Pinchart <[email protected]>
> >>> Cc: [email protected]
> >>> Signed-off-by: Lee Jones <[email protected]>
> >>> ---
> >>> drivers/gpu/drm/omapdrm/dss/dsi.c | 9 ++-------
> >>> 1 file changed, 2 insertions(+), 7 deletions(-)
> >>
> >> I'd use "drm/omap: dsi: " subject prefix, the current one is fine too:
> >>
> >> Reviewed-by: Tomi Valkeinen <[email protected]>
> >>
> >> Should I pick this up or do you want to keep the series intact?
> >
> > If you are in a position to take it, please do so.
> >
> > I rebase every day, so it will just vanish from my working set.
>
> I have a 56 patch series on dsi.c that I sent yesterday, and it conflicts with this one. I'll pick
> this one on top of my series.

Sounds good, thanks.

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

2020-11-06 16:15:35

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

Hi Lee,
> >
> > Applied to drm-misc-next.
>
> Thanks for all these Sam.
>
> Any idea what happens to the other patches?
>
> Do they go in via a different Maintainer?

I expect the respective drm maintaines to take them.
Give them a few days to take action.

I look forward for the next set that you said would kill 2000+ warnings.

Sam

2020-11-06 16:56:36

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 16/19] gpu: drm: panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header

On Fri, 06 Nov 2020, Sam Ravnborg wrote:

> Hi Lee,
> > >
> > > Applied to drm-misc-next.
> >
> > Thanks for all these Sam.
> >
> > Any idea what happens to the other patches?
> >
> > Do they go in via a different Maintainer?
>
> I expect the respective drm maintaines to take them.
> Give them a few days to take action.
>
> I look forward for the next set that you said would kill 2000+ warnings.

Just testing it now. I hope to send it this evening.

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

2020-11-06 19:19:40

by Lyude Paul

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Thu, 2020-11-05 at 14:45 +0000, Lee Jones wrote:
> The stack is too full.
>
> 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:161:1: warning: the frame
> size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Lyude Paul <[email protected]>
> Cc: David Francis <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
>  .../drm/selftests/test-drm_dp_mst_helper.c    | 29 ++++++++++++-------
>  1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct
> drm_dp_sideband_msg_req_body *in,
>  static bool
>  sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
>  {
> -       struct drm_dp_sideband_msg_req_body out = {0};
> +       struct drm_dp_sideband_msg_req_body *out;
>         struct drm_printer p = drm_err_printer(PREFIX_STR);
>         struct drm_dp_sideband_msg_tx txmsg;
>         int i, ret;
> +       bool result = true;
> +
> +       out = kzalloc(sizeof(*out), GFP_KERNEL);
>

You're missing a NULL check here

>  
>         drm_dp_encode_sideband_req(in, &txmsg);
> -       ret = drm_dp_decode_sideband_req(&txmsg, &out);
> +       ret = drm_dp_decode_sideband_req(&txmsg, out);
>         if (ret < 0) {
>                 drm_printf(&p, "Failed to decode sideband request: %d\n",
>                            ret);
> -               return false;
> +               result = false;
> +               goto out;
>         }
>  
> -       if (!sideband_msg_req_equal(in, &out)) {
> +       if (!sideband_msg_req_equal(in, out)) {
>                 drm_printf(&p, "Encode/decode failed, expected:\n");
>                 drm_dp_dump_sideband_msg_req_body(in, 1, &p);
>                 drm_printf(&p, "Got:\n");
> -               drm_dp_dump_sideband_msg_req_body(&out, 1, &p);
> -               return false;
> +               drm_dp_dump_sideband_msg_req_body(out, 1, &p);
> +               result = false;
> +               goto out;
>         }
>  
>         switch (in->req_type) {
>         case DP_REMOTE_DPCD_WRITE:
> -               kfree(out.u.dpcd_write.bytes);
> +               kfree(out->u.dpcd_write.bytes);
>                 break;
>         case DP_REMOTE_I2C_READ:
> -               for (i = 0; i < out.u.i2c_read.num_transactions; i++)
> -                       kfree(out.u.i2c_read.transactions[i].bytes);
> +               for (i = 0; i < out->u.i2c_read.num_transactions; i++)
> +                       kfree(out->u.i2c_read.transactions[i].bytes);
>                 break;
>         case DP_REMOTE_I2C_WRITE:
> -               kfree(out.u.i2c_write.bytes);
> +               kfree(out->u.i2c_write.bytes);
>                 break;
>         }
>  
>         /* Clear everything but the req_type for the input */
>         memset(&in->u, 0, sizeof(in->u));
>  
> -       return true;
> +out:
> +       kfree(out);
> +       return result;
>  }
>  
>  int igt_dp_mst_sideband_msg_req_decode(void *unused)

--
Sincerely,
Lyude Paul (she/her)
Software Engineer at Red Hat

Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've
asked me a question, are waiting for a review/merge on a patch, etc. and I
haven't responded in a while, please feel free to send me another email to check
on my status. I don't bite!

2020-11-06 19:27:57

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Fri, 06 Nov 2020, Lyude Paul wrote:

> On Thu, 2020-11-05 at 14:45 +0000, Lee Jones wrote:
> > The stack is too full.
> >
> > 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:161:1: warning: the frame
> > size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> >
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Lyude Paul <[email protected]>
> > Cc: David Francis <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> >  .../drm/selftests/test-drm_dp_mst_helper.c    | 29 ++++++++++++-------
> >  1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct
> > drm_dp_sideband_msg_req_body *in,
> >  static bool
> >  sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> >  {
> > -       struct drm_dp_sideband_msg_req_body out = {0};
> > +       struct drm_dp_sideband_msg_req_body *out;
> >         struct drm_printer p = drm_err_printer(PREFIX_STR);
> >         struct drm_dp_sideband_msg_tx txmsg;
> >         int i, ret;
> > +       bool result = true;
> > +
> > +       out = kzalloc(sizeof(*out), GFP_KERNEL);
> >
>
> You're missing a NULL check here

You're right. School-boy error! Will fix.

> >         drm_dp_encode_sideband_req(in, &txmsg);

Wow, what are all these?

What mailer are you using?

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

2020-11-09 15:21:58

by Ville Syrjälä

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> The stack is too full.
>
> 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Lyude Paul <[email protected]>
> Cc: David Francis <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> static bool
> sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> {
> - struct drm_dp_sideband_msg_req_body out = {0};
> + struct drm_dp_sideband_msg_req_body *out;

How big is it? And why is it that big?

--
Ville Syrjälä
Intel

2020-11-09 16:15:35

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, 09 Nov 2020, Ville Syrjälä wrote:

> On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > The stack is too full.
> >
> > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> >
> > Cc: David Airlie <[email protected]>
> > Cc: Daniel Vetter <[email protected]>
> > Cc: Lyude Paul <[email protected]>
> > Cc: David Francis <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > static bool
> > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > {
> > - struct drm_dp_sideband_msg_req_body out = {0};
> > + struct drm_dp_sideband_msg_req_body *out;
>
> How big is it? And why is it that big?

It's a struct of a union of structs.

And it's all allocated on the stack. Bad news!

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

2020-11-09 16:17:43

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, 09 Nov 2020, Lee Jones wrote:

> On Mon, 09 Nov 2020, Ville Syrjälä wrote:
>
> > On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > > The stack is too full.
> > >
> > > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > >
> > > Cc: David Airlie <[email protected]>
> > > Cc: Daniel Vetter <[email protected]>
> > > Cc: Lyude Paul <[email protected]>
> > > Cc: David Francis <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Lee Jones <[email protected]>
> > > ---
> > > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > > static bool
> > > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > > {
> > > - struct drm_dp_sideband_msg_req_body out = {0};
> > > + struct drm_dp_sideband_msg_req_body *out;
> >
> > How big is it? And why is it that big?
>
> It's a struct of a union of structs.
>
> And it's all allocated on the stack. Bad news!

FYI, I have a v2 of this patch. Just waiting to send it.

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

2020-11-09 16:24:39

by Ville Syrjälä

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, Nov 09, 2020 at 04:12:58PM +0000, Lee Jones wrote:
> On Mon, 09 Nov 2020, Ville Syrjälä wrote:
>
> > On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > > The stack is too full.
> > >
> > > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > >
> > > Cc: David Airlie <[email protected]>
> > > Cc: Daniel Vetter <[email protected]>
> > > Cc: Lyude Paul <[email protected]>
> > > Cc: David Francis <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Lee Jones <[email protected]>
> > > ---
> > > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > > static bool
> > > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > > {
> > > - struct drm_dp_sideband_msg_req_body out = {0};
> > > + struct drm_dp_sideband_msg_req_body *out;
> >
> > How big is it? And why is it that big?
>
> It's a struct of a union of structs.
>
> And it's all allocated on the stack. Bad news!

That doesn't answer my questions.

--
Ville Syrjälä
Intel

2020-11-09 16:42:35

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, 09 Nov 2020, Ville Syrjälä wrote:

> On Mon, Nov 09, 2020 at 04:12:58PM +0000, Lee Jones wrote:
> > On Mon, 09 Nov 2020, Ville Syrjälä wrote:
> >
> > > On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > > > The stack is too full.
> > > >
> > > > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > > >
> > > > Cc: David Airlie <[email protected]>
> > > > Cc: Daniel Vetter <[email protected]>
> > > > Cc: Lyude Paul <[email protected]>
> > > > Cc: David Francis <[email protected]>
> > > > Cc: [email protected]
> > > > Signed-off-by: Lee Jones <[email protected]>
> > > > ---
> > > > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > > > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > > > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > > > static bool
> > > > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > > > {
> > > > - struct drm_dp_sideband_msg_req_body out = {0};
> > > > + struct drm_dp_sideband_msg_req_body *out;
> > >
> > > How big is it? And why is it that big?
> >
> > It's a struct of a union of structs.
> >
> > And it's all allocated on the stack. Bad news!
>
> That doesn't answer my questions.

It answers the second question.

The answer to the first question you can `grep` for yourself. ;)

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

2020-11-09 17:07:39

by Ville Syrjälä

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, Nov 09, 2020 at 04:40:04PM +0000, Lee Jones wrote:
> On Mon, 09 Nov 2020, Ville Syrjälä wrote:
>
> > On Mon, Nov 09, 2020 at 04:12:58PM +0000, Lee Jones wrote:
> > > On Mon, 09 Nov 2020, Ville Syrjälä wrote:
> > >
> > > > On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > > > > The stack is too full.
> > > > >
> > > > > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > > > >
> > > > > Cc: David Airlie <[email protected]>
> > > > > Cc: Daniel Vetter <[email protected]>
> > > > > Cc: Lyude Paul <[email protected]>
> > > > > Cc: David Francis <[email protected]>
> > > > > Cc: [email protected]
> > > > > Signed-off-by: Lee Jones <[email protected]>
> > > > > ---
> > > > > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > > > > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > > > > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > > > > static bool
> > > > > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > > > > {
> > > > > - struct drm_dp_sideband_msg_req_body out = {0};
> > > > > + struct drm_dp_sideband_msg_req_body *out;
> > > >
> > > > How big is it? And why is it that big?
> > >
> > > It's a struct of a union of structs.
> > >
> > > And it's all allocated on the stack. Bad news!
> >
> > That doesn't answer my questions.
>
> It answers the second question.

Not really. A combination of structs and unions could be
pretty much any size.

>
> The answer to the first question you can `grep` for yourself. ;)

I would rather run pahole on it. But why would you require
reviewers to jump through such extra hoops when you could
just put that information into the commit message? With that
anyone could review this without having to do a lot of extra
work.

--
Ville Syrjälä
Intel

2020-11-09 17:20:04

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 14/19] gpu: drm: selftests: test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap

On Mon, 09 Nov 2020, Ville Syrjälä wrote:

> On Mon, Nov 09, 2020 at 04:40:04PM +0000, Lee Jones wrote:
> > On Mon, 09 Nov 2020, Ville Syrjälä wrote:
> >
> > > On Mon, Nov 09, 2020 at 04:12:58PM +0000, Lee Jones wrote:
> > > > On Mon, 09 Nov 2020, Ville Syrjälä wrote:
> > > >
> > > > > On Thu, Nov 05, 2020 at 02:45:12PM +0000, Lee Jones wrote:
> > > > > > The stack is too full.
> > > > > >
> > > > > > 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:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > > > > >
> > > > > > Cc: David Airlie <[email protected]>
> > > > > > Cc: Daniel Vetter <[email protected]>
> > > > > > Cc: Lyude Paul <[email protected]>
> > > > > > Cc: David Francis <[email protected]>
> > > > > > Cc: [email protected]
> > > > > > Signed-off-by: Lee Jones <[email protected]>
> > > > > > ---
> > > > > > .../drm/selftests/test-drm_dp_mst_helper.c | 29 ++++++++++++-------
> > > > > > 1 file changed, 18 insertions(+), 11 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 1d696ec001cff..0a539456f6864 100644
> > > > > > --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > > > +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
> > > > > > @@ -120,44 +120,51 @@ sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in,
> > > > > > static bool
> > > > > > sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
> > > > > > {
> > > > > > - struct drm_dp_sideband_msg_req_body out = {0};
> > > > > > + struct drm_dp_sideband_msg_req_body *out;
> > > > >
> > > > > How big is it? And why is it that big?
> > > >
> > > > It's a struct of a union of structs.
> > > >
> > > > And it's all allocated on the stack. Bad news!
> > >
> > > That doesn't answer my questions.
> >
> > It answers the second question.
>
> Not really. A combination of structs and unions could be
> pretty much any size.
>
> >
> > The answer to the first question you can `grep` for yourself. ;)
>
> I would rather run pahole on it. But why would you require
> reviewers to jump through such extra hoops when you could
> just put that information into the commit message? With that
> anyone could review this without having to do a lot of extra
> work.

Because the exact numbers aren't all that relevant.

Before the patch is applied, the local variables take the frame size
over the accepted threshold. The patch brings the size back down to
an accepted level.

I'm not actually aware of the exact numbers, but you can see by taking
a quick look that 'struct drm_dp_sideband_msg_req_body' is large
enough to make a significant improvement once shifted onto the heap.

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

2020-11-10 21:15:23

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 06/19] gpu: drm: scheduler: sched_main: Provide missing description for 'sched' paramter

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/scheduler/sched_main.c:74: warning: Function parameter or member 'sched' not described in 'drm_sched_rq_init'
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/scheduler/sched_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 9a0d77a680180..da24c4e8b9fb3 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -65,6 +65,7 @@ static void drm_sched_process_job(struct dma_fence *f, struct dma_fence_cb *cb);
> /**
> * drm_sched_rq_init - initialize a given run queue struct
> *
> + * @sched: scheduler instance to associate with this run queue
> * @rq: scheduler run queue
> *
> * Initializes a scheduler runqueue.
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:18:55

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 07/19] gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc headers

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'f' not described in 'drm_sched_entity_clear_dep'
> drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_clear_dep'
> drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'f' not described in 'drm_sched_entity_wakeup'
> drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_wakeup'
>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: Alex Deucher <[email protected]>
> Cc: Nirmoy Das <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

Applied. Thanks!

Alex

> ---
> drivers/gpu/drm/scheduler/sched_entity.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
> index f8ec277a6aa85..c1ac3e4003c6f 100644
> --- a/drivers/gpu/drm/scheduler/sched_entity.c
> +++ b/drivers/gpu/drm/scheduler/sched_entity.c
> @@ -308,7 +308,7 @@ void drm_sched_entity_destroy(struct drm_sched_entity *entity)
> }
> EXPORT_SYMBOL(drm_sched_entity_destroy);
>
> -/**
> +/*
> * drm_sched_entity_clear_dep - callback to clear the entities dependency
> */
> static void drm_sched_entity_clear_dep(struct dma_fence *f,
> @@ -321,7 +321,7 @@ static void drm_sched_entity_clear_dep(struct dma_fence *f,
> dma_fence_put(f);
> }
>
> -/**
> +/*
> * drm_sched_entity_clear_dep - callback to clear the entities dependency and
> * wake up scheduler
> */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:19:45

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 15/19] gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/radeon/radeon_drv.c: In function ‘radeon_pmops_runtime_suspend’:
> drivers/gpu/drm/radeon/radeon_drv.c:455:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> 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 | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 65061c949aeea..f5f1cb700d873 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -452,7 +452,6 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
> {
> struct pci_dev *pdev = to_pci_dev(dev);
> struct drm_device *drm_dev = pci_get_drvdata(pdev);
> - int ret;
>
> if (!radeon_is_px(drm_dev)) {
> pm_runtime_forbid(dev);
> @@ -462,7 +461,7 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
> drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> drm_kms_helper_poll_disable(drm_dev);
>
> - ret = radeon_suspend_kms(drm_dev, false, false, false);
> + radeon_suspend_kms(drm_dev, false, false, false);
> pci_save_state(pdev);
> pci_disable_device(pdev);
> pci_ignore_hotplug(pdev);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:23:53

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 15/19] gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'

On Tue, 10 Nov 2020, Alex Deucher wrote:

> On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/gpu/drm/radeon/radeon_drv.c: In function ‘radeon_pmops_runtime_suspend’:
> > drivers/gpu/drm/radeon/radeon_drv.c:455:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> >
> > 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!

Thanks Alex.

I'll rebase in a few days and fix/resend whatever is outstanding.

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

2020-11-10 21:51:22

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 18/19] gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
>
> These 3 variables are used in *some* sourcefiles which include
> amdgpu.h, but not *all*. This leads to a flurry of build warnings.
>
> Fixes the following W=1 kernel build warning(s):
>
> from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67,
> drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=]
> drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=]
> drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=]
>
> NB: Repeats ~650 times - snipped for brevity.
>
> 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.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 183b09d71b64a..5939753080056 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -193,9 +193,9 @@ extern int sched_policy;
> extern bool debug_evictions;
> extern bool no_system_mem_limit;
> #else
> -static const int sched_policy = KFD_SCHED_POLICY_HWS;
> -static const bool debug_evictions; /* = false */
> -static const bool no_system_mem_limit;
> +static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;
> +static const bool __maybe_unused debug_evictions; /* = false */
> +static const bool __maybe_unused no_system_mem_limit;
> #endif
>
> extern int amdgpu_tmz;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-11-10 21:54:04

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 17/19] gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc misdemeanours

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <[email protected]> wrote:
>
> - Demote non-conformant headers
> - Fix misnaming issues
> - Rename labels with identical names
> - Remove incorrect descriptions
>
> 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]
> drivers/gpu/drm/radeon/radeon_device.c:552: warning: duplicate section name 'Note'
> drivers/gpu/drm/radeon/radeon_device.c:556: warning: duplicate section name 'Note'
> drivers/gpu/drm/radeon/radeon_device.c:561: warning: duplicate section name 'Note'
> drivers/gpu/drm/radeon/radeon_device.c:564: warning: duplicate section name 'Note'
> drivers/gpu/drm/radeon/radeon_device.c:1106: warning: Function parameter or member 'family' not described in 'radeon_gart_size_auto'
> drivers/gpu/drm/radeon/radeon_device.c:1291: warning: Function parameter or member 'ddev' not described in 'radeon_device_init'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'dev' not described in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'suspend' not described in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'fbcon' not described in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'freeze' not described in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'pdev' description in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'state' description in 'radeon_suspend_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'dev' not described in 'radeon_resume_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'resume' not described in 'radeon_resume_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'fbcon' not described in 'radeon_resume_kms'
> drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Excess function parameter 'pdev' description in 'radeon_resume_kms'
>
> 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_device.c | 23 +++++++++--------------
> 1 file changed, 9 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 266e3cbbd09bd..7f384ffe848a7 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -544,21 +544,21 @@ int radeon_wb_init(struct radeon_device *rdev)
> * Note: GTT start, end, size should be initialized before calling this
> * function on AGP platform.
> *
> - * Note: We don't explicitly enforce VRAM start to be aligned on VRAM size,
> + * Note 1: We don't explicitly enforce VRAM start to be aligned on VRAM size,
> * this shouldn't be a problem as we are using the PCI aperture as a reference.
> * Otherwise this would be needed for rv280, all r3xx, and all r4xx, but
> * not IGP.
> *
> - * Note: we use mc_vram_size as on some board we need to program the mc to
> + * Note 2: we use mc_vram_size as on some board we need to program the mc to
> * cover the whole aperture even if VRAM size is inferior to aperture size
> * Novell bug 204882 + along with lots of ubuntu ones
> *
> - * Note: when limiting vram it's safe to overwritte real_vram_size because
> + * Note 3: when limiting vram it's safe to overwritte real_vram_size because
> * we are not in case where real_vram_size is inferior to mc_vram_size (ie
> * note afected by bogus hw of Novell bug 204882 + along with lots of ubuntu
> * ones)
> *
> - * Note: IGP TOM addr should be the same as the aperture addr, we don't
> + * Note 4: IGP TOM addr should be the same as the aperture addr, we don't
> * explicitly check for that thought.
> *
> * FIXME: when reducing VRAM size align new size on power of 2.
> @@ -627,7 +627,7 @@ void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
> * GPU helpers function.
> */
>
> -/**
> +/*
> * radeon_device_is_virtual - check if we are running is a virtual environment
> *
> * Check if the asic has been passed through to a VM (all asics).
> @@ -1100,7 +1100,7 @@ static bool radeon_check_pot_argument(int arg)
> /**
> * Determine a sensible default GART size according to ASIC family.
> *
> - * @family ASIC family name
> + * @family: ASIC family name
> */
> static int radeon_gart_size_auto(enum radeon_family family)
> {
> @@ -1276,7 +1276,7 @@ static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = {
> * radeon_device_init - initialize the driver
> *
> * @rdev: radeon_device pointer
> - * @pdev: drm dev pointer
> + * @ddev: drm dev pointer
> * @pdev: pci dev pointer
> * @flags: driver flags
> *
> @@ -1550,12 +1550,9 @@ void radeon_device_fini(struct radeon_device *rdev)
> /*
> * Suspend & resume.
> */
> -/**
> +/*
> * radeon_suspend_kms - initiate device suspend
> *
> - * @pdev: drm dev pointer
> - * @state: suspend state
> - *
> * Puts the hw in the suspend state (all asics).
> * Returns 0 for success or an error on failure.
> * Called at driver suspend.
> @@ -1656,11 +1653,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
> return 0;
> }
>
> -/**
> +/*
> * radeon_resume_kms - initiate device resume
> *
> - * @pdev: drm dev pointer
> - *
> * Bring the hw back to operating state (all asics).
> * Returns 0 for success or an error on failure.
> * Called at driver resume.
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel