Skip to contentSkip to conversation

drm/amd/pm: add missing prototypes to amdgpu_dpm_internal

PATCH Applied Maíra Canal 3 participants 3 messages Feb 3, 2022 – Feb 7, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 6ddbd37f ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks()

implementations")

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c | 1 +
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h      | 1 -
 drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c   | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c +1 -0
index ba5f6413412d..42efe838fa85 100644
@@ -25,6 +25,7 @@
 #include "amdgpu_display.h"
 #include "hwmgr.h"
 #include "amdgpu_smu.h"
+#include "amdgpu_dpm_internal.h"
 
 void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +0 -1
index 5cc05110cdae..09790413cbc4 100644
@@ -343,7 +343,6 @@ struct amdgpu_pm {
 	struct amdgpu_ctx       *stable_pstate_ctx;
 };
 
-u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev);
 int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum amd_pp_sensors sensor,
 			   void *data, uint32_t *size);
 
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +1 -0
index 7427c50409d4..caae54487f9c 100644
@@ -28,6 +28,7 @@
 #include "amdgpu_pm.h"
 #include "amdgpu_dpm.h"
 #include "amdgpu_atombios.h"
+#include "amdgpu_dpm_internal.h"
 #include "amd_pcie.h"
 #include "sid.h"
 #include "r600_dpm.h"
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

Thanks for the fix!

Quoted 103 lines

-----Original Message-----
From: Maíra Canal <[email protected]>
Sent: Thursday, February 3, 2022 8:40 AM
To: Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Lazar, Lijo <[email protected]>; Tuikov, Luben <[email protected]>; Chen, Guchun <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH] 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 6ddbd37f ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks()

implementations")

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c | 1 +
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h      | 1 -
 drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c   | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c +1 -0
index ba5f6413412d..42efe838fa85 100644
@@ -25,6 +25,7 @@
 #include "amdgpu_display.h"
 #include "hwmgr.h"
 #include "amdgpu_smu.h"
+#include "amdgpu_dpm_internal.h"
 
 void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +0 -1
index 5cc05110cdae..09790413cbc4 100644
@@ -343,7 +343,6 @@ struct amdgpu_pm {
 	struct amdgpu_ctx       *stable_pstate_ctx;
 };
 
-u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev);
 int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum
 amd_pp_sensors sensor,
 			   void *data, uint32_t *size);
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +1 -1
index 7427c50409d4..caae54487f9c 100644
@@ -28,6 +28,7 @@
 #include "amdgpu_pm.h"
 #include "amdgpu_dpm.h"
 #include "amdgpu_atombios.h"
+#include "amdgpu_dpm_internal.h"
 #include "amd_pcie.h"
 #include "sid.h"
 #include "r600_dpm.h"
--

2.34.1

Applied
#2 lore raw

Applied. Thanks!

Quoted 109 lines · Evan

[AMD Official Use Only]

Thanks for the fix!

Quoted 103 lines

-----Original Message-----
From: Maíra Canal <[email protected]>
Sent: Thursday, February 3, 2022 8:40 AM
To: Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Lazar, Lijo <[email protected]>; Tuikov, Luben <[email protected]>; Chen, Guchun <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH] 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 6ddbd37f ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks()

implementations")

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c | 1 +
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h      | 1 -
 drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c   | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c +1 -0
index ba5f6413412d..42efe838fa85 100644
@@ -25,6 +25,7 @@
 #include "amdgpu_display.h"
 #include "hwmgr.h"
 #include "amdgpu_smu.h"
+#include "amdgpu_dpm_internal.h"
 
 void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +0 -1
index 5cc05110cdae..09790413cbc4 100644
@@ -343,7 +343,6 @@ struct amdgpu_pm {
      struct amdgpu_ctx       *stable_pstate_ctx;
 };
 
-u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev);
 int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum
 amd_pp_sensors sensor,
                         void *data, uint32_t *size);
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +1 -1
index 7427c50409d4..caae54487f9c 100644
@@ -28,6 +28,7 @@
 #include "amdgpu_pm.h"
 #include "amdgpu_dpm.h"
 #include "amdgpu_atombios.h"
+#include "amdgpu_dpm_internal.h"
 #include "amd_pcie.h"
 #include "sid.h"
 #include "r600_dpm.h"
--

2.34.1