diff mbox series

[37/43] drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header

Message ID 20201116173700.1830487-38-lee.jones@linaro.org
State Accepted
Commit 5e7c91d2791e0b8669c198ea3114d37d6e2d9404
Headers show
Series Rid W=1 warnings from GPU | expand

Commit Message

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

Comments

Alex Deucher Nov. 16, 2020, 8:33 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/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
diff mbox series

Patch

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