mbox series

[RESEND,v2,00/43] Rid W=1 warnings from GPU

Message ID 20201116173700.1830487-1-lee.jones@linaro.org
Headers show
Series Rid W=1 warnings from GPU | expand

Message

Lee Jones Nov. 16, 2020, 5:36 p.m. UTC
[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>

Comments

Alex Deucher Nov. 16, 2020, 8:15 p.m. UTC | #1
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
Alex Deucher Nov. 16, 2020, 8:45 p.m. UTC | #2
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