[PATCH 69/85] drivers: gpu: Move prototype declarations to header file si_dpm.h

Rashika Kheria rashika.kheria at gmail.com
Mon Jan 6 08:33:03 PST 2014


Move prototype declarations of functions
si_get_ddr3_mclk_frequency_ratio(), si_get_mclk_frequency_ratio()
and si_trim_voltage_table_to_fit_state_table() to header file
drm/radeon/si_dpm.h because they are used by more than one file.

This eliminates the following warnings from drm/radeon/si_dpm.c:
drivers/gpu/drm/radeon/si_dpm.c:3698:4: warning: no previous prototype for ‘si_get_ddr3_mclk_frequency_ratio’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_dpm.c:3711:4: warning: no previous prototype for ‘si_get_mclk_frequency_ratio’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_dpm.c:3793:6: warning: no previous prototype for ‘si_trim_voltage_table_to_fit_state_table’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria at gmail.com>
Reviewed-by: Josh Triplett <josh at joshtriplett.org>
---
 drivers/gpu/drm/radeon/ci_dpm.c |    6 +-----
 drivers/gpu/drm/radeon/si_dpm.h |    7 +++++++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index 899c843..7b3c412 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -27,6 +27,7 @@
 #include "cikd.h"
 #include "r600_dpm.h"
 #include "ci_dpm.h"
+#include "si_dpm.h"
 #include "atom.h"
 #include <linux/seq_file.h>
 
@@ -165,11 +166,6 @@ extern void btc_get_max_clock_from_voltage_dependency_table(struct radeon_clock_
 							    u32 *max_clock);
 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,
diff --git a/drivers/gpu/drm/radeon/si_dpm.h b/drivers/gpu/drm/radeon/si_dpm.h
index 4ce5032..7c65e55 100644
--- a/drivers/gpu/drm/radeon/si_dpm.h
+++ b/drivers/gpu/drm/radeon/si_dpm.h
@@ -194,6 +194,13 @@ struct si_power_info {
 	PP_SIslands_PAPMParameters papm_parm;
 };
 
+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);
+
+
 #define SISLANDS_INITIAL_STATE_ARB_INDEX    0
 #define SISLANDS_ACPI_STATE_ARB_INDEX       1
 #define SISLANDS_ULV_STATE_ARB_INDEX        2
-- 
1.7.9.5



More information about the dri-devel mailing list