]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amd/powerplay: Make declarations of functions exposed to DAL type-safe.
authorDavid Rokhvarg <David.Rokhvarg@amd.com>
Mon, 14 Dec 2015 15:51:39 +0000 (10:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 21:13:59 +0000 (16:13 -0500)
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h

index fd56af6e92d415e49c41a780a60cf9e4784e5bef..9b7c2862c16e5a3f4a0b7a632c8f9e610bafcdba 100644 (file)
@@ -750,10 +750,10 @@ int amd_powerplay_fini(void *handle)
 
 /* export this function to DAL */
 
-int amd_powerplay_display_configuration_change(void *handle, const void *input)
+int amd_powerplay_display_configuration_change(void *handle,
+       const struct amd_pp_display_configuration *display_config)
 {
        struct pp_hwmgr  *hwmgr;
-       const struct amd_pp_display_configuration *display_config = input;
 
        PP_CHECK((struct pp_instance *)handle);
 
@@ -780,14 +780,13 @@ int amd_powerplay_get_display_power_level(void *handle,
 }
 
 int amd_powerplay_get_current_clocks(void *handle,
-               void *output)
+               struct amd_pp_clock_info *clocks)
 {
        struct pp_hwmgr  *hwmgr;
        struct amd_pp_simple_clock_info simple_clocks;
        struct pp_clock_info hw_clocks;
-       struct amd_pp_clock_info *clocks = (struct amd_pp_clock_info *)output;
 
-       if (handle == NULL || output == NULL)
+       if (handle == NULL || clocks == NULL)
                return -EINVAL;
 
        hwmgr = ((struct pp_instance *)handle)->hwmgr;
@@ -839,12 +838,10 @@ int amd_powerplay_get_clock_by_type(void *handle, enum amd_pp_clock_type type, s
        return result;
 }
 
-int amd_powerplay_get_display_mode_validation_clocks(void *handle, const void *input,
-                                                       void *output)
+int amd_powerplay_get_display_mode_validation_clocks(void *handle,
+               struct amd_pp_simple_clock_info *clocks)
 {
        int result = -1;
-
-       struct amd_pp_simple_clock_info *clocks = output;
        struct pp_hwmgr  *hwmgr;
 
        if (handle == NULL || clocks == NULL)
index d0aeb14f625633f52923615c98ba6e79c07bd54e..7255f7ddf93a288feb6c6f4166c5f3d3a7187cae 100644 (file)
@@ -349,18 +349,23 @@ struct amd_powerplay {
 
 int amd_powerplay_init(struct amd_pp_init *pp_init,
                       struct amd_powerplay *amd_pp);
+
 int amd_powerplay_fini(void *handle);
 
-int amd_powerplay_display_configuration_change(void *handle, const void *input);
+int amd_powerplay_display_configuration_change(void *handle,
+               const struct amd_pp_display_configuration *input);
 
 int amd_powerplay_get_display_power_level(void *handle,
                struct amd_pp_simple_clock_info *output);
 
-int amd_powerplay_get_current_clocks(void *handle, void *output);
+int amd_powerplay_get_current_clocks(void *handle,
+               struct amd_pp_clock_info *output);
 
-int amd_powerplay_get_clock_by_type(void *handle, enum amd_pp_clock_type type, struct amd_pp_clocks *clocks);
+int amd_powerplay_get_clock_by_type(void *handle,
+               enum amd_pp_clock_type type,
+               struct amd_pp_clocks *clocks);
 
-int amd_powerplay_get_display_mode_validation_clocks(void *handle, const void *input,
-                                                       void *output);
+int amd_powerplay_get_display_mode_validation_clocks(void *handle,
+               struct amd_pp_simple_clock_info *output);
 
 #endif /* _AMD_POWERPLAY_H_ */