Skip to content

Commit f54b6bd

Browse files
mairacanalalexdeucher
authored andcommitted
drm/amd/pm: add missing prototypes to amdgpu_dpm_internal
Include the header with the prototype to silence the following clang warnings: drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_dpm_internal.c:29:6: warning: no previous prototype for function 'amdgpu_dpm_get_active_displays' [-Wmissing-prototypes] void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev) ^ drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_dpm_internal.c:29:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev) ^ static drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_dpm_internal.c:76:5: warning: no previous prototype for function 'amdgpu_dpm_get_vrefresh' [-Wmissing-prototypes] u32 amdgpu_dpm_get_vrefresh(struct amdgpu_device *adev) ^ drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_dpm_internal.c:76:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u32 amdgpu_dpm_get_vrefresh(struct amdgpu_device *adev) ^ static 2 warnings generated. Besides that, remove the duplicated prototype of the function amdgpu_dpm_get_vblank_time in order to keep the consistency of the headers. Fixes: 6ddbd37 ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations") Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6cbdf12 commit f54b6bd

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "amdgpu_display.h"
2626
#include "hwmgr.h"
2727
#include "amdgpu_smu.h"
28+
#include "amdgpu_dpm_internal.h"
2829

2930
void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev)
3031
{

drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ struct amdgpu_pm {
343343
struct amdgpu_ctx *stable_pstate_ctx;
344344
};
345345

346-
u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev);
347346
int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum amd_pp_sensors sensor,
348347
void *data, uint32_t *size);
349348

drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "amdgpu_pm.h"
2929
#include "amdgpu_dpm.h"
3030
#include "amdgpu_atombios.h"
31+
#include "amdgpu_dpm_internal.h"
3132
#include "amd_pcie.h"
3233
#include "sid.h"
3334
#include "r600_dpm.h"

0 commit comments

Comments
 (0)