[PATCH 3/4] drm/amd/powerplay: add function declarations

Baoyou Xie baoyou.xie at linaro.org
Sun Sep 25 08:19:05 UTC 2016


We get 6 warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:177:5: warning: no previous prototype for 'tonga_notify_smc_display_change' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:3238:5: warning: no previous prototype for 'tonga_get_mc_microcode_version' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:3252:5: warning: no previous prototype for 'tonga_initializa_dynamic_state_adjustment_rule_settings' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:5855:5: warning: no previous prototype for 'tonga_notify_smc_display_config_after_ps_adjustment' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:5594:5: warning: no previous prototype for 'fiji_hwmgr_init' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/eventmgr/eventtasks.c:322:5: warning: no previous prototype for 'pem_task_enable_clock_power_gating' [-Wmissing-prototypes]

In fact, these functions are undeclared in any files.

So this patch declares them in
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h,
drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h,
drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h.

Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org>
---
 drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h | 2 ++
 drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h    | 1 +
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h   | 6 ++++++
 3 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h
index 6c6297e..7e6fb48 100644
--- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h
+++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h
@@ -58,6 +58,8 @@ int pem_task_un_block_hw_access(struct pp_eventmgr *eventmgr, struct pem_event_d
 int pem_task_reset_display_phys_access(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
 int pem_task_set_cpu_power_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
 int pem_task_notify_smc_display_config_after_power_state_adjustment(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
+int pem_task_enable_clock_power_gating(struct pp_eventmgr *eventmgr,
+		struct pem_event_data *event_data);
 /*powersaving*/
 
 int pem_task_set_power_source(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h
index bf67c2a..c37f9e8 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h
@@ -346,5 +346,6 @@ int fiji_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate);
 int fiji_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate);
 int fiji_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate);
 int fiji_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable);
+int fiji_hwmgr_init(struct pp_hwmgr *hwmgr);
 
 #endif /* _FIJI_HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
index 3a91fc2..be5e10a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
@@ -398,4 +398,10 @@ int tonga_enable_disable_uvd_dpm(struct pp_hwmgr *hwmgr, bool enable);
 int tonga_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable);
 uint32_t tonga_get_xclk(struct pp_hwmgr *hwmgr);
 
+int
+tonga_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr);
+int tonga_get_mc_microcode_version(struct pp_hwmgr *hwmgr);
+int tonga_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr);
+int tonga_notify_smc_display_change(struct pp_hwmgr *hwmgr, bool has_display);
+
 #endif
-- 
2.7.4



More information about the dri-devel mailing list