linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND v2 00/43] Rid W=1 warnings from GPU
@ 2020-11-16 17:36 Lee Jones
  2020-11-16 17:36 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
                   ` (42 more replies)
  0 siblings, 43 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, amd-gfx, Christian König,
	Daniel Vetter, David Airlie, dri-devel, Evan Quan, Gareth Hughes,
	linaro-mm-sig, linux-media, Slava Grigorev, Sumit Semwal

[sending again, as `git send-email` crashed!]

This set contains fixes for some "wouldn't it be nice if" issues,
however most of the patches seen here have been on the MLs, but
were left unreviewed.

Lee Jones (43):
  drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s
    prototype into shared location
  drm/radeon/radeon: Move prototype into shared header
  drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to shared header
  drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
  drm/radeon: Move radeon_ttm{init,fini} to shared location
  drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder'
    prototype to shared header
  drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's
    prototype to shared location
  drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix
    another
  drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared
    location
  drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype
    into shared header
  drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location
  drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out
    to shared location
  drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared
    header
  drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype
    into shared header
  drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes into shared
    header
  drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to
    shared header
  drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI
    prototypes to shared header
  drm/radeon/rv770: Move 'rv770_get_*()'s prototypes to shared header
  drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into shared header
  drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header
  drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to
    shared location
  drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to
    shared header
  drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s
    prototype to shared header
  drm/radeon/r600: Move 'evergreen_rlc_resume()'s prototype to shared
    header
  drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s prototype to
    shared header
  drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s
    prototype to shared header
  drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's
    prototype to shared header
  drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header
  drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype to shared
    header
  drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s prototype to
    shared header
  drm/radeon/cik: Move 'si_*()'s prototypes to shared header
  drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype to shared
    header
  drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header
  drm/radeon/evergreen: Move 'si_get_csb_*()'s prototypes to shared
    header
  drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s
    prototype to shared header
  drm/radeon/evergreen: Move 'cik_*()'s prototypes to shared header
  drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header
  drm/radeon/cik: Move 'Move 'cik_sdma_*()'s prototypes to shared header
  drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype to shared
    header
  drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s prototype to shared
    header
  drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s prototype to
    shared header
  drm/radeon/radeon_audio: Move 'r600_*' prototypes into shared header
  drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s
    prototype to shared header

 drivers/gpu/drm/radeon/atom.h                 |  7 ++
 drivers/gpu/drm/radeon/atombios_encoders.c    |  5 +-
 drivers/gpu/drm/radeon/btc_dpm.c              |  6 +-
 drivers/gpu/drm/radeon/ci_dpm.c               | 13 +---
 drivers/gpu/drm/radeon/cik.c                  | 19 ++---
 drivers/gpu/drm/radeon/cik.h                  | 40 +++++++++++
 drivers/gpu/drm/radeon/cik_sdma.c             |  3 +-
 drivers/gpu/drm/radeon/cypress_dpm.c          |  6 +-
 drivers/gpu/drm/radeon/dce6_afmt.c            |  1 +
 drivers/gpu/drm/radeon/dce6_afmt.h            | 52 ++++++++++++++
 drivers/gpu/drm/radeon/evergreen.c            | 16 ++---
 drivers/gpu/drm/radeon/evergreen.h            | 55 +++++++++++++++
 drivers/gpu/drm/radeon/evergreen_cs.c         |  3 +-
 drivers/gpu/drm/radeon/evergreen_dma.c        |  3 +-
 drivers/gpu/drm/radeon/evergreen_hdmi.c       |  1 +
 drivers/gpu/drm/radeon/evergreen_hdmi.h       | 69 +++++++++++++++++++
 drivers/gpu/drm/radeon/ni.c                   | 17 +----
 drivers/gpu/drm/radeon/ni.h                   | 39 +++++++++++
 drivers/gpu/drm/radeon/ni_dma.c               |  3 +-
 drivers/gpu/drm/radeon/ni_dpm.c               |  5 +-
 drivers/gpu/drm/radeon/ni_dpm.h               |  3 +
 drivers/gpu/drm/radeon/r600.c                 |  5 +-
 drivers/gpu/drm/radeon/r600.h                 | 58 ++++++++++++++++
 drivers/gpu/drm/radeon/r600_cs.c              |  1 +
 drivers/gpu/drm/radeon/r600_dma.c             |  3 +-
 drivers/gpu/drm/radeon/r600_hdmi.c            |  1 +
 drivers/gpu/drm/radeon/radeon_acpi.c          |  3 +-
 drivers/gpu/drm/radeon/radeon_atombios.c      | 11 +--
 drivers/gpu/drm/radeon/radeon_atombios.h      | 45 ++++++++++++
 drivers/gpu/drm/radeon/radeon_audio.c         | 68 +-----------------
 drivers/gpu/drm/radeon/radeon_audio.h         | 12 ++++
 drivers/gpu/drm/radeon/radeon_combios.c       |  6 +-
 drivers/gpu/drm/radeon/radeon_device.c        |  1 +
 drivers/gpu/drm/radeon/radeon_device.h        | 32 +++++++++
 drivers/gpu/drm/radeon/radeon_display.c       |  1 +
 drivers/gpu/drm/radeon/radeon_drv.c           | 14 ++--
 drivers/gpu/drm/radeon/radeon_encoders.c      | 10 +--
 drivers/gpu/drm/radeon/radeon_gem.c           |  1 +
 drivers/gpu/drm/radeon/radeon_i2c.c           |  4 --
 drivers/gpu/drm/radeon/radeon_irq_kms.c       |  9 ++-
 drivers/gpu/drm/radeon/radeon_kms.c           |  3 +-
 drivers/gpu/drm/radeon/radeon_kms.h           | 40 +++++++++++
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  1 +
 .../gpu/drm/radeon/radeon_legacy_encoders.h   | 36 ++++++++++
 drivers/gpu/drm/radeon/radeon_object.c        |  3 +-
 drivers/gpu/drm/radeon/radeon_pm.c            |  1 +
 drivers/gpu/drm/radeon/radeon_pm.h            | 33 +++++++++
 drivers/gpu/drm/radeon/radeon_prime.c         |  1 +
 drivers/gpu/drm/radeon/radeon_prime.h         | 42 +++++++++++
 drivers/gpu/drm/radeon/radeon_ttm.c           |  1 +
 drivers/gpu/drm/radeon/radeon_ttm.h           | 37 ++++++++++
 drivers/gpu/drm/radeon/rv730_dpm.c            |  4 +-
 drivers/gpu/drm/radeon/rv740_dpm.c            |  3 +-
 drivers/gpu/drm/radeon/rv770.c                |  1 +
 drivers/gpu/drm/radeon/rv770.h                | 39 +++++++++++
 drivers/gpu/drm/radeon/rv770_dpm.c            |  2 +
 drivers/gpu/drm/radeon/si.c                   | 11 +--
 drivers/gpu/drm/radeon/si.h                   | 38 ++++++++++
 drivers/gpu/drm/radeon/si_dma.c               |  3 +-
 drivers/gpu/drm/radeon/si_dpm.c               | 13 ++--
 drivers/gpu/drm/radeon/si_dpm.h               |  5 ++
 drivers/gpu/drm/radeon/trinity_dpm.c          |  2 +-
 drivers/gpu/drm/radeon/vce.h                  | 35 ++++++++++
 drivers/gpu/drm/radeon/vce_v1_0.c             |  1 +
 drivers/gpu/drm/radeon/vce_v2_0.c             |  1 +
 65 files changed, 794 insertions(+), 213 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/cik.h
 create mode 100644 drivers/gpu/drm/radeon/dce6_afmt.h
 create mode 100644 drivers/gpu/drm/radeon/evergreen.h
 create mode 100644 drivers/gpu/drm/radeon/evergreen_hdmi.h
 create mode 100644 drivers/gpu/drm/radeon/ni.h
 create mode 100644 drivers/gpu/drm/radeon/r600.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_atombios.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_device.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_kms.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_legacy_encoders.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_pm.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_prime.h
 create mode 100644 drivers/gpu/drm/radeon/radeon_ttm.h
 create mode 100644 drivers/gpu/drm/radeon/rv770.h
 create mode 100644 drivers/gpu/drm/radeon/si.h
 create mode 100644 drivers/gpu/drm/radeon/vce.h

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Evan Quan <evan.quan@amd.com>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: Slava Grigorev <slava.grigorev@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 75+ messages in thread

* [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
                   ` (41 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/atombios_encoders.c |  5 +--
 drivers/gpu/drm/radeon/radeon_atombios.c   |  1 +
 drivers/gpu/drm/radeon/radeon_atombios.h   | 37 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 4 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_atombios.h

diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index cc5ee1b3af84f..683de198e18d9 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -33,6 +33,7 @@
 #include <drm/radeon_drm.h>
 
 #include "atom.h"
+#include "radeon_atombios.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -296,10 +297,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder)
 
 #endif
 
-/* evil but including atombios.h is much worse */
-bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
-				struct drm_display_mode *mode);
-
 static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
 				   const struct drm_display_mode *mode,
 				   struct drm_display_mode *adjusted_mode)
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 5d25917251892..71bf2ed172697 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -34,6 +34,7 @@
 #include "atom.h"
 #include "atom-bits.h"
 #include "radeon_asic.h"
+#include "radeon_atombios.h"
 
 extern void
 radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
new file mode 100644
index 0000000000000..b7c76920feb7d
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_atombios.h
@@ -0,0 +1,37 @@
+/* radeon_atombios.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 2007-8 Advanced Micro Devices, Inc.
+ * Copyright 2008 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Dave Airlie
+ *          Alex Deucher
+ */
+
+#ifndef __RADEON_ATOMBIOS_H__
+#define __RADEON_ATOMBIOS_H__
+
+struct drm_display_mode;
+struct radeon_device;
+
+bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
+				struct drm_display_mode *mode);
+
+#endif                         /* __RADEON_ATOMBIOS_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
  2020-11-16 17:36 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
                   ` (40 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

Unfortunately, a suitable one didn't already exist.

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

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_device.c |  1 +
 drivers/gpu/drm/radeon/radeon_device.h | 32 ++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/radeon_drv.c    |  3 +--
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_device.h

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


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
  2020-11-16 17:36 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
  2020-11-16 17:36 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
                   ` (39 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_display.c |  1 +
 drivers/gpu/drm/radeon/radeon_kms.c     |  1 +
 drivers/gpu/drm/radeon/radeon_kms.h     | 35 +++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 drivers/gpu/drm/radeon/radeon_kms.h

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index eb0d4cb95f0a6..3a6fedad002d7 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -44,6 +44,7 @@
 
 #include "atom.h"
 #include "radeon.h"
+#include "radeon_kms.h"
 
 static void avivo_crtc_load_lut(struct drm_crtc *crtc)
 {
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 3d31c04e4b3db..001940bca90a6 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -41,6 +41,7 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_drv.h"
+#include "radeon_kms.h"
 
 #if defined(CONFIG_VGA_SWITCHEROO)
 bool radeon_has_atpx(void);
diff --git a/drivers/gpu/drm/radeon/radeon_kms.h b/drivers/gpu/drm/radeon/radeon_kms.h
new file mode 100644
index 0000000000000..36e73cea92154
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_kms.h
@@ -0,0 +1,35 @@
+/* radeon_kms.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_KMS_H__
+#define __RADEON_KMS_H__
+
+u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
+int radeon_enable_vblank_kms(struct drm_crtc *crtc);
+void radeon_disable_vblank_kms(struct drm_crtc *crtc);
+
+#endif				/* __RADEON_KMS_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (2 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
                   ` (38 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 001940bca90a6..50cee4880bb46 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -214,7 +214,7 @@ static void radeon_set_filp_rights(struct drm_device *dev,
 /**
  * radeon_info_ioctl - answer a device specific request.
  *
- * @rdev: radeon device pointer
+ * @dev: drm device pointer
  * @data: request object
  * @filp: drm filp
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (3 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
                   ` (37 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/radeon_ttm.c: At top level:
 drivers/gpu/drm/radeon/radeon_ttm.c:817:5: warning: no previous prototype for ‘radeon_ttm_init’ [-Wmissing-prototypes]
 817 | int radeon_ttm_init(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_ttm.c:878:6: warning: no previous prototype for ‘radeon_ttm_fini’ [-Wmissing-prototypes]
 878 | void radeon_ttm_fini(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_object.c |  3 +--
 drivers/gpu/drm/radeon/radeon_ttm.c    |  1 +
 drivers/gpu/drm/radeon/radeon_ttm.h    | 36 ++++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_ttm.h

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


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (4 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
                   ` (36 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

  drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1745:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
 1745 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_encoders.c      |  4 +--
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  1 +
 .../gpu/drm/radeon/radeon_legacy_encoders.h   | 34 +++++++++++++++++++
 3 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_legacy_encoders.h

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


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (5 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
                   ` (35 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1746:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes]
 1746 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_atombios.c        | 6 +-----
 drivers/gpu/drm/radeon/radeon_combios.c         | 6 +-----
 drivers/gpu/drm/radeon/radeon_legacy_encoders.h | 2 ++
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 71bf2ed172697..cc80651b25773 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -35,16 +35,12 @@
 #include "atom-bits.h"
 #include "radeon_asic.h"
 #include "radeon_atombios.h"
+#include "radeon_legacy_encoders.h"
 
 extern void
 radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
 			uint32_t supported_device, u16 caps);
 
-/* from radeon_legacy_encoder.c */
-extern void
-radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
-			  uint32_t supported_device);
-
 union atom_supported_devices {
 	struct _ATOM_SUPPORTED_DEVICES_INFO info;
 	struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index d3c04df7e75d7..ff2135059c071 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -31,6 +31,7 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
+#include "radeon_legacy_encoders.h"
 #include "atom.h"
 
 #ifdef CONFIG_PPC_PMAC
@@ -40,11 +41,6 @@
 #include <asm/prom.h>
 #endif /* CONFIG_PPC_PMAC */
 
-/* from radeon_legacy_encoder.c */
-extern void
-radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
-			  uint32_t supported_device);
-
 /* old legacy ATI BIOS routines */
 
 /* COMBIOS table offsets */
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
index a80b387559d4d..f4c7432267e67 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.h
@@ -30,5 +30,7 @@
 
 void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
 				  struct drm_connector *drm_connector);
+void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
+			       uint32_t supported_device);
 
 #endif				/* __RADEON_LEGACY_ENCODERS_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (6 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
                   ` (34 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'irq' not described in 'radeon_driver_irq_handler_kms'
 drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'arg' not described in 'radeon_driver_irq_handler_kms'
 drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Function parameter or member 'n' not described in 'radeon_irq_kms_set_irq_n_enabled'
 drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Excess function parameter 'num' description in 'radeon_irq_kms_set_irq_n_enabled'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index b86bc88ad4308..a242b6053d47e 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -43,11 +43,9 @@
 
 #define RADEON_WAIT_IDLE_TIMEOUT 200
 
-/**
+/*
  * radeon_driver_irq_handler_kms - irq handler for KMS
  *
- * @int irq, void *arg: args
- *
  * This is the irq handler for the radeon KMS driver (all asics).
  * radeon_irq_process is a macro that points to the per-asic
  * irq handler callback.
@@ -549,14 +547,14 @@ void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask)
 }
 
 /**
- * radeon_irq_kms_update_int_n - helper for updating interrupt enable registers
+ * radeon_irq_kms_set_irq_n_enabled - helper for updating interrupt enable registers
  *
  * @rdev: radeon device pointer
  * @reg: the register to write to enable/disable interrupts
  * @mask: the mask that enables the interrupts
  * @enable: whether to enable or disable the interrupt register
  * @name: the name of the interrupt register to print to the kernel log
- * @num: the number of the interrupt register to print to the kernel log
+ * @n: the number of the interrupt register to print to the kernel log
  *
  * Helper for updating the enable state of interrupt registers. Checks whether
  * or not the interrupt matches the enable state we want. If it doesn't, then
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (7 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
                   ` (33 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes]
 1138 | void rv770_set_clk_bypass_mode(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.c |  2 +-
 drivers/gpu/drm/radeon/r600.c      |  2 +-
 drivers/gpu/drm/radeon/rv770.c     |  1 +
 drivers/gpu/drm/radeon/rv770.h     | 35 ++++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/rv770.h

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 1f2acca437abd..9a1e240b07234 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -31,6 +31,7 @@
 
 #include "atom.h"
 #include "avivod.h"
+#include "rv770.h"
 #include "evergreen_blit_shaders.h"
 #include "evergreen_reg.h"
 #include "evergreend.h"
@@ -223,7 +224,6 @@ extern u32 si_get_csb_size(struct radeon_device *rdev);
 extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 extern u32 cik_get_csb_size(struct radeon_device *rdev);
 extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
 
 static const u32 evergreen_golden_registers[] =
 {
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 12a918335ac7b..f09b6dc5cbeb3 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -40,6 +40,7 @@
 #include "atom.h"
 #include "avivod.h"
 #include "r600d.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -112,7 +113,6 @@ void r600_fini(struct radeon_device *rdev);
 void r600_irq_disable(struct radeon_device *rdev);
 static void r600_pcie_gen2_enable(struct radeon_device *rdev);
 extern int evergreen_rlc_resume(struct radeon_device *rdev);
-extern void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
 
 /*
  * Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 21f653ae1e1bb..88e29ebaad467 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -39,6 +39,7 @@
 #include "radeon_asic.h"
 #include "radeon_audio.h"
 #include "rv770d.h"
+#include "rv770.h"
 
 #define R700_PFP_UCODE_SIZE 848
 #define R700_PM4_UCODE_SIZE 1360
diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
new file mode 100644
index 0000000000000..a3f2bb44979fe
--- /dev/null
+++ b/drivers/gpu/drm/radeon/rv770.h
@@ -0,0 +1,35 @@
+/* radeon_rv770.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_RV770_H__
+#define __RADEON_RV770_H__
+
+struct radeon_device;
+
+void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
+
+#endif				/* __RADEON_RV770_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (8 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
                   ` (32 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/radeon_pm.c:74:6: warning: no previous prototype for ‘radeon_pm_acpi_event_handler’ [-Wmissing-prototypes]
 74 | void radeon_pm_acpi_event_handler(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_acpi.c |  3 +--
 drivers/gpu/drm/radeon/radeon_pm.c   |  1 +
 drivers/gpu/drm/radeon/radeon_pm.h   | 33 ++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_pm.h

diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index 6cf1645e7a1a8..1baef7b493def 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -36,6 +36,7 @@
 #include "atom.h"
 #include "radeon.h"
 #include "radeon_acpi.h"
+#include "radeon_pm.h"
 
 #if defined(CONFIG_VGA_SWITCHEROO)
 bool radeon_atpx_dgpu_req_power_for_displays(void);
@@ -45,8 +46,6 @@ static inline bool radeon_atpx_dgpu_req_power_for_displays(void) { return false;
 
 #define ACPI_AC_CLASS           "ac_adapter"
 
-extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
-
 struct atif_verify_interface {
 	u16 size;		/* structure size in bytes (includes size field) */
 	u16 version;		/* version */
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 65d172b13e065..1995dad59dd09 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -33,6 +33,7 @@
 #include "avivod.h"
 #include "r600_dpm.h"
 #include "radeon.h"
+#include "radeon_pm.h"
 
 #define RADEON_IDLE_LOOP_MS 100
 #define RADEON_RECLOCK_DELAY_MS 200
diff --git a/drivers/gpu/drm/radeon/radeon_pm.h b/drivers/gpu/drm/radeon/radeon_pm.h
new file mode 100644
index 0000000000000..5ef147785e815
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_pm.h
@@ -0,0 +1,33 @@
+/* radeon_pm.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_PM_H__
+#define __RADEON_PM_H__
+
+void radeon_pm_acpi_event_handler(struct radeon_device *rdev);
+
+#endif				/* __RADEON_PM_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (9 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
                   ` (31 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Slava Grigorev, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/dce3_1_afmt.c:30:6: warning: no previous prototype for ‘dce3_2_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
 30 | void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:48:6: warning: no previous prototype for ‘dce3_2_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
 48 | void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:66:6: warning: no previous prototype for ‘dce3_2_afmt_write_sad_regs’ [-Wmissing-prototypes]
 66 | void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:116:6: warning: no previous prototype for ‘dce3_2_audio_set_dto’ [-Wmissing-prototypes]
 116 | void dce3_2_audio_set_dto(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:170:6: warning: no previous prototype for ‘dce3_2_hdmi_update_acr’ [-Wmissing-prototypes]
 170 | void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
 | ^~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:202:6: warning: no previous prototype for ‘dce3_2_set_audio_packet’ [-Wmissing-prototypes]
 202 | void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset)
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce3_1_afmt.c:223:6: warning: no previous prototype for ‘dce3_2_set_mute’ [-Wmissing-prototypes]
 223 | void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute)
 | ^~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Slava Grigorev <slava.grigorev@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_audio.c | 12 ------------
 drivers/gpu/drm/radeon/radeon_audio.h | 12 ++++++++++++
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 8c63ccb8b6235..f6c783e19c988 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -38,16 +38,10 @@ void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
 void dce6_endpoint_wreg(struct radeon_device *rdev,
 		u32 offset, u32 reg, u32 v);
-void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
-		struct cea_sad *sads, int sad_count);
 void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
 		struct cea_sad *sads, int sad_count);
 void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
 		struct cea_sad *sads, int sad_count);
-void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
-void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
 void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
 		u8 *sadb, int sad_count);
 void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
@@ -65,8 +59,6 @@ struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
 void dce6_afmt_select_pin(struct drm_encoder *encoder);
 void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
-void dce3_2_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
 void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
 void dce4_dp_audio_set_dto(struct radeon_device *rdev,
@@ -81,8 +73,6 @@ void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
 	unsigned char *buffer, size_t size);
 void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
 	const struct radeon_hdmi_acr *acr);
-void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
-	const struct radeon_hdmi_acr *acr);
 void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
 	const struct radeon_hdmi_acr *acr);
 void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
@@ -90,10 +80,8 @@ void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
 void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
 	u32 offset, int bpc);
 void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
-void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
 void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
 void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
-void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
 void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
 	struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/radeon/radeon_audio.h b/drivers/gpu/drm/radeon/radeon_audio.h
index 5c70cceaa4a6c..05e67867469b0 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.h
+++ b/drivers/gpu/drm/radeon/radeon_audio.h
@@ -81,4 +81,16 @@ void radeon_audio_mode_set(struct drm_encoder *encoder,
 void radeon_audio_dpms(struct drm_encoder *encoder, int mode);
 unsigned int radeon_audio_decode_dfs_div(unsigned int div);
 
+void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder,
+				struct cea_sad *sads, int sad_count);
+void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
+					       u8 *sadb, int sad_count);
+void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
+					     u8 *sadb, int sad_count);
+void dce3_2_audio_set_dto(struct radeon_device *rdev,
+			  struct radeon_crtc *crtc, unsigned int clock);
+void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset,
+			    const struct radeon_hdmi_acr *acr);
+void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset);
+void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (10 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 17:36 ` [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Lee Jones
                   ` (30 subsequent siblings)
  42 siblings, 0 replies; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/evergreen.c:1281:6: warning: no previous prototype for ‘evergreen_fix_pci_max_read_req_size’ [-Wmissing-prototypes]
 1281 | void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:2664:6: warning: no previous prototype for ‘evergreen_mc_stop’ [-Wmissing-prototypes]
 2664 | void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save)
 | ^~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:2762:6: warning: no previous prototype for ‘evergreen_mc_resume’ [-Wmissing-prototypes]
 2762 | void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
 | ^~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:2850:6: warning: no previous prototype for ‘evergreen_mc_program’ [-Wmissing-prototypes]
 2850 | void evergreen_mc_program(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:3710:5: warning: no previous prototype for ‘evergreen_mc_init’ [-Wmissing-prototypes]
 3710 | int evergreen_mc_init(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:3769:6: warning: no previous prototype for ‘evergreen_print_gpu_status_regs’ [-Wmissing-prototypes]
 3769 | void evergreen_print_gpu_status_regs(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:3797:6: warning: no previous prototype for ‘evergreen_is_display_hung’ [-Wmissing-prototypes]
 3797 | bool evergreen_is_display_hung(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:4009:6: warning: no previous prototype for ‘evergreen_gpu_pci_config_reset’ [-Wmissing-prototypes]
 4009 | void evergreen_gpu_pci_config_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:4110:6: warning: no previous prototype for ‘sumo_rlc_fini’ [-Wmissing-prototypes]
 4110 | void sumo_rlc_fini(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:4153:5: warning: no previous prototype for ‘sumo_rlc_init’ [-Wmissing-prototypes]
 4153 | int sumo_rlc_init(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:4381:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes]
 4381 | int evergreen_rlc_resume(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~
 drivers/gpu/drm/radeon/evergreen.c:4670:6: warning: no previous prototype for ‘evergreen_irq_suspend’ [-Wmissing-prototypes]
 4670 | void evergreen_irq_suspend(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~

NB: Lots more of these - snipped for brevity

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.c       |  6 +---
 drivers/gpu/drm/radeon/evergreen.c |  1 +
 drivers/gpu/drm/radeon/evergreen.h | 51 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/ni.c        | 16 +---------
 drivers/gpu/drm/radeon/si.c        |  7 +---
 5 files changed, 55 insertions(+), 26 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/evergreen.h

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index abf370e16bd9f..315c4f3df3656 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -30,6 +30,7 @@
 #include <drm/drm_vblank.h>
 
 #include "atom.h"
+#include "evergreen.h"
 #include "cik_blit_shaders.h"
 #include "cikd.h"
 #include "clearstate_ci.h"
@@ -126,11 +127,6 @@ MODULE_FIRMWARE("radeon/mullins_sdma.bin");
 
 extern int r600_ih_ring_alloc(struct radeon_device *rdev);
 extern void r600_ih_ring_fini(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
-extern void sumo_rlc_fini(struct radeon_device *rdev);
-extern int sumo_rlc_init(struct radeon_device *rdev);
 extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
 extern void si_rlc_reset(struct radeon_device *rdev);
 extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 9a1e240b07234..f860f5ef2df88 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -32,6 +32,7 @@
 #include "atom.h"
 #include "avivod.h"
 #include "rv770.h"
+#include "evergreen.h"
 #include "evergreen_blit_shaders.h"
 #include "evergreen_reg.h"
 #include "evergreend.h"
diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
new file mode 100644
index 0000000000000..30c9ca99ced90
--- /dev/null
+++ b/drivers/gpu/drm/radeon/evergreen.h
@@ -0,0 +1,51 @@
+/* radeon_evergreen.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_EVERGREEN_H__
+#define __RADEON_EVERGREEN_H__
+
+struct evergreen_mc_save;
+struct radeon_device;
+
+bool evergreen_is_display_hung(struct radeon_device *rdev);
+void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
+void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
+void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
+int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
+void evergreen_mc_program(struct radeon_device *rdev);
+void evergreen_irq_suspend(struct radeon_device *rdev);
+int evergreen_mc_init(struct radeon_device *rdev);
+void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
+void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
+void evergreen_program_aspm(struct radeon_device *rdev);
+void sumo_rlc_fini(struct radeon_device *rdev);
+int sumo_rlc_init(struct radeon_device *rdev);
+void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
+u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
+void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
+
+#endif				/* __RADEON_EVERGREEN_H__ */
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 564a775b4b90c..1c9030a4631b8 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -32,6 +32,7 @@
 #include "atom.h"
 #include "cayman_blit_shaders.h"
 #include "clearstate_cayman.h"
+#include "evergreen.h"
 #include "ni_reg.h"
 #include "nid.h"
 #include "radeon.h"
@@ -190,21 +191,6 @@ static const u32 tn_rlc_save_restore_register_list[] =
 	0x802c,
 };
 
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
-extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
-extern void evergreen_mc_program(struct radeon_device *rdev);
-extern void evergreen_irq_suspend(struct radeon_device *rdev);
-extern int evergreen_mc_init(struct radeon_device *rdev);
-extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
-extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
-extern void evergreen_program_aspm(struct radeon_device *rdev);
-extern void sumo_rlc_fini(struct radeon_device *rdev);
-extern int sumo_rlc_init(struct radeon_device *rdev);
-extern void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
-
 /* Firmware Names */
 MODULE_FIRMWARE("radeon/BARTS_pfp.bin");
 MODULE_FIRMWARE("radeon/BARTS_me.bin");
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index de0792842af89..45076c27d7ded 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -32,6 +32,7 @@
 
 #include "atom.h"
 #include "clearstate_si.h"
+#include "evergreen.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -129,12 +130,6 @@ extern void sumo_rlc_fini(struct radeon_device *rdev);
 extern int sumo_rlc_init(struct radeon_device *rdev);
 extern int r600_ih_ring_alloc(struct radeon_device *rdev);
 extern void r600_ih_ring_fini(struct radeon_device *rdev);
-extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
-extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
-extern u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
-extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
-extern bool evergreen_is_display_hung(struct radeon_device *rdev);
 static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
 					 bool enable);
 static void si_init_pg(struct radeon_device *rdev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (11 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 19:51   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into " Lee Jones
                   ` (29 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Gareth Hughes, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/radeon_ttm.c:931:5: warning: no previous prototype for ‘radeon_mmap’ [-Wmissing-prototypes]
 931 | int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
 | ^~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
 drivers/gpu/drm/radeon/radeon_ttm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 536b246b9a6aa..2b9deaead99b2 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -51,6 +51,7 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon_drv.h"
+#include "radeon_ttm.h"
 #include "radeon.h"
 #include "radeon_device.h"
 
@@ -125,7 +126,6 @@ extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
 				      ktime_t *stime, ktime_t *etime,
 				      const struct drm_display_mode *mode);
 extern bool radeon_is_px(struct drm_device *dev);
-int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
 int radeon_mode_dumb_mmap(struct drm_file *filp,
 			  struct drm_device *dev,
 			  uint32_t handle, uint64_t *offset_p);
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.h b/drivers/gpu/drm/radeon/radeon_ttm.h
index 91ea7141bc812..4d7b90ee27740 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.h
+++ b/drivers/gpu/drm/radeon/radeon_ttm.h
@@ -32,5 +32,6 @@ struct radeon_device;
 
 int radeon_ttm_init(struct radeon_device *rdev);
 void radeon_ttm_fini(struct radeon_device *rdev);
+int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
 
 #endif				/* __RADEON_TTM_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (12 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 19:55   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes " Lee Jones
                   ` (28 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Gareth Hughes, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/radeon_irq_kms.c:53:13: warning: no previous prototype for ‘radeon_driver_irq_handler_kms’ [-Wmissing-prototypes]
 53 | irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_irq_kms.c:120:6: warning: no previous prototype for ‘radeon_driver_irq_preinstall_kms’ [-Wmissing-prototypes]
 120 | void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_irq_kms.c:152:5: warning: no previous prototype for ‘radeon_driver_irq_postinstall_kms’ [-Wmissing-prototypes]
 152 | int radeon_driver_irq_postinstall_kms(struct drm_device *dev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_irq_kms.c:171:6: warning: no previous prototype for ‘radeon_driver_irq_uninstall_kms’ [-Wmissing-prototypes]
 171 | void radeon_driver_irq_uninstall_kms(struct drm_device *dev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_drv.c     | 5 +----
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 +
 drivers/gpu/drm/radeon/radeon_kms.h     | 5 +++++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 2b9deaead99b2..211932d73b191 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -51,6 +51,7 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon_drv.h"
+#include "radeon_kms.h"
 #include "radeon_ttm.h"
 #include "radeon.h"
 #include "radeon_device.h"
@@ -117,10 +118,6 @@
 int radeon_suspend_kms(struct drm_device *dev, bool suspend,
 		       bool fbcon, bool freeze);
 int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
-void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
-int radeon_driver_irq_postinstall_kms(struct drm_device *dev);
-void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
-irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
 extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
 				      unsigned int flags, int *vpos, int *hpos,
 				      ktime_t *stime, ktime_t *etime,
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index a242b6053d47e..b8b7f627f0a9c 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -38,6 +38,7 @@
 
 #include "atom.h"
 #include "radeon.h"
+#include "radeon_kms.h"
 #include "radeon_reg.h"
 
 
diff --git a/drivers/gpu/drm/radeon/radeon_kms.h b/drivers/gpu/drm/radeon/radeon_kms.h
index 36e73cea92154..913c8239d5d8d 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.h
+++ b/drivers/gpu/drm/radeon/radeon_kms.h
@@ -32,4 +32,9 @@ u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
 int radeon_enable_vblank_kms(struct drm_crtc *crtc);
 void radeon_disable_vblank_kms(struct drm_crtc *crtc);
 
+irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
+void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
+int radeon_driver_irq_postinstall_kms(struct drm_device *dev);
+void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
+
 #endif				/* __RADEON_KMS_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (13 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 19:56   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to " Lee Jones
                   ` (27 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/atombios_i2c.c:100:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_xfer’ [-Wmissing-prototypes]
 100 | int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/atombios_i2c.c:150:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_func’ [-Wmissing-prototypes]
 150 | u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap)
 | ^~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/atom.h       | 7 +++++++
 drivers/gpu/drm/radeon/radeon_i2c.c | 4 ----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
index 1bf06c91cd959..5de0563b63d2e 100644
--- a/drivers/gpu/drm/radeon/atom.h
+++ b/drivers/gpu/drm/radeon/atom.h
@@ -154,6 +154,13 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
 bool atom_parse_cmd_header(struct atom_context *ctx, int index,
 			   uint8_t *frev, uint8_t *crev);
 int atom_allocate_fb_scratch(struct atom_context *ctx);
+
+struct i2c_msg;
+struct i2c_adapter;
+int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
+			    struct i2c_msg *msgs, int num);
+u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap);
+
 #include "atom-types.h"
 #include "atombios.h"
 #include "ObjectID.h"
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index aa61b3cb4049c..e543d993f73ee 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -34,10 +34,6 @@
 #include "radeon.h"
 #include "atom.h"
 
-extern int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
-				   struct i2c_msg *msgs, int num);
-extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap);
-
 bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux)
 {
 	u8 out = 0x0;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (14 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 19:58   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI " Lee Jones
                   ` (26 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/radeon_prime.c:34:18: warning: no previous prototype for ‘radeon_gem_prime_get_sg_table’ [-Wmissing-prototypes]
 34 | struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:42:7: warning: no previous prototype for ‘radeon_gem_prime_vmap’ [-Wmissing-prototypes]
 42 | void *radeon_gem_prime_vmap(struct drm_gem_object *obj)
 | ^~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:55:6: warning: no previous prototype for ‘radeon_gem_prime_vunmap’ [-Wmissing-prototypes]
 55 | void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:62:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes]
 62 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:86:5: warning: no previous prototype for ‘radeon_gem_prime_pin’ [-Wmissing-prototypes]
 86 | int radeon_gem_prime_pin(struct drm_gem_object *obj)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:104:6: warning: no previous prototype for ‘radeon_gem_prime_unpin’ [-Wmissing-prototypes]
 104 | void radeon_gem_prime_unpin(struct drm_gem_object *obj)
 | ^~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_prime.c:120:17: warning: no previous prototype for ‘radeon_gem_prime_export’ [-Wmissing-prototypes]
 120 | struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
 | ^~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_gem.c   |  1 +
 drivers/gpu/drm/radeon/radeon_prime.c |  1 +
 drivers/gpu/drm/radeon/radeon_prime.h | 39 +++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 drivers/gpu/drm/radeon/radeon_prime.h

diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index d2876ce3bc9e2..b6b21d2e72624 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -35,6 +35,7 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
+#include "radeon_prime.h"
 
 struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
 					int flags);
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c
index 088d39a51c0d2..dd482edc819c5 100644
--- a/drivers/gpu/drm/radeon/radeon_prime.c
+++ b/drivers/gpu/drm/radeon/radeon_prime.c
@@ -30,6 +30,7 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
+#include "radeon_prime.h"
 
 struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj)
 {
diff --git a/drivers/gpu/drm/radeon/radeon_prime.h b/drivers/gpu/drm/radeon/radeon_prime.h
new file mode 100644
index 0000000000000..11b7f80987834
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_prime.h
@@ -0,0 +1,39 @@
+/* radeon_prime.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __RADEON_PRIME_H__
+#define __RADEON_PRIME_H__
+
+struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
+					int flags);
+struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj);
+int radeon_gem_prime_pin(struct drm_gem_object *obj);
+void radeon_gem_prime_unpin(struct drm_gem_object *obj);
+void *radeon_gem_prime_vmap(struct drm_gem_object *obj);
+void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
+
+#endif				/* __RADEON_PRIME_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (15 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:01   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s " Lee Jones
                   ` (25 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/evergreen_hdmi.c:37:6: warning: no previous prototype for ‘dce4_audio_enable’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:67:6: warning: no previous prototype for ‘evergreen_hdmi_update_acr’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:97:6: warning: no previous prototype for ‘dce4_afmt_write_latency_fields’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:119:6: warning: no previous prototype for ‘dce4_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:137:6: warning: no previous prototype for ‘dce4_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:155:6: warning: no previous prototype for ‘evergreen_hdmi_write_sad_regs’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:208:6: warning: no previous prototype for ‘evergreen_set_avi_packet’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:227:6: warning: no previous prototype for ‘dce4_hdmi_audio_set_dto’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:270:6: warning: no previous prototype for ‘dce4_dp_audio_set_dto’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:306:6: warning: no previous prototype for ‘dce4_set_vbi_packet’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:317:6: warning: no previous prototype for ‘dce4_hdmi_set_color_depth’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:354:6: warning: no previous prototype for ‘dce4_set_audio_packet’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:389:6: warning: no previous prototype for ‘dce4_set_mute’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:400:6: warning: no previous prototype for ‘evergreen_hdmi_enable’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/evergreen_hdmi.c:440:6: warning: no previous prototype for ‘evergreen_dp_enable’ [-Wmissing-prototypes]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen_hdmi.c |  1 +
 drivers/gpu/drm/radeon/evergreen_hdmi.h | 69 +++++++++++++++++++++++++
 drivers/gpu/drm/radeon/radeon_audio.c   | 26 +---------
 3 files changed, 71 insertions(+), 25 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/evergreen_hdmi.h

diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
index 739336a48d085..5f3078f8ab950 100644
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -27,6 +27,7 @@
 #include <linux/hdmi.h>
 
 #include <drm/radeon_drm.h>
+#include "evergreen_hdmi.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.h b/drivers/gpu/drm/radeon/evergreen_hdmi.h
new file mode 100644
index 0000000000000..c86276b8d7f58
--- /dev/null
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.h
@@ -0,0 +1,69 @@
+/* evergreen_hdmi.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __EVERGREEN_HDMI_H__
+#define __EVERGREEN_HDMI_H__
+
+struct cea_sa;
+struct cea_sad;
+struct drm_connector;
+struct drm_display_mode;
+struct drm_encoder;
+struct r600_audio_pin;
+struct radeon_crtc;
+struct radeon_device;
+struct radeon_hdmi_acr;
+
+void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
+				   struct cea_sad *sads, int sad_count);
+void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
+			      unsigned char *buffer, size_t size);
+void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
+			       const struct radeon_hdmi_acr *acr);
+void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
+void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
+
+void dce4_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
+		       u8 enable_mask);
+void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
+					     u8 *sadb, int sad_count);
+void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
+					   u8 *sadb, int sad_count);
+void dce4_afmt_write_latency_fields(struct drm_encoder *encoder,
+				    struct drm_connector *connector,
+				    struct drm_display_mode *mode);
+void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
+			     struct radeon_crtc *crtc, unsigned int clock);
+void dce4_dp_audio_set_dto(struct radeon_device *rdev,
+			   struct radeon_crtc *crtc, unsigned int clock);
+void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
+void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
+			       u32 offset, int bpc);
+void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
+void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
+
+#endif				/* __EVERGREEN_HDMI_H__ */
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index f6c783e19c988..3cc53db04d645 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -25,33 +25,24 @@
 #include <linux/gcd.h>
 
 #include <drm/drm_crtc.h>
+#include "evergreen_hdmi.h"
 #include "radeon.h"
 #include "atom.h"
 #include "radeon_audio.h"
 
 void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 		u8 enable_mask);
-void dce4_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
-		u8 enable_mask);
 void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 		u8 enable_mask);
 u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
 void dce6_endpoint_wreg(struct radeon_device *rdev,
 		u32 offset, u32 reg, u32 v);
-void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
-		struct cea_sad *sads, int sad_count);
 void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
 		struct cea_sad *sads, int sad_count);
-void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
-void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
 void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
 		u8 *sadb, int sad_count);
 void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
 		u8 *sadb, int sad_count);
-void dce4_afmt_write_latency_fields(struct drm_encoder *encoder,
-		struct drm_connector *connector, struct drm_display_mode *mode);
 void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
 		struct drm_connector *connector, struct drm_display_mode *mode);
 struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
@@ -59,37 +50,22 @@ struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
 void dce6_afmt_select_pin(struct drm_encoder *encoder);
 void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
-void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
-void dce4_dp_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
 void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
 void dce6_dp_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
 void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
 	unsigned char *buffer, size_t size);
-void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
-	unsigned char *buffer, size_t size);
 void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
 	const struct radeon_hdmi_acr *acr);
-void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
-	const struct radeon_hdmi_acr *acr);
 void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
-void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
-void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
-	u32 offset, int bpc);
 void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
-void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
 void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
-void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
 	struct drm_display_mode *mode);
 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
 	struct drm_display_mode *mode);
 void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
-void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
-void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
 
 static const u32 pin_offsets[7] =
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (16 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:05   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into " Lee Jones
                   ` (24 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/rv770_dpm.c:47:18: warning: no previous prototype for ‘rv770_get_ps’ [-Wmissing-prototypes]
 47 | struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps)
 | ^~~~~~~~~~~~
 drivers/gpu/drm/radeon/rv770_dpm.c:54:26: warning: no previous prototype for ‘rv770_get_pi’ [-Wmissing-prototypes]
 54 | struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev)
 | ^~~~~~~~~~~~

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/btc_dpm.c     | 3 +--
 drivers/gpu/drm/radeon/cypress_dpm.c | 3 +--
 drivers/gpu/drm/radeon/ni_dpm.c      | 2 +-
 drivers/gpu/drm/radeon/rv730_dpm.c   | 4 +---
 drivers/gpu/drm/radeon/rv740_dpm.c   | 3 +--
 drivers/gpu/drm/radeon/rv770.h       | 4 ++++
 drivers/gpu/drm/radeon/rv770_dpm.c   | 1 +
 drivers/gpu/drm/radeon/si_dpm.c      | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index d1d8aaf8323c2..018949668536e 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -30,6 +30,7 @@
 #include "btcd.h"
 #include "cypress_dpm.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 
@@ -48,8 +49,6 @@
 #ifndef BTC_MGCG_SEQUENCE
 #define BTC_MGCG_SEQUENCE  300
 
-struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 
 extern int ni_mc_load_microcode(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 35b177d777913..6d3690bcca2d2 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -28,6 +28,7 @@
 #include "cypress_dpm.h"
 #include "evergreend.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 
@@ -43,8 +44,6 @@
 #define MC_CG_SEQ_YCLK_SUSPEND      0x04
 #define MC_CG_SEQ_YCLK_RESUME       0x0a
 
-struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 
 static void cypress_enable_bif_dynamic_pcie_gen2(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index 59cdadcece159..d39bbd9793cc2 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -29,6 +29,7 @@
 #include "ni_dpm.h"
 #include "nid.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 
@@ -719,7 +720,6 @@ static const u32 cayman_sysls_enable[] =
 };
 #define CAYMAN_SYSLS_ENABLE_LENGTH sizeof(cayman_sysls_enable) / (3 * sizeof(u32))
 
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 
 extern int ni_mc_load_microcode(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/rv730_dpm.c b/drivers/gpu/drm/radeon/rv730_dpm.c
index 84a3d6d724866..a9de5c953396a 100644
--- a/drivers/gpu/drm/radeon/rv730_dpm.c
+++ b/drivers/gpu/drm/radeon/rv730_dpm.c
@@ -25,6 +25,7 @@
 #include "radeon.h"
 #include "rv730d.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "rv770_dpm.h"
 #include "atom.h"
 
@@ -33,9 +34,6 @@
 #define MC_CG_ARB_FREQ_F2           0x0c
 #define MC_CG_ARB_FREQ_F3           0x0d
 
-struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
-
 int rv730_populate_sclk_value(struct radeon_device *rdev,
 			      u32 engine_clock,
 			      RV770_SMC_SCLK_VALUE *sclk)
diff --git a/drivers/gpu/drm/radeon/rv740_dpm.c b/drivers/gpu/drm/radeon/rv740_dpm.c
index 327d65a76e1f4..d57a3e1df8d63 100644
--- a/drivers/gpu/drm/radeon/rv740_dpm.c
+++ b/drivers/gpu/drm/radeon/rv740_dpm.c
@@ -25,11 +25,10 @@
 #include "radeon.h"
 #include "rv740d.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "rv770_dpm.h"
 #include "atom.h"
 
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
-
 u32 rv740_get_decoded_reference_divider(u32 encoded_ref)
 {
 	u32 ref = 0;
diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
index a3f2bb44979fe..0e15916d0a948 100644
--- a/drivers/gpu/drm/radeon/rv770.h
+++ b/drivers/gpu/drm/radeon/rv770.h
@@ -29,7 +29,11 @@
 #define __RADEON_RV770_H__
 
 struct radeon_device;
+struct radeon_ps;
 
 void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
 
+struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
+struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
+
 #endif				/* __RADEON_RV770_H__ */
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index 4a0cf597c11c6..badd8ac6e038f 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -24,6 +24,7 @@
 
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "rv770.h"
 #include "rv770d.h"
 #include "r600_dpm.h"
 #include "rv770_dpm.h"
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index d1c73e9db889a..a80a21447a76d 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -27,6 +27,7 @@
 
 #include "atom.h"
 #include "r600_dpm.h"
+#include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "si_dpm.h"
@@ -1717,7 +1718,6 @@ static const struct si_powertune_data powertune_data_hainan =
 	true
 };
 
-struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
 struct ni_ps *ni_get_ps(struct radeon_ps *rps);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (17 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:09   ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi, ps}()'s " Alex Deucher
  2020-11-16 17:36 ` [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to " Lee Jones
                   ` (23 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/ni_dpm.c:727:23: warning: no previous prototype for ‘ni_get_pi’ [-Wmissing-prototypes]
 727 | struct ni_power_info *ni_get_pi(struct radeon_device *rdev)
 | ^~~~~~~~~
 drivers/gpu/drm/radeon/ni_dpm.c:734:15: warning: no previous prototype for ‘ni_get_ps’ [-Wmissing-prototypes]
 734 | struct ni_ps *ni_get_ps(struct radeon_ps *rps)
 | ^~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/ni_dpm.h | 3 +++
 drivers/gpu/drm/radeon/si_dpm.c | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni_dpm.h b/drivers/gpu/drm/radeon/ni_dpm.h
index 6bbee9180909e..74e3019369063 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.h
+++ b/drivers/gpu/drm/radeon/ni_dpm.h
@@ -247,4 +247,7 @@ void ni_set_uvd_clock_after_set_eng_clock(struct radeon_device *rdev,
 
 bool ni_dpm_vblank_too_short(struct radeon_device *rdev);
 
+struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
+struct ni_ps *ni_get_ps(struct radeon_ps *rps);
+
 #endif
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index a80a21447a76d..c68ab2fb1ac23 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -30,6 +30,7 @@
 #include "rv770.h"
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "ni_dpm.h"
 #include "si_dpm.h"
 #include "sid.h"
 
@@ -1719,8 +1720,6 @@ static const struct si_powertune_data powertune_data_hainan =
 };
 
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
-struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
-struct ni_ps *ni_get_ps(struct radeon_ps *rps);
 
 extern int si_mc_load_microcode(struct radeon_device *rdev);
 extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (18 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:11   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Lee Jones
                   ` (22 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/ni.c:1378:6: warning: no previous prototype for ‘cayman_cp_int_cntl_setup’ [-Wmissing-prototypes]
 1378 | void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/ni.c:1732:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes]
 1732 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.c |  5 +---
 drivers/gpu/drm/radeon/ni.c        |  1 +
 drivers/gpu/drm/radeon/ni.h        | 38 ++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 4 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/ni.h

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index f860f5ef2df88..8fb0b8c3db5b5 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -31,6 +31,7 @@
 
 #include "atom.h"
 #include "avivod.h"
+#include "ni.h"
 #include "rv770.h"
 #include "evergreen.h"
 #include "evergreen_blit_shaders.h"
@@ -215,10 +216,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev);
 void evergreen_fini(struct radeon_device *rdev);
 void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
 void evergreen_program_aspm(struct radeon_device *rdev);
-extern void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
-				     int ring, u32 cp_int_cntl);
-extern void cayman_vm_decode_fault(struct radeon_device *rdev,
-				   u32 status, u32 addr);
 void cik_init_cp_pg_table(struct radeon_device *rdev);
 
 extern u32 si_get_csb_size(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 1c9030a4631b8..ab7bd30802176 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -33,6 +33,7 @@
 #include "cayman_blit_shaders.h"
 #include "clearstate_cayman.h"
 #include "evergreen.h"
+#include "ni.h"
 #include "ni_reg.h"
 #include "nid.h"
 #include "radeon.h"
diff --git a/drivers/gpu/drm/radeon/ni.h b/drivers/gpu/drm/radeon/ni.h
new file mode 100644
index 0000000000000..d63be1c88c0f1
--- /dev/null
+++ b/drivers/gpu/drm/radeon/ni.h
@@ -0,0 +1,38 @@
+/* ni.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __NI_H__
+#define __NI_H__
+
+struct radeon_device;
+
+void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
+			      int ring, u32 cp_int_cntl);
+void cayman_vm_decode_fault(struct radeon_device *rdev,
+			    u32 status, u32 addr);
+
+#endif				/* __NI_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (19 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:13   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header Lee Jones
                   ` (21 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/r600.c:1615:5: warning: no previous prototype for ‘r600_gpu_check_soft_reset’ [-Wmissing-prototypes]
 1615 | u32 r600_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/r600.c     |  1 +
 drivers/gpu/drm/radeon/r600.h     | 35 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/r600_dma.c |  3 +--
 3 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/r600.h

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index f09b6dc5cbeb3..94e8815e5067d 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -39,6 +39,7 @@
 
 #include "atom.h"
 #include "avivod.h"
+#include "r600.h"
 #include "r600d.h"
 #include "rv770.h"
 #include "radeon.h"
diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
new file mode 100644
index 0000000000000..2a3915f0039e4
--- /dev/null
+++ b/drivers/gpu/drm/radeon/r600.h
@@ -0,0 +1,35 @@
+/* r600.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __R600_H__
+#define __R600_H__
+
+struct radeon_device;
+
+u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
+
+#endif				/* __R600_H__ */
diff --git a/drivers/gpu/drm/radeon/r600_dma.c b/drivers/gpu/drm/radeon/r600_dma.c
index af6c0da45f28a..89ca2738c5d4c 100644
--- a/drivers/gpu/drm/radeon/r600_dma.c
+++ b/drivers/gpu/drm/radeon/r600_dma.c
@@ -24,10 +24,9 @@
 
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "r600.h"
 #include "r600d.h"
 
-u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
-
 /*
  * DMA
  * Starting with R600, the GPU has an asynchronous
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (20 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:15   ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc, fini}()'s " Alex Deucher
  2020-11-16 17:36 ` [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype " Lee Jones
                   ` (20 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/r600.c:3480:5: warning: no previous prototype for ‘r600_ih_ring_alloc’ [-Wmissing-prototypes]
 3480 | int r600_ih_ring_alloc(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600.c:3516:6: warning: no previous prototype for ‘r600_ih_ring_fini’ [-Wmissing-prototypes]
 3516 | void r600_ih_ring_fini(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.c  | 3 +--
 drivers/gpu/drm/radeon/r600.h | 2 ++
 drivers/gpu/drm/radeon/si.c   | 3 +--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 315c4f3df3656..980b50d046cbc 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -34,6 +34,7 @@
 #include "cik_blit_shaders.h"
 #include "cikd.h"
 #include "clearstate_ci.h"
+#include "r600.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -125,8 +126,6 @@ MODULE_FIRMWARE("radeon/mullins_mec.bin");
 MODULE_FIRMWARE("radeon/mullins_rlc.bin");
 MODULE_FIRMWARE("radeon/mullins_sdma.bin");
 
-extern int r600_ih_ring_alloc(struct radeon_device *rdev);
-extern void r600_ih_ring_fini(struct radeon_device *rdev);
 extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
 extern void si_rlc_reset(struct radeon_device *rdev);
 extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
index 2a3915f0039e4..e66ef58706cd8 100644
--- a/drivers/gpu/drm/radeon/r600.h
+++ b/drivers/gpu/drm/radeon/r600.h
@@ -31,5 +31,7 @@
 struct radeon_device;
 
 u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
+int r600_ih_ring_alloc(struct radeon_device *rdev);
+void r600_ih_ring_fini(struct radeon_device *rdev);
 
 #endif				/* __R600_H__ */
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 45076c27d7ded..d0407145c07b5 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -33,6 +33,7 @@
 #include "atom.h"
 #include "clearstate_si.h"
 #include "evergreen.h"
+#include "r600.h"
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
@@ -128,8 +129,6 @@ static void si_pcie_gen3_enable(struct radeon_device *rdev);
 static void si_program_aspm(struct radeon_device *rdev);
 extern void sumo_rlc_fini(struct radeon_device *rdev);
 extern int sumo_rlc_init(struct radeon_device *rdev);
-extern int r600_ih_ring_alloc(struct radeon_device *rdev);
-extern void r600_ih_ring_fini(struct radeon_device *rdev);
 static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
 					 bool enable);
 static void si_init_pg(struct radeon_device *rdev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (21 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:16   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s " Lee Jones
                   ` (19 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/evergreen.c:3825:5: warning: no previous prototype for ‘evergreen_gpu_check_soft_reset’ [-Wmissing-prototypes]
 3825 | u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.h     | 1 +
 drivers/gpu/drm/radeon/evergreen_dma.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
index 30c9ca99ced90..eb46ac7776951 100644
--- a/drivers/gpu/drm/radeon/evergreen.h
+++ b/drivers/gpu/drm/radeon/evergreen.h
@@ -47,5 +47,6 @@ int sumo_rlc_init(struct radeon_device *rdev);
 void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
 u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
 void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
+u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
 
 #endif				/* __RADEON_EVERGREEN_H__ */
diff --git a/drivers/gpu/drm/radeon/evergreen_dma.c b/drivers/gpu/drm/radeon/evergreen_dma.c
index 767857d4a8c5c..52c79da1ecf57 100644
--- a/drivers/gpu/drm/radeon/evergreen_dma.c
+++ b/drivers/gpu/drm/radeon/evergreen_dma.c
@@ -24,10 +24,9 @@
 
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "evergreen.h"
 #include "evergreend.h"
 
-u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
-
 /**
  * evergreen_dma_fence_ring_emit - emit a fence on the DMA ring
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (22 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:17   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s " Lee Jones
                   ` (18 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/evergreen.c:4380:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes]
 4380 | int evergreen_rlc_resume(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.h | 1 +
 drivers/gpu/drm/radeon/r600.c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
index eb46ac7776951..f8d772e612a48 100644
--- a/drivers/gpu/drm/radeon/evergreen.h
+++ b/drivers/gpu/drm/radeon/evergreen.h
@@ -48,5 +48,6 @@ void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
 u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
 void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
 u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
+int evergreen_rlc_resume(struct radeon_device *rdev);
 
 #endif				/* __RADEON_EVERGREEN_H__ */
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 94e8815e5067d..b44e0c607b1b1 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -39,6 +39,7 @@
 
 #include "atom.h"
 #include "avivod.h"
+#include "evergreen.h"
 #include "r600.h"
 #include "r600d.h"
 #include "rv770.h"
@@ -113,7 +114,6 @@ static void r600_gpu_init(struct radeon_device *rdev);
 void r600_fini(struct radeon_device *rdev);
 void r600_irq_disable(struct radeon_device *rdev);
 static void r600_pcie_gen2_enable(struct radeon_device *rdev);
-extern int evergreen_rlc_resume(struct radeon_device *rdev);
 
 /*
  * Indirect registers accessor
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (23 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:18   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s " Lee Jones
                   ` (17 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/ni.c:1733:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes]
 1733 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/ni.h     | 1 +
 drivers/gpu/drm/radeon/ni_dma.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni.h b/drivers/gpu/drm/radeon/ni.h
index d63be1c88c0f1..9a5f31a05e68f 100644
--- a/drivers/gpu/drm/radeon/ni.h
+++ b/drivers/gpu/drm/radeon/ni.h
@@ -34,5 +34,6 @@ void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
 			      int ring, u32 cp_int_cntl);
 void cayman_vm_decode_fault(struct radeon_device *rdev,
 			    u32 status, u32 addr);
+u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev);
 
 #endif				/* __NI_H__ */
diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c
index c56136848360e..bd515ad4fe4cc 100644
--- a/drivers/gpu/drm/radeon/ni_dma.c
+++ b/drivers/gpu/drm/radeon/ni_dma.c
@@ -25,10 +25,9 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_trace.h"
+#include "ni.h"
 #include "nid.h"
 
-u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev);
-
 /*
  * DMA
  * Starting with R600, the GPU has an asynchronous
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (24 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:19   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's " Lee Jones
                   ` (16 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/atombios_encoders.c:2721:1: warning: no previous prototype for ‘radeon_add_atom_encoder’ [-Wmissing-prototypes]
 2721 | radeon_add_atom_encoder(struct drm_device *dev,
 | ^~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_atombios.c | 4 ----
 drivers/gpu/drm/radeon/radeon_atombios.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index cc80651b25773..be96d9b64e43b 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -37,10 +37,6 @@
 #include "radeon_atombios.h"
 #include "radeon_legacy_encoders.h"
 
-extern void
-radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
-			uint32_t supported_device, u16 caps);
-
 union atom_supported_devices {
 	struct _ATOM_SUPPORTED_DEVICES_INFO info;
 	struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
index b7c76920feb7d..a895a7002c3d3 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.h
+++ b/drivers/gpu/drm/radeon/radeon_atombios.h
@@ -28,10 +28,14 @@
 #ifndef __RADEON_ATOMBIOS_H__
 #define __RADEON_ATOMBIOS_H__
 
+struct drm_device;
 struct drm_display_mode;
 struct radeon_device;
 
 bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
 				struct drm_display_mode *mode);
+void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
+			     uint32_t supported_device, u16 caps);
+
 
 #endif                         /* __RADEON_ATOMBIOS_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (25 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:20   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes " Lee Jones
                   ` (15 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/atombios_encoders.c:186:6: warning: no previous prototype for ‘radeon_atom_backlight_init’ [-Wmissing-prototypes]
 186 | void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_atombios.h | 4 ++++
 drivers/gpu/drm/radeon/radeon_encoders.c | 6 +-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
index a895a7002c3d3..fd03755e6fa2c 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.h
+++ b/drivers/gpu/drm/radeon/radeon_atombios.h
@@ -28,14 +28,18 @@
 #ifndef __RADEON_ATOMBIOS_H__
 #define __RADEON_ATOMBIOS_H__
 
+struct drm_connector;
 struct drm_device;
 struct drm_display_mode;
 struct radeon_device;
+struct radeon_encoder;
 
 bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
 				struct drm_display_mode *mode);
 void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
 			     uint32_t supported_device, u16 caps);
+void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
+				struct drm_connector *drm_connector);
 
 
 #endif                         /* __RADEON_ATOMBIOS_H__ */
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index b60a373d3ead3..46549d5179ee9 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -31,14 +31,10 @@
 #include <drm/radeon_drm.h>
 
 #include "radeon.h"
+#include "radeon_atombios.h"
 #include "radeon_legacy_encoders.h"
 #include "atom.h"
 
-extern void
-radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
-			   struct drm_connector *drm_connector);
-
-
 static uint32_t radeon_encoder_clones(struct drm_encoder *encoder)
 {
 	struct drm_device *dev = encoder->dev;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (26 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:22   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype " Lee Jones
                   ` (14 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/cik.c:1868:5: warning: no previous prototype for ‘ci_mc_load_microcode’ [-Wmissing-prototypes]
 1868 | int ci_mc_load_microcode(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik.c:5847:6: warning: no previous prototype for ‘cik_enter_rlc_safe_mode’ [-Wmissing-prototypes]
 5847 | void cik_enter_rlc_safe_mode(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik.c:5868:6: warning: no previous prototype for ‘cik_exit_rlc_safe_mode’ [-Wmissing-prototypes]
 5868 | void cik_exit_rlc_safe_mode(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik.c:6286:6: warning: no previous prototype for ‘cik_update_cg’ [-Wmissing-prototypes]
 6286 | void cik_update_cg(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/ci_dpm.c |  7 +------
 drivers/gpu/drm/radeon/cik.c    |  1 +
 drivers/gpu/drm/radeon/cik.h    | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/cik.h

diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index 8324aca5fd006..a9fc0a552736c 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -27,6 +27,7 @@
 
 #include "atom.h"
 #include "ci_dpm.h"
+#include "cik.h"
 #include "cikd.h"
 #include "r600_dpm.h"
 #include "radeon.h"
@@ -157,12 +158,6 @@ extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
 extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
 						     u32 max_voltage_steps,
 						     struct atom_voltage_table *voltage_table);
-extern void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
-extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
-extern int ci_mc_load_microcode(struct radeon_device *rdev);
-extern void cik_update_cg(struct radeon_device *rdev,
-			  u32 block, bool enable);
-
 static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev,
 					 struct atom_voltage_table_entry *voltage_table,
 					 u16 *std_voltage_hi_sidd, u16 *std_voltage_lo_sidd);
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 980b50d046cbc..ae020ad7b3185 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -32,6 +32,7 @@
 #include "atom.h"
 #include "evergreen.h"
 #include "cik_blit_shaders.h"
+#include "cik.h"
 #include "cikd.h"
 #include "clearstate_ci.h"
 #include "r600.h"
diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
new file mode 100644
index 0000000000000..297b3c1ff804f
--- /dev/null
+++ b/drivers/gpu/drm/radeon/cik.h
@@ -0,0 +1,33 @@
+/* cik.h -- Private header for radeon driver -*- linux-c -*-
+ * Copyright 2012 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __CIK_H__
+#define __CIK_H__
+
+struct radeon_device;
+
+void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
+void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
+int ci_mc_load_microcode(struct radeon_device *rdev);
+void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
+
+#endif                         /* __CIK_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (27 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:24   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s " Lee Jones
                   ` (13 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/si.c:1570:5: warning: no previous prototype for ‘si_mc_load_microcode’ [-Wmissing-prototypes]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/si.c     |  1 +
 drivers/gpu/drm/radeon/si.h     | 31 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/si_dpm.c |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/radeon/si.h

diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index d0407145c07b5..88731b79c8f57 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -39,6 +39,7 @@
 #include "radeon_audio.h"
 #include "radeon_ucode.h"
 #include "si_blit_shaders.h"
+#include "si.h"
 #include "sid.h"
 
 
diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
new file mode 100644
index 0000000000000..0a5018ef166e2
--- /dev/null
+++ b/drivers/gpu/drm/radeon/si.h
@@ -0,0 +1,31 @@
+/* si.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 2011 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __SI_H__
+#define __SI_H__
+
+struct radeon_device;
+
+int si_mc_load_microcode(struct radeon_device *rdev);
+
+#endif                         /* __SI_H__ */
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index c68ab2fb1ac23..32b697965c064 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -32,6 +32,7 @@
 #include "radeon_asic.h"
 #include "ni_dpm.h"
 #include "si_dpm.h"
+#include "si.h"
 #include "sid.h"
 
 #define MC_CG_ARB_FREQ_F0           0x0a
@@ -1721,7 +1722,6 @@ static const struct si_powertune_data powertune_data_hainan =
 
 struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 
-extern int si_mc_load_microcode(struct radeon_device *rdev);
 extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 
 static int si_populate_voltage_value(struct radeon_device *rdev,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (28 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:25   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes " Lee Jones
                   ` (12 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/si.c:3768:5: warning: no previous prototype for ‘si_gpu_check_soft_reset’ [-Wmissing-prototypes]
 3768 | u32 si_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/si.h     | 1 +
 drivers/gpu/drm/radeon/si_dma.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
index 0a5018ef166e2..a1751ae560f02 100644
--- a/drivers/gpu/drm/radeon/si.h
+++ b/drivers/gpu/drm/radeon/si.h
@@ -27,5 +27,6 @@
 struct radeon_device;
 
 int si_mc_load_microcode(struct radeon_device *rdev);
+u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
 
 #endif                         /* __SI_H__ */
diff --git a/drivers/gpu/drm/radeon/si_dma.c b/drivers/gpu/drm/radeon/si_dma.c
index d2fa302a5be9f..645897d1bfc31 100644
--- a/drivers/gpu/drm/radeon/si_dma.c
+++ b/drivers/gpu/drm/radeon/si_dma.c
@@ -25,10 +25,9 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_trace.h"
+#include "si.h"
 #include "sid.h"
 
-u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
-
 /**
  * si_dma_is_lockup - Check if the DMA engine is locked up
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (29 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:27   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype " Lee Jones
                   ` (11 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/si.c:4186:6: warning: no previous prototype for ‘si_vram_gtt_location’ [-Wmissing-prototypes]
 4186 | void si_vram_gtt_location(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/si.c:5186:6: warning: no previous prototype for ‘si_init_uvd_internal_cg’ [-Wmissing-prototypes]
 5186 | void si_init_uvd_internal_cg(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/si.c:5801:6: warning: no previous prototype for ‘si_rlc_reset’ [-Wmissing-prototypes]
 5801 | void si_rlc_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.c | 4 +---
 drivers/gpu/drm/radeon/si.h  | 4 ++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index ae020ad7b3185..cef0f3111cd3a 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -40,6 +40,7 @@
 #include "radeon_asic.h"
 #include "radeon_audio.h"
 #include "radeon_ucode.h"
+#include "si.h"
 
 #define SH_MEM_CONFIG_GFX_DEFAULT \
 	ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED)
@@ -127,9 +128,6 @@ MODULE_FIRMWARE("radeon/mullins_mec.bin");
 MODULE_FIRMWARE("radeon/mullins_rlc.bin");
 MODULE_FIRMWARE("radeon/mullins_sdma.bin");
 
-extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
-extern void si_rlc_reset(struct radeon_device *rdev);
-extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
 static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
 extern int cik_sdma_resume(struct radeon_device *rdev);
 extern void cik_sdma_enable(struct radeon_device *rdev, bool enable);
diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
index a1751ae560f02..f483a64d17050 100644
--- a/drivers/gpu/drm/radeon/si.h
+++ b/drivers/gpu/drm/radeon/si.h
@@ -25,8 +25,12 @@
 #define __SI_H__
 
 struct radeon_device;
+struct radeon_mc;
 
 int si_mc_load_microcode(struct radeon_device *rdev);
 u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
+void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
+void si_rlc_reset(struct radeon_device *rdev);
+void si_init_uvd_internal_cg(struct radeon_device *rdev);
 
 #endif                         /* __SI_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (30 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:28   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes " Lee Jones
                   ` (10 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/rv770_dpm.c:62:30: warning: no previous prototype for ‘evergreen_get_pi’ [-Wmissing-prototypes]
 62 | struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/btc_dpm.c     | 3 +--
 drivers/gpu/drm/radeon/cypress_dpm.c | 3 +--
 drivers/gpu/drm/radeon/evergreen.h   | 2 ++
 drivers/gpu/drm/radeon/ni_dpm.c      | 3 +--
 drivers/gpu/drm/radeon/rv770_dpm.c   | 1 +
 drivers/gpu/drm/radeon/si_dpm.c      | 3 +--
 6 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index 018949668536e..4e64ed38c439f 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -29,6 +29,7 @@
 #include "btc_dpm.h"
 #include "btcd.h"
 #include "cypress_dpm.h"
+#include "evergreen.h"
 #include "r600_dpm.h"
 #include "rv770.h"
 #include "radeon.h"
@@ -49,8 +50,6 @@
 #ifndef BTC_MGCG_SEQUENCE
 #define BTC_MGCG_SEQUENCE  300
 
-struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
-
 extern int ni_mc_load_microcode(struct radeon_device *rdev);
 
 //********* BARTS **************//
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 6d3690bcca2d2..fdddbbaecbb74 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -26,6 +26,7 @@
 
 #include "atom.h"
 #include "cypress_dpm.h"
+#include "evergreen.h"
 #include "evergreend.h"
 #include "r600_dpm.h"
 #include "rv770.h"
@@ -44,8 +45,6 @@
 #define MC_CG_SEQ_YCLK_SUSPEND      0x04
 #define MC_CG_SEQ_YCLK_RESUME       0x0a
 
-struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
-
 static void cypress_enable_bif_dynamic_pcie_gen2(struct radeon_device *rdev,
 						 bool enable)
 {
diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
index f8d772e612a48..a829deb8b078a 100644
--- a/drivers/gpu/drm/radeon/evergreen.h
+++ b/drivers/gpu/drm/radeon/evergreen.h
@@ -29,6 +29,7 @@
 #define __RADEON_EVERGREEN_H__
 
 struct evergreen_mc_save;
+struct evergreen_power_info;
 struct radeon_device;
 
 bool evergreen_is_display_hung(struct radeon_device *rdev);
@@ -49,5 +50,6 @@ u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
 void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
 u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
 int evergreen_rlc_resume(struct radeon_device *rdev);
+struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
 
 #endif				/* __RADEON_EVERGREEN_H__ */
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index d39bbd9793cc2..dd5ef64937230 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -26,6 +26,7 @@
 #include <linux/seq_file.h>
 
 #include "atom.h"
+#include "evergreen.h"
 #include "ni_dpm.h"
 #include "nid.h"
 #include "r600_dpm.h"
@@ -720,8 +721,6 @@ static const u32 cayman_sysls_enable[] =
 };
 #define CAYMAN_SYSLS_ENABLE_LENGTH sizeof(cayman_sysls_enable) / (3 * sizeof(u32))
 
-struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
-
 extern int ni_mc_load_microcode(struct radeon_device *rdev);
 
 struct ni_power_info *ni_get_pi(struct radeon_device *rdev)
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index badd8ac6e038f..ef2f1a048cfed 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -30,6 +30,7 @@
 #include "rv770_dpm.h"
 #include "cypress_dpm.h"
 #include "atom.h"
+#include "evergreen.h"
 #include <linux/seq_file.h>
 
 #define MC_CG_ARB_FREQ_F0           0x0a
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 32b697965c064..b4581392fbce9 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -26,6 +26,7 @@
 #include <linux/seq_file.h>
 
 #include "atom.h"
+#include "evergreen.h"
 #include "r600_dpm.h"
 #include "rv770.h"
 #include "radeon.h"
@@ -1720,8 +1721,6 @@ static const struct si_powertune_data powertune_data_hainan =
 	true
 };
 
-struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
-
 extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 
 static int si_populate_voltage_value(struct radeon_device *rdev,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (31 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:29   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s " Lee Jones
                   ` (9 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Slava Grigorev, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/dce6_afmt.c:32:5: warning: no previous prototype for ‘dce6_endpoint_rreg’ [-Wmissing-prototypes]
 32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:46:6: warning: no previous prototype for ‘dce6_endpoint_wreg’ [-Wmissing-prototypes]
 46 | void dce6_endpoint_wreg(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:110:6: warning: no previous prototype for ‘dce6_afmt_select_pin’ [-Wmissing-prototypes]
 110 | void dce6_afmt_select_pin(struct drm_encoder *encoder)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:123:6: warning: no previous prototype for ‘dce6_afmt_write_latency_fields’ [-Wmissing-prototypes]
 123 | void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:152:6: warning: no previous prototype for ‘dce6_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
 152 | void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:177:6: warning: no previous prototype for ‘dce6_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
 177 | void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:202:6: warning: no previous prototype for ‘dce6_afmt_write_sad_regs’ [-Wmissing-prototypes]
 202 | void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:268:6: warning: no previous prototype for ‘dce6_hdmi_audio_set_dto’ [-Wmissing-prototypes]
 268 | void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/dce6_afmt.c:287:6: warning: no previous prototype for ‘dce6_dp_audio_set_dto’ [-Wmissing-prototypes]
 287 | void dce6_dp_audio_set_dto(struct radeo_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Slava Grigorev <slava.grigorev@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/dce6_afmt.c    |  1 +
 drivers/gpu/drm/radeon/dce6_afmt.h    | 52 +++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/radeon_audio.c | 17 +--------
 3 files changed, 54 insertions(+), 16 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/dce6_afmt.h

diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c
index eec5d7a627388..4a1d5447eac17 100644
--- a/drivers/gpu/drm/radeon/dce6_afmt.c
+++ b/drivers/gpu/drm/radeon/dce6_afmt.c
@@ -22,6 +22,7 @@
  */
 #include <linux/hdmi.h>
 
+#include "dce6_afmt.h"
 #include "radeon.h"
 #include "radeon_audio.h"
 #include "sid.h"
diff --git a/drivers/gpu/drm/radeon/dce6_afmt.h b/drivers/gpu/drm/radeon/dce6_afmt.h
new file mode 100644
index 0000000000000..176a538664a27
--- /dev/null
+++ b/drivers/gpu/drm/radeon/dce6_afmt.h
@@ -0,0 +1,52 @@
+/* dce6_afmt.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 2013 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __DCE6_AFMT_H__
+#define __DCE6_AFMT_H__
+
+struct cea_sad;
+struct drm_connector;
+struct drm_display_mode;
+struct drm_encoder;
+struct radeon_crtc;
+struct radeon_device;
+
+u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
+void dce6_endpoint_wreg(struct radeon_device *rdev, u32 offset, u32 reg, u32 v);
+void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
+			      struct cea_sad *sads, int sad_count);
+void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
+					     u8 *sadb, int sad_count);
+void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
+					   u8 *sadb, int sad_count);
+void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
+				    struct drm_connector *connector,
+				    struct drm_display_mode *mode);
+void dce6_afmt_select_pin(struct drm_encoder *encoder);
+void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
+			     struct radeon_crtc *crtc, unsigned int clock);
+void dce6_dp_audio_set_dto(struct radeon_device *rdev,
+			   struct radeon_crtc *crtc, unsigned int clock);
+
+#endif                         /* __DCE6_AFMT_H__ */
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 3cc53db04d645..785c23cb30589 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -25,6 +25,7 @@
 #include <linux/gcd.h>
 
 #include <drm/drm_crtc.h>
+#include "dce6_afmt.h"
 #include "evergreen_hdmi.h"
 #include "radeon.h"
 #include "atom.h"
@@ -34,26 +35,10 @@ void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 		u8 enable_mask);
 void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 		u8 enable_mask);
-u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
-void dce6_endpoint_wreg(struct radeon_device *rdev,
-		u32 offset, u32 reg, u32 v);
-void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
-		struct cea_sad *sads, int sad_count);
-void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
-void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
-		u8 *sadb, int sad_count);
-void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
-		struct drm_connector *connector, struct drm_display_mode *mode);
 struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
 struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
-void dce6_afmt_select_pin(struct drm_encoder *encoder);
 void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
 	struct radeon_crtc *crtc, unsigned int clock);
-void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
-void dce6_dp_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
 void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
 	unsigned char *buffer, size_t size);
 void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (32 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:30   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype " Lee Jones
                   ` (8 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/si.c:5678:5: warning: no previous prototype for ‘si_get_csb_size’ [-Wmissing-prototypes]
 5678 | u32 si_get_csb_size(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/si.c:5710:6: warning: no previous prototype for ‘si_get_csb_buffer’ [-Wmissing-prototypes]
 5710 | void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer)
 | ^~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.c | 3 +--
 drivers/gpu/drm/radeon/si.h        | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 8fb0b8c3db5b5..4575e448e59df 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -41,6 +41,7 @@
 #include "radeon_asic.h"
 #include "radeon_audio.h"
 #include "radeon_ucode.h"
+#include "si.h"
 
 #define DC_HPDx_CONTROL(x)        (DC_HPD1_CONTROL     + (x * 0xc))
 #define DC_HPDx_INT_CONTROL(x)    (DC_HPD1_INT_CONTROL + (x * 0xc))
@@ -218,8 +219,6 @@ void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
 void evergreen_program_aspm(struct radeon_device *rdev);
 void cik_init_cp_pg_table(struct radeon_device *rdev);
 
-extern u32 si_get_csb_size(struct radeon_device *rdev);
-extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 extern u32 cik_get_csb_size(struct radeon_device *rdev);
 extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 
diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
index f483a64d17050..310c58376f927 100644
--- a/drivers/gpu/drm/radeon/si.h
+++ b/drivers/gpu/drm/radeon/si.h
@@ -32,5 +32,7 @@ u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
 void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
 void si_rlc_reset(struct radeon_device *rdev);
 void si_init_uvd_internal_cg(struct radeon_device *rdev);
+u32 si_get_csb_size(struct radeon_device *rdev);
+void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 
 #endif                         /* __SI_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (33 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:31   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes " Lee Jones
                   ` (7 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/cik.c:4845:5: warning: no previous prototype for ‘cik_gpu_check_soft_reset’ [-Wmissing-prototypes]
 4845 | u32 cik_gpu_check_soft_reset(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.h      | 1 +
 drivers/gpu/drm/radeon/cik_sdma.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
index 297b3c1ff804f..6630b9da9e7aa 100644
--- a/drivers/gpu/drm/radeon/cik.h
+++ b/drivers/gpu/drm/radeon/cik.h
@@ -29,5 +29,6 @@ void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
 void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
 int ci_mc_load_microcode(struct radeon_device *rdev);
 void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
+u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
 
 #endif                         /* __CIK_H__ */
diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c
index 3c709ebe8d1ab..919b14845c3c7 100644
--- a/drivers/gpu/drm/radeon/cik_sdma.c
+++ b/drivers/gpu/drm/radeon/cik_sdma.c
@@ -27,14 +27,13 @@
 #include "radeon_ucode.h"
 #include "radeon_asic.h"
 #include "radeon_trace.h"
+#include "cik.h"
 #include "cikd.h"
 
 /* sdma */
 #define CIK_SDMA_UCODE_SIZE 1050
 #define CIK_SDMA_UCODE_VERSION 64
 
-u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
-
 /*
  * sDMA - System DMA
  * Starting with CIK, the GPU has new asynchronous
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (34 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:32   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s " Lee Jones
                   ` (6 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/cik.c:6413:6: warning: no previous prototype for ‘cik_init_cp_pg_table’ [-Wmissing-prototypes]
 6413 | void cik_init_cp_pg_table(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik.c:6670:5: warning: no previous prototype for ‘cik_get_csb_size’ [-Wmissing-prototypes]
 6670 | u32 cik_get_csb_size(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik.c:6702:6: warning: no previous prototype for ‘cik_get_csb_buffer’ [-Wmissing-prototypes]
 6702 | void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer)
 | ^~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.h       | 3 +++
 drivers/gpu/drm/radeon/evergreen.c | 5 +----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
index 6630b9da9e7aa..420207d19de52 100644
--- a/drivers/gpu/drm/radeon/cik.h
+++ b/drivers/gpu/drm/radeon/cik.h
@@ -30,5 +30,8 @@ void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
 int ci_mc_load_microcode(struct radeon_device *rdev);
 void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
 u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
+void cik_init_cp_pg_table(struct radeon_device *rdev);
+u32 cik_get_csb_size(struct radeon_device *rdev);
+void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 
 #endif                         /* __CIK_H__ */
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 4575e448e59df..8e9e88bf1f43d 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -31,6 +31,7 @@
 
 #include "atom.h"
 #include "avivod.h"
+#include "cik.h"
 #include "ni.h"
 #include "rv770.h"
 #include "evergreen.h"
@@ -217,10 +218,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev);
 void evergreen_fini(struct radeon_device *rdev);
 void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
 void evergreen_program_aspm(struct radeon_device *rdev);
-void cik_init_cp_pg_table(struct radeon_device *rdev);
-
-extern u32 cik_get_csb_size(struct radeon_device *rdev);
-extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 
 static const u32 evergreen_golden_registers[] =
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (35 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:33   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s " Lee Jones
                   ` (5 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/si_dpm.c:3802:4: warning: no previous prototype for ‘si_get_ddr3_mclk_frequency_ratio’ [-Wmissing-prototypes]
 3802 | u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/si_dpm.c:3815:4: warning: no previous prototype for ‘si_get_mclk_frequency_ratio’ [-Wmissing-prototypes]
 3815 | u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/si_dpm.c:3897:6: warning: no previous prototype for ‘si_trim_voltage_table_to_fit_state_table’ [-Wmissing-prototypes]
 3897 | void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/ci_dpm.c | 6 +-----
 drivers/gpu/drm/radeon/si_dpm.h | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index a9fc0a552736c..0dfb0ed9af89d 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -33,6 +33,7 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_ucode.h"
+#include "si_dpm.h"
 
 #define MC_CG_ARB_FREQ_F0           0x0a
 #define MC_CG_ARB_FREQ_F1           0x0b
@@ -153,11 +154,6 @@ static const struct ci_pt_config_reg didt_config_ci[] =
 extern u8 rv770_get_memory_module_index(struct radeon_device *rdev);
 extern int ni_copy_and_switch_arb_sets(struct radeon_device *rdev,
 				       u32 arb_freq_src, u32 arb_freq_dest);
-extern u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock);
-extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
-extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
-						     u32 max_voltage_steps,
-						     struct atom_voltage_table *voltage_table);
 static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev,
 					 struct atom_voltage_table_entry *voltage_table,
 					 u16 *std_voltage_hi_sidd, u16 *std_voltage_lo_sidd);
diff --git a/drivers/gpu/drm/radeon/si_dpm.h b/drivers/gpu/drm/radeon/si_dpm.h
index 1032a68be792b..aa857906ef93d 100644
--- a/drivers/gpu/drm/radeon/si_dpm.h
+++ b/drivers/gpu/drm/radeon/si_dpm.h
@@ -234,5 +234,10 @@ struct si_power_info {
 #define SISLANDS_CGULVPARAMETER_DFLT                    0x00040035
 #define SISLANDS_CGULVCONTROL_DFLT                      0x1f007550
 
+u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock);
+u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
+void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
+					      u32 max_voltage_steps,
+					      struct atom_voltage_table *voltage_table);
 
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s prototypes to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (36 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:42   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype " Lee Jones
                   ` (4 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/cik_sdma.c:331:6: warning: no previous prototype for ‘cik_sdma_enable’ [-Wmissing-prototypes]
 331 | void cik_sdma_enable(struct radeon_device *rdev, bool enable)
 | ^~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik_sdma.c:528:5: warning: no previous prototype for ‘cik_sdma_resume’ [-Wmissing-prototypes]
 528 | int cik_sdma_resume(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/cik_sdma.c:557:6: warning: no previous prototype for ‘cik_sdma_fini’ [-Wmissing-prototypes]
 557 | void cik_sdma_fini(struct radeon_device *rdev)
 | ^~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.c | 3 ---
 drivers/gpu/drm/radeon/cik.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index cef0f3111cd3a..2af76463906ad 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -129,9 +129,6 @@ MODULE_FIRMWARE("radeon/mullins_rlc.bin");
 MODULE_FIRMWARE("radeon/mullins_sdma.bin");
 
 static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
-extern int cik_sdma_resume(struct radeon_device *rdev);
-extern void cik_sdma_enable(struct radeon_device *rdev, bool enable);
-extern void cik_sdma_fini(struct radeon_device *rdev);
 extern void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 static void cik_rlc_stop(struct radeon_device *rdev);
 static void cik_pcie_gen3_enable(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
index 420207d19de52..d1bf541da5923 100644
--- a/drivers/gpu/drm/radeon/cik.h
+++ b/drivers/gpu/drm/radeon/cik.h
@@ -34,4 +34,7 @@ void cik_init_cp_pg_table(struct radeon_device *rdev);
 u32 cik_get_csb_size(struct radeon_device *rdev);
 void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
 
+int cik_sdma_resume(struct radeon_device *rdev);
+void cik_sdma_enable(struct radeon_device *rdev, bool enable);
+void cik_sdma_fini(struct radeon_device *rdev);
 #endif                         /* __CIK_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (37 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:43   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s " Lee Jones
                   ` (3 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/vce_v1_0.c:102:6: warning: no previous prototype for ‘vce_v1_0_enable_mgcg’ [-Wmissing-prototypes]
 102 | void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable)
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/si_dpm.c      |  3 +--
 drivers/gpu/drm/radeon/trinity_dpm.c |  2 +-
 drivers/gpu/drm/radeon/vce.h         | 34 ++++++++++++++++++++++++++++
 drivers/gpu/drm/radeon/vce_v1_0.c    |  1 +
 4 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/vce.h

diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index b4581392fbce9..cd07b06301b44 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -35,6 +35,7 @@
 #include "si_dpm.h"
 #include "si.h"
 #include "sid.h"
+#include "vce.h"
 
 #define MC_CG_ARB_FREQ_F0           0x0a
 #define MC_CG_ARB_FREQ_F1           0x0b
@@ -1721,8 +1722,6 @@ static const struct si_powertune_data powertune_data_hainan =
 	true
 };
 
-extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
-
 static int si_populate_voltage_value(struct radeon_device *rdev,
 				     const struct atom_voltage_table *table,
 				     u16 value, SISLANDS_SMC_VOLTAGE_VALUE *voltage);
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
index e005c18aac00e..08ea1c864cb23 100644
--- a/drivers/gpu/drm/radeon/trinity_dpm.c
+++ b/drivers/gpu/drm/radeon/trinity_dpm.c
@@ -29,6 +29,7 @@
 #include "radeon_asic.h"
 #include "trinity_dpm.h"
 #include "trinityd.h"
+#include "vce.h"
 
 #define TRINITY_MAX_DEEPSLEEP_DIVIDER_ID 5
 #define TRINITY_MINIMUM_ENGINE_CLOCK 800
@@ -293,7 +294,6 @@ static const u32 trinity_override_mgpg_sequences[] =
 	0x00000204, 0x00000000,
 };
 
-extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 static void trinity_program_clk_gating_hw_sequence(struct radeon_device *rdev,
 						   const u32 *seq, u32 count);
 static void trinity_override_dynamic_mg_powergating(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/vce.h b/drivers/gpu/drm/radeon/vce.h
new file mode 100644
index 0000000000000..1eb4f5715202e
--- /dev/null
+++ b/drivers/gpu/drm/radeon/vce.h
@@ -0,0 +1,34 @@
+/* vce.h -- Private header for radeon driver -*- linux-c -*-
+ *
+ * Copyright 2013 Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+
+#ifndef __VCE_H__
+#define __VCE_H__
+
+struct radeon_device;
+
+void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
+
+#endif                         /* __VCE_H__ */
diff --git a/drivers/gpu/drm/radeon/vce_v1_0.c b/drivers/gpu/drm/radeon/vce_v1_0.c
index bd75bbcf5bf63..70c5da2141d75 100644
--- a/drivers/gpu/drm/radeon/vce_v1_0.c
+++ b/drivers/gpu/drm/radeon/vce_v1_0.c
@@ -30,6 +30,7 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "sid.h"
+#include "vce.h"
 
 #define VCE_V1_0_FW_SIZE	(256 * 1024)
 #define VCE_V1_0_STACK_SIZE	(64 * 1024)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (38 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:45   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s " Lee Jones
                   ` (2 subsequent siblings)
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Sumit Semwal, amd-gfx, dri-devel, linux-media,
	linaro-mm-sig

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

 drivers/gpu/drm/radeon/vce_v2_0.c:111:6: warning: no previous prototype for ‘vce_v2_0_enable_mgcg’ [-Wmissing-prototypes]
 111 | void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable)
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/cik.c      | 2 +-
 drivers/gpu/drm/radeon/vce.h      | 1 +
 drivers/gpu/drm/radeon/vce_v2_0.c | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 2af76463906ad..8b7a4f7b75766 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -41,6 +41,7 @@
 #include "radeon_audio.h"
 #include "radeon_ucode.h"
 #include "si.h"
+#include "vce.h"
 
 #define SH_MEM_CONFIG_GFX_DEFAULT \
 	ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED)
@@ -129,7 +130,6 @@ MODULE_FIRMWARE("radeon/mullins_rlc.bin");
 MODULE_FIRMWARE("radeon/mullins_sdma.bin");
 
 static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
-extern void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 static void cik_rlc_stop(struct radeon_device *rdev);
 static void cik_pcie_gen3_enable(struct radeon_device *rdev);
 static void cik_program_aspm(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/vce.h b/drivers/gpu/drm/radeon/vce.h
index 1eb4f5715202e..ccc9c00f0d02c 100644
--- a/drivers/gpu/drm/radeon/vce.h
+++ b/drivers/gpu/drm/radeon/vce.h
@@ -30,5 +30,6 @@
 struct radeon_device;
 
 void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
+void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
 
 #endif                         /* __VCE_H__ */
diff --git a/drivers/gpu/drm/radeon/vce_v2_0.c b/drivers/gpu/drm/radeon/vce_v2_0.c
index d6fde3659e65f..163c9bfc03da8 100644
--- a/drivers/gpu/drm/radeon/vce_v2_0.c
+++ b/drivers/gpu/drm/radeon/vce_v2_0.c
@@ -30,6 +30,7 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "cikd.h"
+#include "vce.h"
 
 #define VCE_V2_0_FW_SIZE	(256 * 1024)
 #define VCE_V2_0_STACK_SIZE	(64 * 1024)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (39 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:46   ` Alex Deucher
  2020-11-16 17:36 ` [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into " Lee Jones
  2020-11-16 17:37 ` [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to " Lee Jones
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/r600_cs.c:2343:5: warning: no previous prototype for ‘r600_dma_cs_next_reloc’ [-Wmissing-prototypes]
 2343 | int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
 | ^~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen_cs.c | 3 +--
 drivers/gpu/drm/radeon/r600.h         | 4 ++++
 drivers/gpu/drm/radeon/r600_cs.c      | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index 53b75cf201958..0de79f3a7e3ff 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -28,6 +28,7 @@
 
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "r600.h"
 #include "evergreend.h"
 #include "evergreen_reg_safe.h"
 #include "cayman_reg_safe.h"
@@ -37,8 +38,6 @@
 
 #define REG_SAFE_BM_SIZE ARRAY_SIZE(evergreen_reg_safe_bm)
 
-int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
-			   struct radeon_bo_list **cs_reloc);
 struct evergreen_cs_track {
 	u32			group_size;
 	u32			nbanks;
diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
index e66ef58706cd8..dbdff4568516b 100644
--- a/drivers/gpu/drm/radeon/r600.h
+++ b/drivers/gpu/drm/radeon/r600.h
@@ -28,10 +28,14 @@
 #ifndef __R600_H__
 #define __R600_H__
 
+struct radeon_bo_list;
+struct radeon_cs_parser;
 struct radeon_device;
 
 u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
 int r600_ih_ring_alloc(struct radeon_device *rdev);
 void r600_ih_ring_fini(struct radeon_device *rdev);
 
+int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
+			   struct radeon_bo_list **cs_reloc);
 #endif				/* __R600_H__ */
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index f20b619466816..dc68e538d5a97 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -29,6 +29,7 @@
 
 #include "radeon.h"
 #include "radeon_asic.h"
+#include "r600.h"
 #include "r600d.h"
 #include "r600_reg_safe.h"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (40 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s " Lee Jones
@ 2020-11-16 17:36 ` Lee Jones
  2020-11-16 20:47   ` Alex Deucher
  2020-11-16 17:37 ` [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to " Lee Jones
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:36 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/r600_hdmi.c:177:6: warning: no previous prototype for ‘r600_hdmi_update_acr’ [-Wmissing-prototypes]
 177 | void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
 | ^~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:217:6: warning: no previous prototype for ‘r600_set_avi_packet’ [-Wmissing-prototypes]
 217 | void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
 | ^~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:314:6: warning: no previous prototype for ‘r600_hdmi_audio_set_dto’ [-Wmissing-prototypes]
 314 | void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:340:6: warning: no previous prototype for ‘r600_set_vbi_packet’ [-Wmissing-prototypes]
 340 | void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset)
 | ^~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:351:6: warning: no previous prototype for ‘r600_set_audio_packet’ [-Wmissing-prototypes]
 351 | void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset)
 | ^~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:393:6: warning: no previous prototype for ‘r600_set_mute’ [-Wmissing-prototypes]
 393 | void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute)
 | ^~~~~~~~~~~~~
 drivers/gpu/drm/radeon/r600_hdmi.c:469:6: warning: no previous prototype for ‘r600_hdmi_enable’ [-Wmissing-prototypes]
 469 | void r600_hdmi_enable(struct drm_encoder *encoder, bool enable)
 | ^~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/r600.h         | 17 +++++++++++++++++
 drivers/gpu/drm/radeon/r600_hdmi.c    |  1 +
 drivers/gpu/drm/radeon/radeon_audio.c | 13 +------------
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
index dbdff4568516b..22db13b256195 100644
--- a/drivers/gpu/drm/radeon/r600.h
+++ b/drivers/gpu/drm/radeon/r600.h
@@ -30,12 +30,29 @@
 
 struct radeon_bo_list;
 struct radeon_cs_parser;
+struct r600_audio_pin;
+struct radeon_crtc;
 struct radeon_device;
+struct radeon_hdmi_acr;
 
 u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
 int r600_ih_ring_alloc(struct radeon_device *rdev);
 void r600_ih_ring_fini(struct radeon_device *rdev);
 
+void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
+		       u8 enable_mask);
+void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
+void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
+void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
+			     struct radeon_crtc *crtc, unsigned int clock);
+void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
+			 unsigned char *buffer, size_t size);
+void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
+			  const struct radeon_hdmi_acr *acr);
+void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
+void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
+
 int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
 			   struct radeon_bo_list **cs_reloc);
+
 #endif				/* __R600_H__ */
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
index c09549d785b54..f3551ebaa2f08 100644
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
@@ -30,6 +30,7 @@
 #include "radeon.h"
 #include "radeon_asic.h"
 #include "radeon_audio.h"
+#include "r600.h"
 #include "r600d.h"
 #include "atom.h"
 
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 785c23cb30589..7c5e80d03fc90 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -29,28 +29,17 @@
 #include "evergreen_hdmi.h"
 #include "radeon.h"
 #include "atom.h"
+#include "r600.h"
 #include "radeon_audio.h"
 
-void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
-		u8 enable_mask);
 void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
 		u8 enable_mask);
 struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
 struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
-void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
-	struct radeon_crtc *crtc, unsigned int clock);
-void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
-	unsigned char *buffer, size_t size);
-void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
-	const struct radeon_hdmi_acr *acr);
-void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
-void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
-void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
 static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
 	struct drm_display_mode *mode);
 static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
 	struct drm_display_mode *mode);
-void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
 
 static const u32 pin_offsets[7] =
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to shared header
  2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
                   ` (41 preceding siblings ...)
  2020-11-16 17:36 ` [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into " Lee Jones
@ 2020-11-16 17:37 ` Lee Jones
  2020-11-16 20:50   ` Alex Deucher
  42 siblings, 1 reply; 75+ messages in thread
From: Lee Jones @ 2020-11-16 17:37 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Gareth Hughes, amd-gfx, dri-devel

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

 drivers/gpu/drm/radeon/radeon_prime.c:43:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes]
 43 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_drv.c   | 4 +---
 drivers/gpu/drm/radeon/radeon_prime.h | 3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 211932d73b191..7a0989b397da1 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -55,6 +55,7 @@
 #include "radeon_ttm.h"
 #include "radeon.h"
 #include "radeon_device.h"
+#include "radeon_prime.h"
 
 /*
  * KMS wrapper.
@@ -129,9 +130,6 @@ int radeon_mode_dumb_mmap(struct drm_file *filp,
 int radeon_mode_dumb_create(struct drm_file *file_priv,
 			    struct drm_device *dev,
 			    struct drm_mode_create_dumb *args);
-struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
-							struct dma_buf_attachment *,
-							struct sg_table *sg);
 
 /* atpx handler */
 #if defined(CONFIG_VGA_SWITCHEROO)
diff --git a/drivers/gpu/drm/radeon/radeon_prime.h b/drivers/gpu/drm/radeon/radeon_prime.h
index 11b7f80987834..24ddfd4b48a6d 100644
--- a/drivers/gpu/drm/radeon/radeon_prime.h
+++ b/drivers/gpu/drm/radeon/radeon_prime.h
@@ -35,5 +35,8 @@ int radeon_gem_prime_pin(struct drm_gem_object *obj);
 void radeon_gem_prime_unpin(struct drm_gem_object *obj);
 void *radeon_gem_prime_vmap(struct drm_gem_object *obj);
 void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
+struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
+							struct dma_buf_attachment *,
+							struct sg_table *sg);
 
 #endif				/* __RADEON_PRIME_H__ */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* Re: [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Lee Jones
@ 2020-11-16 19:51   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 19:51 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Gareth Hughes, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_ttm.c:931:5: warning: no previous prototype for ‘radeon_mmap’ [-Wmissing-prototypes]
>  931 | int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
>  | ^~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Gareth Hughes <gareth@valinux.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
>  drivers/gpu/drm/radeon/radeon_ttm.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 536b246b9a6aa..2b9deaead99b2 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -51,6 +51,7 @@
>  #include <drm/radeon_drm.h>
>
>  #include "radeon_drv.h"
> +#include "radeon_ttm.h"
>  #include "radeon.h"
>  #include "radeon_device.h"
>
> @@ -125,7 +126,6 @@ extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
>                                       ktime_t *stime, ktime_t *etime,
>                                       const struct drm_display_mode *mode);
>  extern bool radeon_is_px(struct drm_device *dev);
> -int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
>  int radeon_mode_dumb_mmap(struct drm_file *filp,
>                           struct drm_device *dev,
>                           uint32_t handle, uint64_t *offset_p);
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.h b/drivers/gpu/drm/radeon/radeon_ttm.h
> index 91ea7141bc812..4d7b90ee27740 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.h
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.h
> @@ -32,5 +32,6 @@ struct radeon_device;
>
>  int radeon_ttm_init(struct radeon_device *rdev);
>  void radeon_ttm_fini(struct radeon_device *rdev);
> +int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
>
>  #endif                         /* __RADEON_TTM_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into shared header
  2020-11-16 17:36 ` [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into " Lee Jones
@ 2020-11-16 19:55   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 19:55 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Gareth Hughes, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_irq_kms.c:53:13: warning: no previous prototype for ‘radeon_driver_irq_handler_kms’ [-Wmissing-prototypes]
>  53 | irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_irq_kms.c:120:6: warning: no previous prototype for ‘radeon_driver_irq_preinstall_kms’ [-Wmissing-prototypes]
>  120 | void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_irq_kms.c:152:5: warning: no previous prototype for ‘radeon_driver_irq_postinstall_kms’ [-Wmissing-prototypes]
>  152 | int radeon_driver_irq_postinstall_kms(struct drm_device *dev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_irq_kms.c:171:6: warning: no previous prototype for ‘radeon_driver_irq_uninstall_kms’ [-Wmissing-prototypes]
>  171 | void radeon_driver_irq_uninstall_kms(struct drm_device *dev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Gareth Hughes <gareth@valinux.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_drv.c     | 5 +----
>  drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 +
>  drivers/gpu/drm/radeon/radeon_kms.h     | 5 +++++
>  3 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 2b9deaead99b2..211932d73b191 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -51,6 +51,7 @@
>  #include <drm/radeon_drm.h>
>
>  #include "radeon_drv.h"
> +#include "radeon_kms.h"
>  #include "radeon_ttm.h"
>  #include "radeon.h"
>  #include "radeon_device.h"
> @@ -117,10 +118,6 @@
>  int radeon_suspend_kms(struct drm_device *dev, bool suspend,
>                        bool fbcon, bool freeze);
>  int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
> -void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
> -int radeon_driver_irq_postinstall_kms(struct drm_device *dev);
> -void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
> -irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
>  extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
>                                       unsigned int flags, int *vpos, int *hpos,
>                                       ktime_t *stime, ktime_t *etime,
> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> index a242b6053d47e..b8b7f627f0a9c 100644
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -38,6 +38,7 @@
>
>  #include "atom.h"
>  #include "radeon.h"
> +#include "radeon_kms.h"
>  #include "radeon_reg.h"
>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.h b/drivers/gpu/drm/radeon/radeon_kms.h
> index 36e73cea92154..913c8239d5d8d 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.h
> +++ b/drivers/gpu/drm/radeon/radeon_kms.h
> @@ -32,4 +32,9 @@ u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
>  int radeon_enable_vblank_kms(struct drm_crtc *crtc);
>  void radeon_disable_vblank_kms(struct drm_crtc *crtc);
>
> +irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
> +void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
> +int radeon_driver_irq_postinstall_kms(struct drm_device *dev);
> +void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
> +
>  #endif                         /* __RADEON_KMS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes into shared header
  2020-11-16 17:36 ` [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes " Lee Jones
@ 2020-11-16 19:56   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 19:56 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/atombios_i2c.c:100:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_xfer’ [-Wmissing-prototypes]
>  100 | int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/atombios_i2c.c:150:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_func’ [-Wmissing-prototypes]
>  150 | u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap)
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/atom.h       | 7 +++++++
>  drivers/gpu/drm/radeon/radeon_i2c.c | 4 ----
>  2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
> index 1bf06c91cd959..5de0563b63d2e 100644
> --- a/drivers/gpu/drm/radeon/atom.h
> +++ b/drivers/gpu/drm/radeon/atom.h
> @@ -154,6 +154,13 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
>  bool atom_parse_cmd_header(struct atom_context *ctx, int index,
>                            uint8_t *frev, uint8_t *crev);
>  int atom_allocate_fb_scratch(struct atom_context *ctx);
> +
> +struct i2c_msg;
> +struct i2c_adapter;
> +int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
> +                           struct i2c_msg *msgs, int num);
> +u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap);
> +
>  #include "atom-types.h"
>  #include "atombios.h"
>  #include "ObjectID.h"
> diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
> index aa61b3cb4049c..e543d993f73ee 100644
> --- a/drivers/gpu/drm/radeon/radeon_i2c.c
> +++ b/drivers/gpu/drm/radeon/radeon_i2c.c
> @@ -34,10 +34,6 @@
>  #include "radeon.h"
>  #include "atom.h"
>
> -extern int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
> -                                  struct i2c_msg *msgs, int num);
> -extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap);
> -
>  bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux)
>  {
>         u8 out = 0x0;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to " Lee Jones
@ 2020-11-16 19:58   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 19:58 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_prime.c:34:18: warning: no previous prototype for ‘radeon_gem_prime_get_sg_table’ [-Wmissing-prototypes]
>  34 | struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:42:7: warning: no previous prototype for ‘radeon_gem_prime_vmap’ [-Wmissing-prototypes]
>  42 | void *radeon_gem_prime_vmap(struct drm_gem_object *obj)
>  | ^~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:55:6: warning: no previous prototype for ‘radeon_gem_prime_vunmap’ [-Wmissing-prototypes]
>  55 | void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:62:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes]
>  62 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:86:5: warning: no previous prototype for ‘radeon_gem_prime_pin’ [-Wmissing-prototypes]
>  86 | int radeon_gem_prime_pin(struct drm_gem_object *obj)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:104:6: warning: no previous prototype for ‘radeon_gem_prime_unpin’ [-Wmissing-prototypes]
>  104 | void radeon_gem_prime_unpin(struct drm_gem_object *obj)
>  | ^~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/radeon_prime.c:120:17: warning: no previous prototype for ‘radeon_gem_prime_export’ [-Wmissing-prototypes]
>  120 | struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied with minor changes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_gem.c   |  1 +
>  drivers/gpu/drm/radeon/radeon_prime.c |  1 +
>  drivers/gpu/drm/radeon/radeon_prime.h | 39 +++++++++++++++++++++++++++
>  3 files changed, 41 insertions(+)
>  create mode 100644 drivers/gpu/drm/radeon/radeon_prime.h
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
> index d2876ce3bc9e2..b6b21d2e72624 100644
> --- a/drivers/gpu/drm/radeon/radeon_gem.c
> +++ b/drivers/gpu/drm/radeon/radeon_gem.c
> @@ -35,6 +35,7 @@
>  #include <drm/radeon_drm.h>
>
>  #include "radeon.h"
> +#include "radeon_prime.h"
>
>  struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
>                                         int flags);
> diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c
> index 088d39a51c0d2..dd482edc819c5 100644
> --- a/drivers/gpu/drm/radeon/radeon_prime.c
> +++ b/drivers/gpu/drm/radeon/radeon_prime.c
> @@ -30,6 +30,7 @@
>  #include <drm/radeon_drm.h>
>
>  #include "radeon.h"
> +#include "radeon_prime.h"
>
>  struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj)
>  {
> diff --git a/drivers/gpu/drm/radeon/radeon_prime.h b/drivers/gpu/drm/radeon/radeon_prime.h
> new file mode 100644
> index 0000000000000..11b7f80987834
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/radeon_prime.h
> @@ -0,0 +1,39 @@
> +/* radeon_prime.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __RADEON_PRIME_H__
> +#define __RADEON_PRIME_H__
> +
> +struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
> +                                       int flags);
> +struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj);
> +int radeon_gem_prime_pin(struct drm_gem_object *obj);
> +void radeon_gem_prime_unpin(struct drm_gem_object *obj);
> +void *radeon_gem_prime_vmap(struct drm_gem_object *obj);
> +void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
> +
> +#endif                         /* __RADEON_PRIME_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI prototypes to shared header
  2020-11-16 17:36 ` [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI " Lee Jones
@ 2020-11-16 20:01   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:01 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:37:6: warning: no previous prototype for ‘dce4_audio_enable’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:67:6: warning: no previous prototype for ‘evergreen_hdmi_update_acr’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:97:6: warning: no previous prototype for ‘dce4_afmt_write_latency_fields’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:119:6: warning: no previous prototype for ‘dce4_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:137:6: warning: no previous prototype for ‘dce4_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:155:6: warning: no previous prototype for ‘evergreen_hdmi_write_sad_regs’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:208:6: warning: no previous prototype for ‘evergreen_set_avi_packet’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:227:6: warning: no previous prototype for ‘dce4_hdmi_audio_set_dto’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:270:6: warning: no previous prototype for ‘dce4_dp_audio_set_dto’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:306:6: warning: no previous prototype for ‘dce4_set_vbi_packet’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:317:6: warning: no previous prototype for ‘dce4_hdmi_set_color_depth’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:354:6: warning: no previous prototype for ‘dce4_set_audio_packet’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:389:6: warning: no previous prototype for ‘dce4_set_mute’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:400:6: warning: no previous prototype for ‘evergreen_hdmi_enable’ [-Wmissing-prototypes]
>  drivers/gpu/drm/radeon/evergreen_hdmi.c:440:6: warning: no previous prototype for ‘evergreen_dp_enable’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied with minor changes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen_hdmi.c |  1 +
>  drivers/gpu/drm/radeon/evergreen_hdmi.h | 69 +++++++++++++++++++++++++
>  drivers/gpu/drm/radeon/radeon_audio.c   | 26 +---------
>  3 files changed, 71 insertions(+), 25 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/evergreen_hdmi.h
>
> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> index 739336a48d085..5f3078f8ab950 100644
> --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> @@ -27,6 +27,7 @@
>  #include <linux/hdmi.h>
>
>  #include <drm/radeon_drm.h>
> +#include "evergreen_hdmi.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.h b/drivers/gpu/drm/radeon/evergreen_hdmi.h
> new file mode 100644
> index 0000000000000..c86276b8d7f58
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.h
> @@ -0,0 +1,69 @@
> +/* evergreen_hdmi.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __EVERGREEN_HDMI_H__
> +#define __EVERGREEN_HDMI_H__
> +
> +struct cea_sa;
> +struct cea_sad;
> +struct drm_connector;
> +struct drm_display_mode;
> +struct drm_encoder;
> +struct r600_audio_pin;
> +struct radeon_crtc;
> +struct radeon_device;
> +struct radeon_hdmi_acr;
> +
> +void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
> +                                  struct cea_sad *sads, int sad_count);
> +void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
> +                             unsigned char *buffer, size_t size);
> +void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> +                              const struct radeon_hdmi_acr *acr);
> +void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
> +void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
> +
> +void dce4_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
> +                      u8 enable_mask);
> +void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> +                                            u8 *sadb, int sad_count);
> +void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> +                                          u8 *sadb, int sad_count);
> +void dce4_afmt_write_latency_fields(struct drm_encoder *encoder,
> +                                   struct drm_connector *connector,
> +                                   struct drm_display_mode *mode);
> +void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
> +                            struct radeon_crtc *crtc, unsigned int clock);
> +void dce4_dp_audio_set_dto(struct radeon_device *rdev,
> +                          struct radeon_crtc *crtc, unsigned int clock);
> +void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> +void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
> +                              u32 offset, int bpc);
> +void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> +void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> +
> +#endif                         /* __EVERGREEN_HDMI_H__ */
> diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
> index f6c783e19c988..3cc53db04d645 100644
> --- a/drivers/gpu/drm/radeon/radeon_audio.c
> +++ b/drivers/gpu/drm/radeon/radeon_audio.c
> @@ -25,33 +25,24 @@
>  #include <linux/gcd.h>
>
>  #include <drm/drm_crtc.h>
> +#include "evergreen_hdmi.h"
>  #include "radeon.h"
>  #include "atom.h"
>  #include "radeon_audio.h"
>
>  void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
>                 u8 enable_mask);
> -void dce4_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
> -               u8 enable_mask);
>  void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
>                 u8 enable_mask);
>  u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
>  void dce6_endpoint_wreg(struct radeon_device *rdev,
>                 u32 offset, u32 reg, u32 v);
> -void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder,
> -               struct cea_sad *sads, int sad_count);
>  void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
>                 struct cea_sad *sads, int sad_count);
> -void dce4_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> -               u8 *sadb, int sad_count);
> -void dce4_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> -               u8 *sadb, int sad_count);
>  void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
>                 u8 *sadb, int sad_count);
>  void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
>                 u8 *sadb, int sad_count);
> -void dce4_afmt_write_latency_fields(struct drm_encoder *encoder,
> -               struct drm_connector *connector, struct drm_display_mode *mode);
>  void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
>                 struct drm_connector *connector, struct drm_display_mode *mode);
>  struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
> @@ -59,37 +50,22 @@ struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
>  void dce6_afmt_select_pin(struct drm_encoder *encoder);
>  void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
>         struct radeon_crtc *crtc, unsigned int clock);
> -void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
> -       struct radeon_crtc *crtc, unsigned int clock);
> -void dce4_dp_audio_set_dto(struct radeon_device *rdev,
> -       struct radeon_crtc *crtc, unsigned int clock);
>  void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
>         struct radeon_crtc *crtc, unsigned int clock);
>  void dce6_dp_audio_set_dto(struct radeon_device *rdev,
>         struct radeon_crtc *crtc, unsigned int clock);
>  void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
>         unsigned char *buffer, size_t size);
> -void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
> -       unsigned char *buffer, size_t size);
>  void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
>         const struct radeon_hdmi_acr *acr);
> -void evergreen_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> -       const struct radeon_hdmi_acr *acr);
>  void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> -void dce4_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> -void dce4_hdmi_set_color_depth(struct drm_encoder *encoder,
> -       u32 offset, int bpc);
>  void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> -void dce4_set_audio_packet(struct drm_encoder *encoder, u32 offset);
>  void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> -void dce4_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
>  static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
>         struct drm_display_mode *mode);
>  static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
>         struct drm_display_mode *mode);
>  void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
> -void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
> -void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
>
>  static const u32 pin_offsets[7] =
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s " Lee Jones
@ 2020-11-16 20:05   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:05 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/rv770_dpm.c:47:18: warning: no previous prototype for ‘rv770_get_ps’ [-Wmissing-prototypes]
>  47 | struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps)
>  | ^~~~~~~~~~~~
>  drivers/gpu/drm/radeon/rv770_dpm.c:54:26: warning: no previous prototype for ‘rv770_get_pi’ [-Wmissing-prototypes]
>  54 | struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/btc_dpm.c     | 3 +--
>  drivers/gpu/drm/radeon/cypress_dpm.c | 3 +--
>  drivers/gpu/drm/radeon/ni_dpm.c      | 2 +-
>  drivers/gpu/drm/radeon/rv730_dpm.c   | 4 +---
>  drivers/gpu/drm/radeon/rv740_dpm.c   | 3 +--
>  drivers/gpu/drm/radeon/rv770.h       | 4 ++++
>  drivers/gpu/drm/radeon/rv770_dpm.c   | 1 +
>  drivers/gpu/drm/radeon/si_dpm.c      | 2 +-
>  8 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
> index d1d8aaf8323c2..018949668536e 100644
> --- a/drivers/gpu/drm/radeon/btc_dpm.c
> +++ b/drivers/gpu/drm/radeon/btc_dpm.c
> @@ -30,6 +30,7 @@
>  #include "btcd.h"
>  #include "cypress_dpm.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>
> @@ -48,8 +49,6 @@
>  #ifndef BTC_MGCG_SEQUENCE
>  #define BTC_MGCG_SEQUENCE  300
>
> -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>
>  extern int ni_mc_load_microcode(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
> index 35b177d777913..6d3690bcca2d2 100644
> --- a/drivers/gpu/drm/radeon/cypress_dpm.c
> +++ b/drivers/gpu/drm/radeon/cypress_dpm.c
> @@ -28,6 +28,7 @@
>  #include "cypress_dpm.h"
>  #include "evergreend.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>
> @@ -43,8 +44,6 @@
>  #define MC_CG_SEQ_YCLK_SUSPEND      0x04
>  #define MC_CG_SEQ_YCLK_RESUME       0x0a
>
> -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>
>  static void cypress_enable_bif_dynamic_pcie_gen2(struct radeon_device *rdev,
> diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
> index 59cdadcece159..d39bbd9793cc2 100644
> --- a/drivers/gpu/drm/radeon/ni_dpm.c
> +++ b/drivers/gpu/drm/radeon/ni_dpm.c
> @@ -29,6 +29,7 @@
>  #include "ni_dpm.h"
>  #include "nid.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>
> @@ -719,7 +720,6 @@ static const u32 cayman_sysls_enable[] =
>  };
>  #define CAYMAN_SYSLS_ENABLE_LENGTH sizeof(cayman_sysls_enable) / (3 * sizeof(u32))
>
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>
>  extern int ni_mc_load_microcode(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/rv730_dpm.c b/drivers/gpu/drm/radeon/rv730_dpm.c
> index 84a3d6d724866..a9de5c953396a 100644
> --- a/drivers/gpu/drm/radeon/rv730_dpm.c
> +++ b/drivers/gpu/drm/radeon/rv730_dpm.c
> @@ -25,6 +25,7 @@
>  #include "radeon.h"
>  #include "rv730d.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "rv770_dpm.h"
>  #include "atom.h"
>
> @@ -33,9 +34,6 @@
>  #define MC_CG_ARB_FREQ_F2           0x0c
>  #define MC_CG_ARB_FREQ_F3           0x0d
>
> -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
> -
>  int rv730_populate_sclk_value(struct radeon_device *rdev,
>                               u32 engine_clock,
>                               RV770_SMC_SCLK_VALUE *sclk)
> diff --git a/drivers/gpu/drm/radeon/rv740_dpm.c b/drivers/gpu/drm/radeon/rv740_dpm.c
> index 327d65a76e1f4..d57a3e1df8d63 100644
> --- a/drivers/gpu/drm/radeon/rv740_dpm.c
> +++ b/drivers/gpu/drm/radeon/rv740_dpm.c
> @@ -25,11 +25,10 @@
>  #include "radeon.h"
>  #include "rv740d.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "rv770_dpm.h"
>  #include "atom.h"
>
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
> -
>  u32 rv740_get_decoded_reference_divider(u32 encoded_ref)
>  {
>         u32 ref = 0;
> diff --git a/drivers/gpu/drm/radeon/rv770.h b/drivers/gpu/drm/radeon/rv770.h
> index a3f2bb44979fe..0e15916d0a948 100644
> --- a/drivers/gpu/drm/radeon/rv770.h
> +++ b/drivers/gpu/drm/radeon/rv770.h
> @@ -29,7 +29,11 @@
>  #define __RADEON_RV770_H__
>
>  struct radeon_device;
> +struct radeon_ps;
>
>  void rv770_set_clk_bypass_mode(struct radeon_device *rdev);
>
> +struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps);
> +struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
> +
>  #endif                         /* __RADEON_RV770_H__ */
> diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
> index 4a0cf597c11c6..badd8ac6e038f 100644
> --- a/drivers/gpu/drm/radeon/rv770_dpm.c
> +++ b/drivers/gpu/drm/radeon/rv770_dpm.c
> @@ -24,6 +24,7 @@
>
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "rv770.h"
>  #include "rv770d.h"
>  #include "r600_dpm.h"
>  #include "rv770_dpm.h"
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index d1c73e9db889a..a80a21447a76d 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -27,6 +27,7 @@
>
>  #include "atom.h"
>  #include "r600_dpm.h"
> +#include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "si_dpm.h"
> @@ -1717,7 +1718,6 @@ static const struct si_powertune_data powertune_data_hainan =
>         true
>  };
>
> -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev);
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>  struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
>  struct ni_ps *ni_get_ps(struct radeon_ps *rps);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi, ps}()'s into shared header
  2020-11-16 17:36 ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into " Lee Jones
@ 2020-11-16 20:09   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:09 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/ni_dpm.c:727:23: warning: no previous prototype for ‘ni_get_pi’ [-Wmissing-prototypes]
>  727 | struct ni_power_info *ni_get_pi(struct radeon_device *rdev)
>  | ^~~~~~~~~
>  drivers/gpu/drm/radeon/ni_dpm.c:734:15: warning: no previous prototype for ‘ni_get_ps’ [-Wmissing-prototypes]
>  734 | struct ni_ps *ni_get_ps(struct radeon_ps *rps)
>  | ^~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/ni_dpm.h | 3 +++
>  drivers/gpu/drm/radeon/si_dpm.c | 3 +--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ni_dpm.h b/drivers/gpu/drm/radeon/ni_dpm.h
> index 6bbee9180909e..74e3019369063 100644
> --- a/drivers/gpu/drm/radeon/ni_dpm.h
> +++ b/drivers/gpu/drm/radeon/ni_dpm.h
> @@ -247,4 +247,7 @@ void ni_set_uvd_clock_after_set_eng_clock(struct radeon_device *rdev,
>
>  bool ni_dpm_vblank_too_short(struct radeon_device *rdev);
>
> +struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
> +struct ni_ps *ni_get_ps(struct radeon_ps *rps);
> +
>  #endif
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index a80a21447a76d..c68ab2fb1ac23 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -30,6 +30,7 @@
>  #include "rv770.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "ni_dpm.h"
>  #include "si_dpm.h"
>  #include "sid.h"
>
> @@ -1719,8 +1720,6 @@ static const struct si_powertune_data powertune_data_hainan =
>  };
>
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
> -struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
> -struct ni_ps *ni_get_ps(struct radeon_ps *rps);
>
>  extern int si_mc_load_microcode(struct radeon_device *rdev);
>  extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to " Lee Jones
@ 2020-11-16 20:11   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:11 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/ni.c:1378:6: warning: no previous prototype for ‘cayman_cp_int_cntl_setup’ [-Wmissing-prototypes]
>  1378 | void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/ni.c:1732:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  1732 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied with minor changes.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/evergreen.c |  5 +---
>  drivers/gpu/drm/radeon/ni.c        |  1 +
>  drivers/gpu/drm/radeon/ni.h        | 38 ++++++++++++++++++++++++++++++
>  3 files changed, 40 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/ni.h
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index f860f5ef2df88..8fb0b8c3db5b5 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -31,6 +31,7 @@
>
>  #include "atom.h"
>  #include "avivod.h"
> +#include "ni.h"
>  #include "rv770.h"
>  #include "evergreen.h"
>  #include "evergreen_blit_shaders.h"
> @@ -215,10 +216,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev);
>  void evergreen_fini(struct radeon_device *rdev);
>  void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
>  void evergreen_program_aspm(struct radeon_device *rdev);
> -extern void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
> -                                    int ring, u32 cp_int_cntl);
> -extern void cayman_vm_decode_fault(struct radeon_device *rdev,
> -                                  u32 status, u32 addr);
>  void cik_init_cp_pg_table(struct radeon_device *rdev);
>
>  extern u32 si_get_csb_size(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
> index 1c9030a4631b8..ab7bd30802176 100644
> --- a/drivers/gpu/drm/radeon/ni.c
> +++ b/drivers/gpu/drm/radeon/ni.c
> @@ -33,6 +33,7 @@
>  #include "cayman_blit_shaders.h"
>  #include "clearstate_cayman.h"
>  #include "evergreen.h"
> +#include "ni.h"
>  #include "ni_reg.h"
>  #include "nid.h"
>  #include "radeon.h"
> diff --git a/drivers/gpu/drm/radeon/ni.h b/drivers/gpu/drm/radeon/ni.h
> new file mode 100644
> index 0000000000000..d63be1c88c0f1
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/ni.h
> @@ -0,0 +1,38 @@
> +/* ni.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __NI_H__
> +#define __NI_H__
> +
> +struct radeon_device;
> +
> +void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
> +                             int ring, u32 cp_int_cntl);
> +void cayman_vm_decode_fault(struct radeon_device *rdev,
> +                           u32 status, u32 addr);
> +
> +#endif                         /* __NI_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location
  2020-11-16 17:36 ` [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Lee Jones
@ 2020-11-16 20:13   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:13 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Christian König,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	Maling list - DRI developers, Alex Deucher, linux-media

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/r600.c:1615:5: warning: no previous prototype for ‘r600_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  1615 | u32 r600_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied with minor changes.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/r600.c     |  1 +
>  drivers/gpu/drm/radeon/r600.h     | 35 +++++++++++++++++++++++++++++++
>  drivers/gpu/drm/radeon/r600_dma.c |  3 +--
>  3 files changed, 37 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/r600.h
>
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index f09b6dc5cbeb3..94e8815e5067d 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -39,6 +39,7 @@
>
>  #include "atom.h"
>  #include "avivod.h"
> +#include "r600.h"
>  #include "r600d.h"
>  #include "rv770.h"
>  #include "radeon.h"
> diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
> new file mode 100644
> index 0000000000000..2a3915f0039e4
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/r600.h
> @@ -0,0 +1,35 @@
> +/* r600.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> + * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
> + * All rights reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __R600_H__
> +#define __R600_H__
> +
> +struct radeon_device;
> +
> +u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
> +
> +#endif                         /* __R600_H__ */
> diff --git a/drivers/gpu/drm/radeon/r600_dma.c b/drivers/gpu/drm/radeon/r600_dma.c
> index af6c0da45f28a..89ca2738c5d4c 100644
> --- a/drivers/gpu/drm/radeon/r600_dma.c
> +++ b/drivers/gpu/drm/radeon/r600_dma.c
> @@ -24,10 +24,9 @@
>
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "r600.h"
>  #include "r600d.h"
>
> -u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
> -
>  /*
>   * DMA
>   * Starting with R600, the GPU has an asynchronous
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc, fini}()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header Lee Jones
@ 2020-11-16 20:15   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:15 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Christian König,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	Maling list - DRI developers, Alex Deucher, linux-media

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/r600.c:3480:5: warning: no previous prototype for ‘r600_ih_ring_alloc’ [-Wmissing-prototypes]
>  3480 | int r600_ih_ring_alloc(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600.c:3516:6: warning: no previous prototype for ‘r600_ih_ring_fini’ [-Wmissing-prototypes]
>  3516 | void r600_ih_ring_fini(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c  | 3 +--
>  drivers/gpu/drm/radeon/r600.h | 2 ++
>  drivers/gpu/drm/radeon/si.c   | 3 +--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index 315c4f3df3656..980b50d046cbc 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -34,6 +34,7 @@
>  #include "cik_blit_shaders.h"
>  #include "cikd.h"
>  #include "clearstate_ci.h"
> +#include "r600.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
> @@ -125,8 +126,6 @@ MODULE_FIRMWARE("radeon/mullins_mec.bin");
>  MODULE_FIRMWARE("radeon/mullins_rlc.bin");
>  MODULE_FIRMWARE("radeon/mullins_sdma.bin");
>
> -extern int r600_ih_ring_alloc(struct radeon_device *rdev);
> -extern void r600_ih_ring_fini(struct radeon_device *rdev);
>  extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
>  extern void si_rlc_reset(struct radeon_device *rdev);
>  extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
> index 2a3915f0039e4..e66ef58706cd8 100644
> --- a/drivers/gpu/drm/radeon/r600.h
> +++ b/drivers/gpu/drm/radeon/r600.h
> @@ -31,5 +31,7 @@
>  struct radeon_device;
>
>  u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
> +int r600_ih_ring_alloc(struct radeon_device *rdev);
> +void r600_ih_ring_fini(struct radeon_device *rdev);
>
>  #endif                         /* __R600_H__ */
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index 45076c27d7ded..d0407145c07b5 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -33,6 +33,7 @@
>  #include "atom.h"
>  #include "clearstate_si.h"
>  #include "evergreen.h"
> +#include "r600.h"
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
> @@ -128,8 +129,6 @@ static void si_pcie_gen3_enable(struct radeon_device *rdev);
>  static void si_program_aspm(struct radeon_device *rdev);
>  extern void sumo_rlc_fini(struct radeon_device *rdev);
>  extern int sumo_rlc_init(struct radeon_device *rdev);
> -extern int r600_ih_ring_alloc(struct radeon_device *rdev);
> -extern void r600_ih_ring_fini(struct radeon_device *rdev);
>  static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
>                                          bool enable);
>  static void si_init_pg(struct radeon_device *rdev);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype " Lee Jones
@ 2020-11-16 20:16   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:16 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/evergreen.c:3825:5: warning: no previous prototype for ‘evergreen_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  3825 | u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen.h     | 1 +
>  drivers/gpu/drm/radeon/evergreen_dma.c | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
> index 30c9ca99ced90..eb46ac7776951 100644
> --- a/drivers/gpu/drm/radeon/evergreen.h
> +++ b/drivers/gpu/drm/radeon/evergreen.h
> @@ -47,5 +47,6 @@ int sumo_rlc_init(struct radeon_device *rdev);
>  void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
>  u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
>  void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
> +u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
>
>  #endif                         /* __RADEON_EVERGREEN_H__ */
> diff --git a/drivers/gpu/drm/radeon/evergreen_dma.c b/drivers/gpu/drm/radeon/evergreen_dma.c
> index 767857d4a8c5c..52c79da1ecf57 100644
> --- a/drivers/gpu/drm/radeon/evergreen_dma.c
> +++ b/drivers/gpu/drm/radeon/evergreen_dma.c
> @@ -24,10 +24,9 @@
>
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "evergreen.h"
>  #include "evergreend.h"
>
> -u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
> -
>  /**
>   * evergreen_dma_fence_ring_emit - emit a fence on the DMA ring
>   *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s " Lee Jones
@ 2020-11-16 20:17   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:17 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/evergreen.c:4380:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes]
>  4380 | int evergreen_rlc_resume(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen.h | 1 +
>  drivers/gpu/drm/radeon/r600.c      | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
> index eb46ac7776951..f8d772e612a48 100644
> --- a/drivers/gpu/drm/radeon/evergreen.h
> +++ b/drivers/gpu/drm/radeon/evergreen.h
> @@ -48,5 +48,6 @@ void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
>  u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
>  void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
>  u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
> +int evergreen_rlc_resume(struct radeon_device *rdev);
>
>  #endif                         /* __RADEON_EVERGREEN_H__ */
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index 94e8815e5067d..b44e0c607b1b1 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -39,6 +39,7 @@
>
>  #include "atom.h"
>  #include "avivod.h"
> +#include "evergreen.h"
>  #include "r600.h"
>  #include "r600d.h"
>  #include "rv770.h"
> @@ -113,7 +114,6 @@ static void r600_gpu_init(struct radeon_device *rdev);
>  void r600_fini(struct radeon_device *rdev);
>  void r600_irq_disable(struct radeon_device *rdev);
>  static void r600_pcie_gen2_enable(struct radeon_device *rdev);
> -extern int evergreen_rlc_resume(struct radeon_device *rdev);
>
>  /*
>   * Indirect registers accessor
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s " Lee Jones
@ 2020-11-16 20:18   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:18 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/ni.c:1733:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  1733 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/ni.h     | 1 +
>  drivers/gpu/drm/radeon/ni_dma.c | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ni.h b/drivers/gpu/drm/radeon/ni.h
> index d63be1c88c0f1..9a5f31a05e68f 100644
> --- a/drivers/gpu/drm/radeon/ni.h
> +++ b/drivers/gpu/drm/radeon/ni.h
> @@ -34,5 +34,6 @@ void cayman_cp_int_cntl_setup(struct radeon_device *rdev,
>                               int ring, u32 cp_int_cntl);
>  void cayman_vm_decode_fault(struct radeon_device *rdev,
>                             u32 status, u32 addr);
> +u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev);
>
>  #endif                         /* __NI_H__ */
> diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c
> index c56136848360e..bd515ad4fe4cc 100644
> --- a/drivers/gpu/drm/radeon/ni_dma.c
> +++ b/drivers/gpu/drm/radeon/ni_dma.c
> @@ -25,10 +25,9 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_trace.h"
> +#include "ni.h"
>  #include "nid.h"
>
> -u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev);
> -
>  /*
>   * DMA
>   * Starting with R600, the GPU has an asynchronous
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s " Lee Jones
@ 2020-11-16 20:19   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:19 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/atombios_encoders.c:2721:1: warning: no previous prototype for ‘radeon_add_atom_encoder’ [-Wmissing-prototypes]
>  2721 | radeon_add_atom_encoder(struct drm_device *dev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_atombios.c | 4 ----
>  drivers/gpu/drm/radeon/radeon_atombios.h | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index cc80651b25773..be96d9b64e43b 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -37,10 +37,6 @@
>  #include "radeon_atombios.h"
>  #include "radeon_legacy_encoders.h"
>
> -extern void
> -radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
> -                       uint32_t supported_device, u16 caps);
> -
>  union atom_supported_devices {
>         struct _ATOM_SUPPORTED_DEVICES_INFO info;
>         struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
> index b7c76920feb7d..a895a7002c3d3 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.h
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.h
> @@ -28,10 +28,14 @@
>  #ifndef __RADEON_ATOMBIOS_H__
>  #define __RADEON_ATOMBIOS_H__
>
> +struct drm_device;
>  struct drm_display_mode;
>  struct radeon_device;
>
>  bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
>                                 struct drm_display_mode *mode);
> +void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
> +                            uint32_t supported_device, u16 caps);
> +
>
>  #endif                         /* __RADEON_ATOMBIOS_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's prototype to shared header
  2020-11-16 17:36 ` [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's " Lee Jones
@ 2020-11-16 20:20   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:20 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/atombios_encoders.c:186:6: warning: no previous prototype for ‘radeon_atom_backlight_init’ [-Wmissing-prototypes]
>  186 | void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_atombios.h | 4 ++++
>  drivers/gpu/drm/radeon/radeon_encoders.c | 6 +-----
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.h b/drivers/gpu/drm/radeon/radeon_atombios.h
> index a895a7002c3d3..fd03755e6fa2c 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.h
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.h
> @@ -28,14 +28,18 @@
>  #ifndef __RADEON_ATOMBIOS_H__
>  #define __RADEON_ATOMBIOS_H__
>
> +struct drm_connector;
>  struct drm_device;
>  struct drm_display_mode;
>  struct radeon_device;
> +struct radeon_encoder;
>
>  bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
>                                 struct drm_display_mode *mode);
>  void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
>                              uint32_t supported_device, u16 caps);
> +void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
> +                               struct drm_connector *drm_connector);
>
>
>  #endif                         /* __RADEON_ATOMBIOS_H__ */
> diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
> index b60a373d3ead3..46549d5179ee9 100644
> --- a/drivers/gpu/drm/radeon/radeon_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_encoders.c
> @@ -31,14 +31,10 @@
>  #include <drm/radeon_drm.h>
>
>  #include "radeon.h"
> +#include "radeon_atombios.h"
>  #include "radeon_legacy_encoders.h"
>  #include "atom.h"
>
> -extern void
> -radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
> -                          struct drm_connector *drm_connector);
> -
> -
>  static uint32_t radeon_encoder_clones(struct drm_encoder *encoder)
>  {
>         struct drm_device *dev = encoder->dev;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes " Lee Jones
@ 2020-11-16 20:22   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:22 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/cik.c:1868:5: warning: no previous prototype for ‘ci_mc_load_microcode’ [-Wmissing-prototypes]
>  1868 | int ci_mc_load_microcode(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik.c:5847:6: warning: no previous prototype for ‘cik_enter_rlc_safe_mode’ [-Wmissing-prototypes]
>  5847 | void cik_enter_rlc_safe_mode(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik.c:5868:6: warning: no previous prototype for ‘cik_exit_rlc_safe_mode’ [-Wmissing-prototypes]
>  5868 | void cik_exit_rlc_safe_mode(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik.c:6286:6: warning: no previous prototype for ‘cik_update_cg’ [-Wmissing-prototypes]
>  6286 | void cik_update_cg(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/ci_dpm.c |  7 +------
>  drivers/gpu/drm/radeon/cik.c    |  1 +
>  drivers/gpu/drm/radeon/cik.h    | 33 +++++++++++++++++++++++++++++++++
>  3 files changed, 35 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/cik.h
>
> diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
> index 8324aca5fd006..a9fc0a552736c 100644
> --- a/drivers/gpu/drm/radeon/ci_dpm.c
> +++ b/drivers/gpu/drm/radeon/ci_dpm.c
> @@ -27,6 +27,7 @@
>
>  #include "atom.h"
>  #include "ci_dpm.h"
> +#include "cik.h"
>  #include "cikd.h"
>  #include "r600_dpm.h"
>  #include "radeon.h"
> @@ -157,12 +158,6 @@ extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
>  extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
>                                                      u32 max_voltage_steps,
>                                                      struct atom_voltage_table *voltage_table);
> -extern void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
> -extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
> -extern int ci_mc_load_microcode(struct radeon_device *rdev);
> -extern void cik_update_cg(struct radeon_device *rdev,
> -                         u32 block, bool enable);
> -
>  static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev,
>                                          struct atom_voltage_table_entry *voltage_table,
>                                          u16 *std_voltage_hi_sidd, u16 *std_voltage_lo_sidd);
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index 980b50d046cbc..ae020ad7b3185 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -32,6 +32,7 @@
>  #include "atom.h"
>  #include "evergreen.h"
>  #include "cik_blit_shaders.h"
> +#include "cik.h"
>  #include "cikd.h"
>  #include "clearstate_ci.h"
>  #include "r600.h"
> diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
> new file mode 100644
> index 0000000000000..297b3c1ff804f
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/cik.h
> @@ -0,0 +1,33 @@
> +/* cik.h -- Private header for radeon driver -*- linux-c -*-
> + * Copyright 2012 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#ifndef __CIK_H__
> +#define __CIK_H__
> +
> +struct radeon_device;
> +
> +void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
> +void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
> +int ci_mc_load_microcode(struct radeon_device *rdev);
> +void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
> +
> +#endif                         /* __CIK_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype " Lee Jones
@ 2020-11-16 20:24   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:24 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/si.c:1570:5: warning: no previous prototype for ‘si_mc_load_microcode’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/si.c     |  1 +
>  drivers/gpu/drm/radeon/si.h     | 31 +++++++++++++++++++++++++++++++
>  drivers/gpu/drm/radeon/si_dpm.c |  2 +-
>  3 files changed, 33 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/radeon/si.h
>
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index d0407145c07b5..88731b79c8f57 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -39,6 +39,7 @@
>  #include "radeon_audio.h"
>  #include "radeon_ucode.h"
>  #include "si_blit_shaders.h"
> +#include "si.h"
>  #include "sid.h"
>
>
> diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
> new file mode 100644
> index 0000000000000..0a5018ef166e2
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/si.h
> @@ -0,0 +1,31 @@
> +/* si.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 2011 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#ifndef __SI_H__
> +#define __SI_H__
> +
> +struct radeon_device;
> +
> +int si_mc_load_microcode(struct radeon_device *rdev);
> +
> +#endif                         /* __SI_H__ */
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index c68ab2fb1ac23..32b697965c064 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -32,6 +32,7 @@
>  #include "radeon_asic.h"
>  #include "ni_dpm.h"
>  #include "si_dpm.h"
> +#include "si.h"
>  #include "sid.h"
>
>  #define MC_CG_ARB_FREQ_F0           0x0a
> @@ -1721,7 +1722,6 @@ static const struct si_powertune_data powertune_data_hainan =
>
>  struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>
> -extern int si_mc_load_microcode(struct radeon_device *rdev);
>  extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>
>  static int si_populate_voltage_value(struct radeon_device *rdev,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s " Lee Jones
@ 2020-11-16 20:25   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:25 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/si.c:3768:5: warning: no previous prototype for ‘si_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  3768 | u32 si_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/si.h     | 1 +
>  drivers/gpu/drm/radeon/si_dma.c | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
> index 0a5018ef166e2..a1751ae560f02 100644
> --- a/drivers/gpu/drm/radeon/si.h
> +++ b/drivers/gpu/drm/radeon/si.h
> @@ -27,5 +27,6 @@
>  struct radeon_device;
>
>  int si_mc_load_microcode(struct radeon_device *rdev);
> +u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
>
>  #endif                         /* __SI_H__ */
> diff --git a/drivers/gpu/drm/radeon/si_dma.c b/drivers/gpu/drm/radeon/si_dma.c
> index d2fa302a5be9f..645897d1bfc31 100644
> --- a/drivers/gpu/drm/radeon/si_dma.c
> +++ b/drivers/gpu/drm/radeon/si_dma.c
> @@ -25,10 +25,9 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_trace.h"
> +#include "si.h"
>  #include "sid.h"
>
> -u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
> -
>  /**
>   * si_dma_is_lockup - Check if the DMA engine is locked up
>   *
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes " Lee Jones
@ 2020-11-16 20:27   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:27 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Christian König,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	Maling list - DRI developers, Alex Deucher, linux-media

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/si.c:4186:6: warning: no previous prototype for ‘si_vram_gtt_location’ [-Wmissing-prototypes]
>  4186 | void si_vram_gtt_location(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/si.c:5186:6: warning: no previous prototype for ‘si_init_uvd_internal_cg’ [-Wmissing-prototypes]
>  5186 | void si_init_uvd_internal_cg(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/si.c:5801:6: warning: no previous prototype for ‘si_rlc_reset’ [-Wmissing-prototypes]
>  5801 | void si_rlc_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c | 4 +---
>  drivers/gpu/drm/radeon/si.h  | 4 ++++
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index ae020ad7b3185..cef0f3111cd3a 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -40,6 +40,7 @@
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
>  #include "radeon_ucode.h"
> +#include "si.h"
>
>  #define SH_MEM_CONFIG_GFX_DEFAULT \
>         ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED)
> @@ -127,9 +128,6 @@ MODULE_FIRMWARE("radeon/mullins_mec.bin");
>  MODULE_FIRMWARE("radeon/mullins_rlc.bin");
>  MODULE_FIRMWARE("radeon/mullins_sdma.bin");
>
> -extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
> -extern void si_rlc_reset(struct radeon_device *rdev);
> -extern void si_init_uvd_internal_cg(struct radeon_device *rdev);
>  static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
>  extern int cik_sdma_resume(struct radeon_device *rdev);
>  extern void cik_sdma_enable(struct radeon_device *rdev, bool enable);
> diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
> index a1751ae560f02..f483a64d17050 100644
> --- a/drivers/gpu/drm/radeon/si.h
> +++ b/drivers/gpu/drm/radeon/si.h
> @@ -25,8 +25,12 @@
>  #define __SI_H__
>
>  struct radeon_device;
> +struct radeon_mc;
>
>  int si_mc_load_microcode(struct radeon_device *rdev);
>  u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
> +void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
> +void si_rlc_reset(struct radeon_device *rdev);
> +void si_init_uvd_internal_cg(struct radeon_device *rdev);
>
>  #endif                         /* __SI_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype to shared header
  2020-11-16 17:36 ` [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype " Lee Jones
@ 2020-11-16 20:28   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:28 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/rv770_dpm.c:62:30: warning: no previous prototype for ‘evergreen_get_pi’ [-Wmissing-prototypes]
>  62 | struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/btc_dpm.c     | 3 +--
>  drivers/gpu/drm/radeon/cypress_dpm.c | 3 +--
>  drivers/gpu/drm/radeon/evergreen.h   | 2 ++
>  drivers/gpu/drm/radeon/ni_dpm.c      | 3 +--
>  drivers/gpu/drm/radeon/rv770_dpm.c   | 1 +
>  drivers/gpu/drm/radeon/si_dpm.c      | 3 +--
>  6 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
> index 018949668536e..4e64ed38c439f 100644
> --- a/drivers/gpu/drm/radeon/btc_dpm.c
> +++ b/drivers/gpu/drm/radeon/btc_dpm.c
> @@ -29,6 +29,7 @@
>  #include "btc_dpm.h"
>  #include "btcd.h"
>  #include "cypress_dpm.h"
> +#include "evergreen.h"
>  #include "r600_dpm.h"
>  #include "rv770.h"
>  #include "radeon.h"
> @@ -49,8 +50,6 @@
>  #ifndef BTC_MGCG_SEQUENCE
>  #define BTC_MGCG_SEQUENCE  300
>
> -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
> -
>  extern int ni_mc_load_microcode(struct radeon_device *rdev);
>
>  //********* BARTS **************//
> diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
> index 6d3690bcca2d2..fdddbbaecbb74 100644
> --- a/drivers/gpu/drm/radeon/cypress_dpm.c
> +++ b/drivers/gpu/drm/radeon/cypress_dpm.c
> @@ -26,6 +26,7 @@
>
>  #include "atom.h"
>  #include "cypress_dpm.h"
> +#include "evergreen.h"
>  #include "evergreend.h"
>  #include "r600_dpm.h"
>  #include "rv770.h"
> @@ -44,8 +45,6 @@
>  #define MC_CG_SEQ_YCLK_SUSPEND      0x04
>  #define MC_CG_SEQ_YCLK_RESUME       0x0a
>
> -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
> -
>  static void cypress_enable_bif_dynamic_pcie_gen2(struct radeon_device *rdev,
>                                                  bool enable)
>  {
> diff --git a/drivers/gpu/drm/radeon/evergreen.h b/drivers/gpu/drm/radeon/evergreen.h
> index f8d772e612a48..a829deb8b078a 100644
> --- a/drivers/gpu/drm/radeon/evergreen.h
> +++ b/drivers/gpu/drm/radeon/evergreen.h
> @@ -29,6 +29,7 @@
>  #define __RADEON_EVERGREEN_H__
>
>  struct evergreen_mc_save;
> +struct evergreen_power_info;
>  struct radeon_device;
>
>  bool evergreen_is_display_hung(struct radeon_device *rdev);
> @@ -49,5 +50,6 @@ u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
>  void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
>  u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
>  int evergreen_rlc_resume(struct radeon_device *rdev);
> +struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
>
>  #endif                         /* __RADEON_EVERGREEN_H__ */
> diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
> index d39bbd9793cc2..dd5ef64937230 100644
> --- a/drivers/gpu/drm/radeon/ni_dpm.c
> +++ b/drivers/gpu/drm/radeon/ni_dpm.c
> @@ -26,6 +26,7 @@
>  #include <linux/seq_file.h>
>
>  #include "atom.h"
> +#include "evergreen.h"
>  #include "ni_dpm.h"
>  #include "nid.h"
>  #include "r600_dpm.h"
> @@ -720,8 +721,6 @@ static const u32 cayman_sysls_enable[] =
>  };
>  #define CAYMAN_SYSLS_ENABLE_LENGTH sizeof(cayman_sysls_enable) / (3 * sizeof(u32))
>
> -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
> -
>  extern int ni_mc_load_microcode(struct radeon_device *rdev);
>
>  struct ni_power_info *ni_get_pi(struct radeon_device *rdev)
> diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
> index badd8ac6e038f..ef2f1a048cfed 100644
> --- a/drivers/gpu/drm/radeon/rv770_dpm.c
> +++ b/drivers/gpu/drm/radeon/rv770_dpm.c
> @@ -30,6 +30,7 @@
>  #include "rv770_dpm.h"
>  #include "cypress_dpm.h"
>  #include "atom.h"
> +#include "evergreen.h"
>  #include <linux/seq_file.h>
>
>  #define MC_CG_ARB_FREQ_F0           0x0a
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index 32b697965c064..b4581392fbce9 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -26,6 +26,7 @@
>  #include <linux/seq_file.h>
>
>  #include "atom.h"
> +#include "evergreen.h"
>  #include "r600_dpm.h"
>  #include "rv770.h"
>  #include "radeon.h"
> @@ -1720,8 +1721,6 @@ static const struct si_powertune_data powertune_data_hainan =
>         true
>  };
>
> -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
> -
>  extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>
>  static int si_populate_voltage_value(struct radeon_device *rdev,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes " Lee Jones
@ 2020-11-16 20:29   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:29 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, Slava Grigorev, amd-gfx list, LKML,
	Maling list - DRI developers, Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/dce6_afmt.c:32:5: warning: no previous prototype for ‘dce6_endpoint_rreg’ [-Wmissing-prototypes]
>  32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:46:6: warning: no previous prototype for ‘dce6_endpoint_wreg’ [-Wmissing-prototypes]
>  46 | void dce6_endpoint_wreg(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:110:6: warning: no previous prototype for ‘dce6_afmt_select_pin’ [-Wmissing-prototypes]
>  110 | void dce6_afmt_select_pin(struct drm_encoder *encoder)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:123:6: warning: no previous prototype for ‘dce6_afmt_write_latency_fields’ [-Wmissing-prototypes]
>  123 | void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:152:6: warning: no previous prototype for ‘dce6_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes]
>  152 | void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:177:6: warning: no previous prototype for ‘dce6_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes]
>  177 | void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:202:6: warning: no previous prototype for ‘dce6_afmt_write_sad_regs’ [-Wmissing-prototypes]
>  202 | void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:268:6: warning: no previous prototype for ‘dce6_hdmi_audio_set_dto’ [-Wmissing-prototypes]
>  268 | void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/dce6_afmt.c:287:6: warning: no previous prototype for ‘dce6_dp_audio_set_dto’ [-Wmissing-prototypes]
>  287 | void dce6_dp_audio_set_dto(struct radeo_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Slava Grigorev <slava.grigorev@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/dce6_afmt.c    |  1 +
>  drivers/gpu/drm/radeon/dce6_afmt.h    | 52 +++++++++++++++++++++++++++
>  drivers/gpu/drm/radeon/radeon_audio.c | 17 +--------
>  3 files changed, 54 insertions(+), 16 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/dce6_afmt.h
>
> diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c
> index eec5d7a627388..4a1d5447eac17 100644
> --- a/drivers/gpu/drm/radeon/dce6_afmt.c
> +++ b/drivers/gpu/drm/radeon/dce6_afmt.c
> @@ -22,6 +22,7 @@
>   */
>  #include <linux/hdmi.h>
>
> +#include "dce6_afmt.h"
>  #include "radeon.h"
>  #include "radeon_audio.h"
>  #include "sid.h"
> diff --git a/drivers/gpu/drm/radeon/dce6_afmt.h b/drivers/gpu/drm/radeon/dce6_afmt.h
> new file mode 100644
> index 0000000000000..176a538664a27
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/dce6_afmt.h
> @@ -0,0 +1,52 @@
> +/* dce6_afmt.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 2013 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef __DCE6_AFMT_H__
> +#define __DCE6_AFMT_H__
> +
> +struct cea_sad;
> +struct drm_connector;
> +struct drm_display_mode;
> +struct drm_encoder;
> +struct radeon_crtc;
> +struct radeon_device;
> +
> +u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
> +void dce6_endpoint_wreg(struct radeon_device *rdev, u32 offset, u32 reg, u32 v);
> +void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
> +                             struct cea_sad *sads, int sad_count);
> +void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> +                                            u8 *sadb, int sad_count);
> +void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> +                                          u8 *sadb, int sad_count);
> +void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
> +                                   struct drm_connector *connector,
> +                                   struct drm_display_mode *mode);
> +void dce6_afmt_select_pin(struct drm_encoder *encoder);
> +void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
> +                            struct radeon_crtc *crtc, unsigned int clock);
> +void dce6_dp_audio_set_dto(struct radeon_device *rdev,
> +                          struct radeon_crtc *crtc, unsigned int clock);
> +
> +#endif                         /* __DCE6_AFMT_H__ */
> diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
> index 3cc53db04d645..785c23cb30589 100644
> --- a/drivers/gpu/drm/radeon/radeon_audio.c
> +++ b/drivers/gpu/drm/radeon/radeon_audio.c
> @@ -25,6 +25,7 @@
>  #include <linux/gcd.h>
>
>  #include <drm/drm_crtc.h>
> +#include "dce6_afmt.h"
>  #include "evergreen_hdmi.h"
>  #include "radeon.h"
>  #include "atom.h"
> @@ -34,26 +35,10 @@ void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
>                 u8 enable_mask);
>  void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
>                 u8 enable_mask);
> -u32 dce6_endpoint_rreg(struct radeon_device *rdev, u32 offset, u32 reg);
> -void dce6_endpoint_wreg(struct radeon_device *rdev,
> -               u32 offset, u32 reg, u32 v);
> -void dce6_afmt_write_sad_regs(struct drm_encoder *encoder,
> -               struct cea_sad *sads, int sad_count);
> -void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder,
> -               u8 *sadb, int sad_count);
> -void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder,
> -               u8 *sadb, int sad_count);
> -void dce6_afmt_write_latency_fields(struct drm_encoder *encoder,
> -               struct drm_connector *connector, struct drm_display_mode *mode);
>  struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
>  struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
> -void dce6_afmt_select_pin(struct drm_encoder *encoder);
>  void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
>         struct radeon_crtc *crtc, unsigned int clock);
> -void dce6_hdmi_audio_set_dto(struct radeon_device *rdev,
> -       struct radeon_crtc *crtc, unsigned int clock);
> -void dce6_dp_audio_set_dto(struct radeon_device *rdev,
> -       struct radeon_crtc *crtc, unsigned int clock);
>  void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
>         unsigned char *buffer, size_t size);
>  void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s " Lee Jones
@ 2020-11-16 20:30   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:30 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:37 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/si.c:5678:5: warning: no previous prototype for ‘si_get_csb_size’ [-Wmissing-prototypes]
>  5678 | u32 si_get_csb_size(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/si.c:5710:6: warning: no previous prototype for ‘si_get_csb_buffer’ [-Wmissing-prototypes]
>  5710 | void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer)
>  | ^~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen.c | 3 +--
>  drivers/gpu/drm/radeon/si.h        | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 8fb0b8c3db5b5..4575e448e59df 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -41,6 +41,7 @@
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
>  #include "radeon_ucode.h"
> +#include "si.h"
>
>  #define DC_HPDx_CONTROL(x)        (DC_HPD1_CONTROL     + (x * 0xc))
>  #define DC_HPDx_INT_CONTROL(x)    (DC_HPD1_INT_CONTROL + (x * 0xc))
> @@ -218,8 +219,6 @@ void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
>  void evergreen_program_aspm(struct radeon_device *rdev);
>  void cik_init_cp_pg_table(struct radeon_device *rdev);
>
> -extern u32 si_get_csb_size(struct radeon_device *rdev);
> -extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>  extern u32 cik_get_csb_size(struct radeon_device *rdev);
>  extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>
> diff --git a/drivers/gpu/drm/radeon/si.h b/drivers/gpu/drm/radeon/si.h
> index f483a64d17050..310c58376f927 100644
> --- a/drivers/gpu/drm/radeon/si.h
> +++ b/drivers/gpu/drm/radeon/si.h
> @@ -32,5 +32,7 @@ u32 si_gpu_check_soft_reset(struct radeon_device *rdev);
>  void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
>  void si_rlc_reset(struct radeon_device *rdev);
>  void si_init_uvd_internal_cg(struct radeon_device *rdev);
> +u32 si_get_csb_size(struct radeon_device *rdev);
> +void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>
>  #endif                         /* __SI_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype " Lee Jones
@ 2020-11-16 20:31   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:31 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/cik.c:4845:5: warning: no previous prototype for ‘cik_gpu_check_soft_reset’ [-Wmissing-prototypes]
>  4845 | u32 cik_gpu_check_soft_reset(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.h      | 1 +
>  drivers/gpu/drm/radeon/cik_sdma.c | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
> index 297b3c1ff804f..6630b9da9e7aa 100644
> --- a/drivers/gpu/drm/radeon/cik.h
> +++ b/drivers/gpu/drm/radeon/cik.h
> @@ -29,5 +29,6 @@ void cik_enter_rlc_safe_mode(struct radeon_device *rdev);
>  void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
>  int ci_mc_load_microcode(struct radeon_device *rdev);
>  void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
> +u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
>
>  #endif                         /* __CIK_H__ */
> diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c
> index 3c709ebe8d1ab..919b14845c3c7 100644
> --- a/drivers/gpu/drm/radeon/cik_sdma.c
> +++ b/drivers/gpu/drm/radeon/cik_sdma.c
> @@ -27,14 +27,13 @@
>  #include "radeon_ucode.h"
>  #include "radeon_asic.h"
>  #include "radeon_trace.h"
> +#include "cik.h"
>  #include "cikd.h"
>
>  /* sdma */
>  #define CIK_SDMA_UCODE_SIZE 1050
>  #define CIK_SDMA_UCODE_VERSION 64
>
> -u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
> -
>  /*
>   * sDMA - System DMA
>   * Starting with CIK, the GPU has new asynchronous
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes " Lee Jones
@ 2020-11-16 20:32   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:32 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/cik.c:6413:6: warning: no previous prototype for ‘cik_init_cp_pg_table’ [-Wmissing-prototypes]
>  6413 | void cik_init_cp_pg_table(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik.c:6670:5: warning: no previous prototype for ‘cik_get_csb_size’ [-Wmissing-prototypes]
>  6670 | u32 cik_get_csb_size(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik.c:6702:6: warning: no previous prototype for ‘cik_get_csb_buffer’ [-Wmissing-prototypes]
>  6702 | void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer)
>  | ^~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/cik.h       | 3 +++
>  drivers/gpu/drm/radeon/evergreen.c | 5 +----
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
> index 6630b9da9e7aa..420207d19de52 100644
> --- a/drivers/gpu/drm/radeon/cik.h
> +++ b/drivers/gpu/drm/radeon/cik.h
> @@ -30,5 +30,8 @@ void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
>  int ci_mc_load_microcode(struct radeon_device *rdev);
>  void cik_update_cg(struct radeon_device *rdev, u32 block, bool enable);
>  u32 cik_gpu_check_soft_reset(struct radeon_device *rdev);
> +void cik_init_cp_pg_table(struct radeon_device *rdev);
> +u32 cik_get_csb_size(struct radeon_device *rdev);
> +void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>
>  #endif                         /* __CIK_H__ */
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 4575e448e59df..8e9e88bf1f43d 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -31,6 +31,7 @@
>
>  #include "atom.h"
>  #include "avivod.h"
> +#include "cik.h"
>  #include "ni.h"
>  #include "rv770.h"
>  #include "evergreen.h"
> @@ -217,10 +218,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev);
>  void evergreen_fini(struct radeon_device *rdev);
>  void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
>  void evergreen_program_aspm(struct radeon_device *rdev);
> -void cik_init_cp_pg_table(struct radeon_device *rdev);
> -
> -extern u32 cik_get_csb_size(struct radeon_device *rdev);
> -extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>
>  static const u32 evergreen_golden_registers[] =
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s " Lee Jones
@ 2020-11-16 20:33   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/si_dpm.c:3802:4: warning: no previous prototype for ‘si_get_ddr3_mclk_frequency_ratio’ [-Wmissing-prototypes]
>  3802 | u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/si_dpm.c:3815:4: warning: no previous prototype for ‘si_get_mclk_frequency_ratio’ [-Wmissing-prototypes]
>  3815 | u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/si_dpm.c:3897:6: warning: no previous prototype for ‘si_trim_voltage_table_to_fit_state_table’ [-Wmissing-prototypes]
>  3897 | void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/ci_dpm.c | 6 +-----
>  drivers/gpu/drm/radeon/si_dpm.h | 5 +++++
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
> index a9fc0a552736c..0dfb0ed9af89d 100644
> --- a/drivers/gpu/drm/radeon/ci_dpm.c
> +++ b/drivers/gpu/drm/radeon/ci_dpm.c
> @@ -33,6 +33,7 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_ucode.h"
> +#include "si_dpm.h"
>
>  #define MC_CG_ARB_FREQ_F0           0x0a
>  #define MC_CG_ARB_FREQ_F1           0x0b
> @@ -153,11 +154,6 @@ static const struct ci_pt_config_reg didt_config_ci[] =
>  extern u8 rv770_get_memory_module_index(struct radeon_device *rdev);
>  extern int ni_copy_and_switch_arb_sets(struct radeon_device *rdev,
>                                        u32 arb_freq_src, u32 arb_freq_dest);
> -extern u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock);
> -extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
> -extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
> -                                                    u32 max_voltage_steps,
> -                                                    struct atom_voltage_table *voltage_table);
>  static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev,
>                                          struct atom_voltage_table_entry *voltage_table,
>                                          u16 *std_voltage_hi_sidd, u16 *std_voltage_lo_sidd);
> diff --git a/drivers/gpu/drm/radeon/si_dpm.h b/drivers/gpu/drm/radeon/si_dpm.h
> index 1032a68be792b..aa857906ef93d 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.h
> +++ b/drivers/gpu/drm/radeon/si_dpm.h
> @@ -234,5 +234,10 @@ struct si_power_info {
>  #define SISLANDS_CGULVPARAMETER_DFLT                    0x00040035
>  #define SISLANDS_CGULVCONTROL_DFLT                      0x1f007550
>
> +u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock);
> +u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode);
> +void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev,
> +                                             u32 max_voltage_steps,
> +                                             struct atom_voltage_table *voltage_table);
>
>  #endif
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s prototypes to shared header
  2020-11-16 17:36 ` [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s " Lee Jones
@ 2020-11-16 20:42   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:42 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Christian König,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	Maling list - DRI developers, Alex Deucher, linux-media

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/cik_sdma.c:331:6: warning: no previous prototype for ‘cik_sdma_enable’ [-Wmissing-prototypes]
>  331 | void cik_sdma_enable(struct radeon_device *rdev, bool enable)
>  | ^~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik_sdma.c:528:5: warning: no previous prototype for ‘cik_sdma_resume’ [-Wmissing-prototypes]
>  528 | int cik_sdma_resume(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/cik_sdma.c:557:6: warning: no previous prototype for ‘cik_sdma_fini’ [-Wmissing-prototypes]
>  557 | void cik_sdma_fini(struct radeon_device *rdev)
>  | ^~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c | 3 ---
>  drivers/gpu/drm/radeon/cik.h | 3 +++
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index cef0f3111cd3a..2af76463906ad 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -129,9 +129,6 @@ MODULE_FIRMWARE("radeon/mullins_rlc.bin");
>  MODULE_FIRMWARE("radeon/mullins_sdma.bin");
>
>  static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
> -extern int cik_sdma_resume(struct radeon_device *rdev);
> -extern void cik_sdma_enable(struct radeon_device *rdev, bool enable);
> -extern void cik_sdma_fini(struct radeon_device *rdev);
>  extern void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>  static void cik_rlc_stop(struct radeon_device *rdev);
>  static void cik_pcie_gen3_enable(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/cik.h b/drivers/gpu/drm/radeon/cik.h
> index 420207d19de52..d1bf541da5923 100644
> --- a/drivers/gpu/drm/radeon/cik.h
> +++ b/drivers/gpu/drm/radeon/cik.h
> @@ -34,4 +34,7 @@ void cik_init_cp_pg_table(struct radeon_device *rdev);
>  u32 cik_get_csb_size(struct radeon_device *rdev);
>  void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer);
>
> +int cik_sdma_resume(struct radeon_device *rdev);
> +void cik_sdma_enable(struct radeon_device *rdev, bool enable);
> +void cik_sdma_fini(struct radeon_device *rdev);
>  #endif                         /* __CIK_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype " Lee Jones
@ 2020-11-16 20:43   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:43 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/vce_v1_0.c:102:6: warning: no previous prototype for ‘vce_v1_0_enable_mgcg’ [-Wmissing-prototypes]
>  102 | void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable)
>  | ^~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/si_dpm.c      |  3 +--
>  drivers/gpu/drm/radeon/trinity_dpm.c |  2 +-
>  drivers/gpu/drm/radeon/vce.h         | 34 ++++++++++++++++++++++++++++
>  drivers/gpu/drm/radeon/vce_v1_0.c    |  1 +
>  4 files changed, 37 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/gpu/drm/radeon/vce.h
>
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index b4581392fbce9..cd07b06301b44 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -35,6 +35,7 @@
>  #include "si_dpm.h"
>  #include "si.h"
>  #include "sid.h"
> +#include "vce.h"
>
>  #define MC_CG_ARB_FREQ_F0           0x0a
>  #define MC_CG_ARB_FREQ_F1           0x0b
> @@ -1721,8 +1722,6 @@ static const struct si_powertune_data powertune_data_hainan =
>         true
>  };
>
> -extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
> -
>  static int si_populate_voltage_value(struct radeon_device *rdev,
>                                      const struct atom_voltage_table *table,
>                                      u16 value, SISLANDS_SMC_VOLTAGE_VALUE *voltage);
> diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
> index e005c18aac00e..08ea1c864cb23 100644
> --- a/drivers/gpu/drm/radeon/trinity_dpm.c
> +++ b/drivers/gpu/drm/radeon/trinity_dpm.c
> @@ -29,6 +29,7 @@
>  #include "radeon_asic.h"
>  #include "trinity_dpm.h"
>  #include "trinityd.h"
> +#include "vce.h"
>
>  #define TRINITY_MAX_DEEPSLEEP_DIVIDER_ID 5
>  #define TRINITY_MINIMUM_ENGINE_CLOCK 800
> @@ -293,7 +294,6 @@ static const u32 trinity_override_mgpg_sequences[] =
>         0x00000204, 0x00000000,
>  };
>
> -extern void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>  static void trinity_program_clk_gating_hw_sequence(struct radeon_device *rdev,
>                                                    const u32 *seq, u32 count);
>  static void trinity_override_dynamic_mg_powergating(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/vce.h b/drivers/gpu/drm/radeon/vce.h
> new file mode 100644
> index 0000000000000..1eb4f5715202e
> --- /dev/null
> +++ b/drivers/gpu/drm/radeon/vce.h
> @@ -0,0 +1,34 @@
> +/* vce.h -- Private header for radeon driver -*- linux-c -*-
> + *
> + * Copyright 2013 Advanced Micro Devices, Inc.
> + * All Rights Reserved.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the
> + * "Software"), to deal in the Software without restriction, including
> + * without limitation the rights to use, copy, modify, merge, publish,
> + * distribute, sub license, and/or sell copies of the Software, and to
> + * permit persons to whom the Software is furnished to do so, subject to
> + * the following conditions:
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
> + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
> + * USE OR OTHER DEALINGS IN THE SOFTWARE.
> + *
> + * The above copyright notice and this permission notice (including the
> + * next paragraph) shall be included in all copies or substantial portions
> + * of the Software.
> + */
> +
> +#ifndef __VCE_H__
> +#define __VCE_H__
> +
> +struct radeon_device;
> +
> +void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
> +
> +#endif                         /* __VCE_H__ */
> diff --git a/drivers/gpu/drm/radeon/vce_v1_0.c b/drivers/gpu/drm/radeon/vce_v1_0.c
> index bd75bbcf5bf63..70c5da2141d75 100644
> --- a/drivers/gpu/drm/radeon/vce_v1_0.c
> +++ b/drivers/gpu/drm/radeon/vce_v1_0.c
> @@ -30,6 +30,7 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "sid.h"
> +#include "vce.h"
>
>  #define VCE_V1_0_FW_SIZE       (256 * 1024)
>  #define VCE_V1_0_STACK_SIZE    (64 * 1024)
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s " Lee Jones
@ 2020-11-16 20:45   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:45 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Christian König,
	moderated list:DMA BUFFER SHARING FRAMEWORK,
	Maling list - DRI developers, Alex Deucher, linux-media

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/vce_v2_0.c:111:6: warning: no previous prototype for ‘vce_v2_0_enable_mgcg’ [-Wmissing-prototypes]
>  111 | void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable)
>  | ^~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c      | 2 +-
>  drivers/gpu/drm/radeon/vce.h      | 1 +
>  drivers/gpu/drm/radeon/vce_v2_0.c | 1 +
>  3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index 2af76463906ad..8b7a4f7b75766 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -41,6 +41,7 @@
>  #include "radeon_audio.h"
>  #include "radeon_ucode.h"
>  #include "si.h"
> +#include "vce.h"
>
>  #define SH_MEM_CONFIG_GFX_DEFAULT \
>         ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED)
> @@ -129,7 +130,6 @@ MODULE_FIRMWARE("radeon/mullins_rlc.bin");
>  MODULE_FIRMWARE("radeon/mullins_sdma.bin");
>
>  static u32 cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
> -extern void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>  static void cik_rlc_stop(struct radeon_device *rdev);
>  static void cik_pcie_gen3_enable(struct radeon_device *rdev);
>  static void cik_program_aspm(struct radeon_device *rdev);
> diff --git a/drivers/gpu/drm/radeon/vce.h b/drivers/gpu/drm/radeon/vce.h
> index 1eb4f5715202e..ccc9c00f0d02c 100644
> --- a/drivers/gpu/drm/radeon/vce.h
> +++ b/drivers/gpu/drm/radeon/vce.h
> @@ -30,5 +30,6 @@
>  struct radeon_device;
>
>  void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable);
> +void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable);
>
>  #endif                         /* __VCE_H__ */
> diff --git a/drivers/gpu/drm/radeon/vce_v2_0.c b/drivers/gpu/drm/radeon/vce_v2_0.c
> index d6fde3659e65f..163c9bfc03da8 100644
> --- a/drivers/gpu/drm/radeon/vce_v2_0.c
> +++ b/drivers/gpu/drm/radeon/vce_v2_0.c
> @@ -30,6 +30,7 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "cikd.h"
> +#include "vce.h"
>
>  #define VCE_V2_0_FW_SIZE       (256 * 1024)
>  #define VCE_V2_0_STACK_SIZE    (64 * 1024)
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s prototype to shared header
  2020-11-16 17:36 ` [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s " Lee Jones
@ 2020-11-16 20:46   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:46 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/r600_cs.c:2343:5: warning: no previous prototype for ‘r600_dma_cs_next_reloc’ [-Wmissing-prototypes]
>  2343 | int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
>  | ^~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/evergreen_cs.c | 3 +--
>  drivers/gpu/drm/radeon/r600.h         | 4 ++++
>  drivers/gpu/drm/radeon/r600_cs.c      | 1 +
>  3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
> index 53b75cf201958..0de79f3a7e3ff 100644
> --- a/drivers/gpu/drm/radeon/evergreen_cs.c
> +++ b/drivers/gpu/drm/radeon/evergreen_cs.c
> @@ -28,6 +28,7 @@
>
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "r600.h"
>  #include "evergreend.h"
>  #include "evergreen_reg_safe.h"
>  #include "cayman_reg_safe.h"
> @@ -37,8 +38,6 @@
>
>  #define REG_SAFE_BM_SIZE ARRAY_SIZE(evergreen_reg_safe_bm)
>
> -int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
> -                          struct radeon_bo_list **cs_reloc);
>  struct evergreen_cs_track {
>         u32                     group_size;
>         u32                     nbanks;
> diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
> index e66ef58706cd8..dbdff4568516b 100644
> --- a/drivers/gpu/drm/radeon/r600.h
> +++ b/drivers/gpu/drm/radeon/r600.h
> @@ -28,10 +28,14 @@
>  #ifndef __R600_H__
>  #define __R600_H__
>
> +struct radeon_bo_list;
> +struct radeon_cs_parser;
>  struct radeon_device;
>
>  u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
>  int r600_ih_ring_alloc(struct radeon_device *rdev);
>  void r600_ih_ring_fini(struct radeon_device *rdev);
>
> +int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
> +                          struct radeon_bo_list **cs_reloc);
>  #endif                         /* __R600_H__ */
> diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
> index f20b619466816..dc68e538d5a97 100644
> --- a/drivers/gpu/drm/radeon/r600_cs.c
> +++ b/drivers/gpu/drm/radeon/r600_cs.c
> @@ -29,6 +29,7 @@
>
>  #include "radeon.h"
>  #include "radeon_asic.h"
> +#include "r600.h"
>  #include "r600d.h"
>  #include "r600_reg_safe.h"
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into shared header
  2020-11-16 17:36 ` [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into " Lee Jones
@ 2020-11-16 20:47   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:47 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/r600_hdmi.c:177:6: warning: no previous prototype for ‘r600_hdmi_update_acr’ [-Wmissing-prototypes]
>  177 | void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:217:6: warning: no previous prototype for ‘r600_set_avi_packet’ [-Wmissing-prototypes]
>  217 | void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
>  | ^~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:314:6: warning: no previous prototype for ‘r600_hdmi_audio_set_dto’ [-Wmissing-prototypes]
>  314 | void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:340:6: warning: no previous prototype for ‘r600_set_vbi_packet’ [-Wmissing-prototypes]
>  340 | void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset)
>  | ^~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:351:6: warning: no previous prototype for ‘r600_set_audio_packet’ [-Wmissing-prototypes]
>  351 | void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset)
>  | ^~~~~~~~~~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:393:6: warning: no previous prototype for ‘r600_set_mute’ [-Wmissing-prototypes]
>  393 | void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute)
>  | ^~~~~~~~~~~~~
>  drivers/gpu/drm/radeon/r600_hdmi.c:469:6: warning: no previous prototype for ‘r600_hdmi_enable’ [-Wmissing-prototypes]
>  469 | void r600_hdmi_enable(struct drm_encoder *encoder, bool enable)
>  | ^~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/r600.h         | 17 +++++++++++++++++
>  drivers/gpu/drm/radeon/r600_hdmi.c    |  1 +
>  drivers/gpu/drm/radeon/radeon_audio.c | 13 +------------
>  3 files changed, 19 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r600.h b/drivers/gpu/drm/radeon/r600.h
> index dbdff4568516b..22db13b256195 100644
> --- a/drivers/gpu/drm/radeon/r600.h
> +++ b/drivers/gpu/drm/radeon/r600.h
> @@ -30,12 +30,29 @@
>
>  struct radeon_bo_list;
>  struct radeon_cs_parser;
> +struct r600_audio_pin;
> +struct radeon_crtc;
>  struct radeon_device;
> +struct radeon_hdmi_acr;
>
>  u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
>  int r600_ih_ring_alloc(struct radeon_device *rdev);
>  void r600_ih_ring_fini(struct radeon_device *rdev);
>
> +void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
> +                      u8 enable_mask);
> +void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> +void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
> +void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
> +                            struct radeon_crtc *crtc, unsigned int clock);
> +void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
> +                        unsigned char *buffer, size_t size);
> +void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> +                         const struct radeon_hdmi_acr *acr);
> +void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> +void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
> +
>  int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
>                            struct radeon_bo_list **cs_reloc);
> +
>  #endif                         /* __R600_H__ */
> diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
> index c09549d785b54..f3551ebaa2f08 100644
> --- a/drivers/gpu/drm/radeon/r600_hdmi.c
> +++ b/drivers/gpu/drm/radeon/r600_hdmi.c
> @@ -30,6 +30,7 @@
>  #include "radeon.h"
>  #include "radeon_asic.h"
>  #include "radeon_audio.h"
> +#include "r600.h"
>  #include "r600d.h"
>  #include "atom.h"
>
> diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
> index 785c23cb30589..7c5e80d03fc90 100644
> --- a/drivers/gpu/drm/radeon/radeon_audio.c
> +++ b/drivers/gpu/drm/radeon/radeon_audio.c
> @@ -29,28 +29,17 @@
>  #include "evergreen_hdmi.h"
>  #include "radeon.h"
>  #include "atom.h"
> +#include "r600.h"
>  #include "radeon_audio.h"
>
> -void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
> -               u8 enable_mask);
>  void dce6_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
>                 u8 enable_mask);
>  struct r600_audio_pin* r600_audio_get_pin(struct radeon_device *rdev);
>  struct r600_audio_pin* dce6_audio_get_pin(struct radeon_device *rdev);
> -void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
> -       struct radeon_crtc *crtc, unsigned int clock);
> -void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
> -       unsigned char *buffer, size_t size);
> -void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
> -       const struct radeon_hdmi_acr *acr);
> -void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
> -void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
> -void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
>  static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
>         struct drm_display_mode *mode);
>  static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
>         struct drm_display_mode *mode);
> -void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
>
>  static const u32 pin_offsets[7] =
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to shared header
  2020-11-16 17:37 ` [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to " Lee Jones
@ 2020-11-16 20:50   ` Alex Deucher
  0 siblings, 0 replies; 75+ messages in thread
From: Alex Deucher @ 2020-11-16 20:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Gareth Hughes, Christian König

On Mon, Nov 16, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_prime.c:43:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes]
>  43 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Gareth Hughes <gareth@valinux.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_drv.c   | 4 +---
>  drivers/gpu/drm/radeon/radeon_prime.h | 3 +++
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 211932d73b191..7a0989b397da1 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -55,6 +55,7 @@
>  #include "radeon_ttm.h"
>  #include "radeon.h"
>  #include "radeon_device.h"
> +#include "radeon_prime.h"
>
>  /*
>   * KMS wrapper.
> @@ -129,9 +130,6 @@ int radeon_mode_dumb_mmap(struct drm_file *filp,
>  int radeon_mode_dumb_create(struct drm_file *file_priv,
>                             struct drm_device *dev,
>                             struct drm_mode_create_dumb *args);
> -struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
> -                                                       struct dma_buf_attachment *,
> -                                                       struct sg_table *sg);
>
>  /* atpx handler */
>  #if defined(CONFIG_VGA_SWITCHEROO)
> diff --git a/drivers/gpu/drm/radeon/radeon_prime.h b/drivers/gpu/drm/radeon/radeon_prime.h
> index 11b7f80987834..24ddfd4b48a6d 100644
> --- a/drivers/gpu/drm/radeon/radeon_prime.h
> +++ b/drivers/gpu/drm/radeon/radeon_prime.h
> @@ -35,5 +35,8 @@ int radeon_gem_prime_pin(struct drm_gem_object *obj);
>  void radeon_gem_prime_unpin(struct drm_gem_object *obj);
>  void *radeon_gem_prime_vmap(struct drm_gem_object *obj);
>  void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
> +struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
> +                                                       struct dma_buf_attachment *,
> +                                                       struct sg_table *sg);
>
>  #endif                         /* __RADEON_PRIME_H__ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2020-11-16 20:50 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 17:36 [RESEND v2 00/43] Rid W=1 warnings from GPU Lee Jones
2020-11-16 17:36 ` [PATCH 01/43] drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Lee Jones
2020-11-16 17:36 ` [PATCH 02/43] drm/radeon/radeon: Move prototype into shared header Lee Jones
2020-11-16 17:36 ` [PATCH 03/43] drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to " Lee Jones
2020-11-16 17:36 ` [PATCH 04/43] drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Lee Jones
2020-11-16 17:36 ` [PATCH 05/43] drm/radeon: Move radeon_ttm{init,fini} to shared location Lee Jones
2020-11-16 17:36 ` [PATCH 06/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Lee Jones
2020-11-16 17:36 ` [PATCH 07/43] drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Lee Jones
2020-11-16 17:36 ` [PATCH 08/43] drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Lee Jones
2020-11-16 17:36 ` [PATCH 09/43] drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Lee Jones
2020-11-16 17:36 ` [PATCH 10/43] drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Lee Jones
2020-11-16 17:36 ` [PATCH 11/43] drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Lee Jones
2020-11-16 17:36 ` [PATCH 12/43] drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out " Lee Jones
2020-11-16 17:36 ` [PATCH 13/43] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Lee Jones
2020-11-16 19:51   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 14/43] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into " Lee Jones
2020-11-16 19:55   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 15/43] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes " Lee Jones
2020-11-16 19:56   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 16/43] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to " Lee Jones
2020-11-16 19:58   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 17/43] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI " Lee Jones
2020-11-16 20:01   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 18/43] drm/radeon/rv770: Move 'rv770_get_*()'s " Lee Jones
2020-11-16 20:05   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s into " Lee Jones
2020-11-16 20:09   ` [PATCH 19/43] drm/radeon/ni_dpm: Move 'ni_get_{pi, ps}()'s " Alex Deucher
2020-11-16 17:36 ` [PATCH 20/43] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to " Lee Jones
2020-11-16 20:11   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 21/43] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Lee Jones
2020-11-16 20:13   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header Lee Jones
2020-11-16 20:15   ` [PATCH 22/43] drm/radeon/cik: Move 'r600_ih_ring_{alloc, fini}()'s " Alex Deucher
2020-11-16 17:36 ` [PATCH 23/43] drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype " Lee Jones
2020-11-16 20:16   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 24/43] drm/radeon/r600: Move 'evergreen_rlc_resume()'s " Lee Jones
2020-11-16 20:17   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 25/43] drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s " Lee Jones
2020-11-16 20:18   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 26/43] drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s " Lee Jones
2020-11-16 20:19   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 27/43] drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's " Lee Jones
2020-11-16 20:20   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 28/43] drm/radeon/ci_dpm: Move 'ci_*()'s prototypes " Lee Jones
2020-11-16 20:22   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 29/43] drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype " Lee Jones
2020-11-16 20:24   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 30/43] drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s " Lee Jones
2020-11-16 20:25   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 31/43] drm/radeon/cik: Move 'si_*()'s prototypes " Lee Jones
2020-11-16 20:27   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 32/43] drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype " Lee Jones
2020-11-16 20:28   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 33/43] drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes " Lee Jones
2020-11-16 20:29   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 34/43] drm/radeon/evergreen: Move 'si_get_csb_*()'s " Lee Jones
2020-11-16 20:30   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 35/43] drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype " Lee Jones
2020-11-16 20:31   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 36/43] drm/radeon/evergreen: Move 'cik_*()'s prototypes " Lee Jones
2020-11-16 20:32   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 37/43] drm/radeon/ci_dpm: Move 'si_*()'s " Lee Jones
2020-11-16 20:33   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 38/43] drm/radeon/cik: Move 'Move 'cik_sdma_*()'s " Lee Jones
2020-11-16 20:42   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 39/43] drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype " Lee Jones
2020-11-16 20:43   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 40/43] drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s " Lee Jones
2020-11-16 20:45   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 41/43] drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s " Lee Jones
2020-11-16 20:46   ` Alex Deucher
2020-11-16 17:36 ` [PATCH 42/43] drm/radeon/radeon_audio: Move 'r600_*' prototypes into " Lee Jones
2020-11-16 20:47   ` Alex Deucher
2020-11-16 17:37 ` [PATCH 43/43] drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to " Lee Jones
2020-11-16 20:50   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).