* [PATCH] drm/amd/pm: add missing prototypes to amdgpu_dpm_internal
@ 2022-02-03 0:39 Maíra Canal
2022-02-07 3:30 ` Quan, Evan
0 siblings, 1 reply; 3+ messages in thread
From: Maíra Canal @ 2022-02-03 0:39 UTC (permalink / raw)
To: evan.quan, alexander.deucher, christian.koenig, Xinhui.Pan,
airlied, daniel, nathan, ndesaulniers, lijo.lazar, luben.tuikov,
guchun.chen, Hawking.Zhang, jiapeng.chong
Cc: amd-gfx, dri-devel, linux-kernel
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")
Signed-off-by: Maíra Canal <maira.canal@usp.br>
---
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(-)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c
index ba5f6413412d..42efe838fa85 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c
@@ -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)
{
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
index 5cc05110cdae..09790413cbc4 100644
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
@@ -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);
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index 7427c50409d4..caae54487f9c 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [PATCH] drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-03 0:39 [PATCH] drm/amd/pm: add missing prototypes to amdgpu_dpm_internal Maíra Canal @ 2022-02-07 3:30 ` Quan, Evan 2022-02-07 21:17 ` Alex Deucher 0 siblings, 1 reply; 3+ messages in thread From: Quan, Evan @ 2022-02-07 3:30 UTC (permalink / raw) To: Maíra Canal, Deucher, Alexander, Koenig, Christian, Pan, Xinhui, airlied, daniel, nathan, ndesaulniers, Lazar, Lijo, Tuikov, Luben, Chen, Guchun, Zhang, Hawking, jiapeng.chong Cc: amd-gfx, dri-devel, linux-kernel [AMD Official Use Only] Thanks for the fix! Reviewed-by: Evan Quan <evan.quan@amd.com> > -----Original Message----- > From: Maíra Canal <maira.canal@usp.br> > Sent: Thursday, February 3, 2022 8:40 AM > To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander > <Alexander.Deucher@amd.com>; Koenig, Christian > <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; > airlied@linux.ie; daniel@ffwll.ch; nathan@kernel.org; > ndesaulniers@google.com; Lazar, Lijo <Lijo.Lazar@amd.com>; Tuikov, Luben > <Luben.Tuikov@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; > Zhang, Hawking <Hawking.Zhang@amd.com>; > jiapeng.chong@linux.alibaba.com > Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- > kernel@vger.kernel.org > 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") > > Signed-off-by: Maíra Canal <maira.canal@usp.br> > --- > 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(-) > > diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > index ba5f6413412d..42efe838fa85 100644 > --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > @@ -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) > { > diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > index 5cc05110cdae..09790413cbc4 100644 > --- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > +++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > @@ -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); > > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > index 7427c50409d4..caae54487f9c 100644 > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > @@ -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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-07 3:30 ` Quan, Evan @ 2022-02-07 21:17 ` Alex Deucher 0 siblings, 0 replies; 3+ messages in thread From: Alex Deucher @ 2022-02-07 21:17 UTC (permalink / raw) To: Quan, Evan Cc: Maíra Canal, Deucher, Alexander, Koenig, Christian, Pan, Xinhui, airlied, daniel, nathan, ndesaulniers, Lazar, Lijo, Tuikov, Luben, Chen, Guchun, Zhang, Hawking, jiapeng.chong, dri-devel, amd-gfx, linux-kernel Applied. Thanks! On Sun, Feb 6, 2022 at 10:30 PM Quan, Evan <Evan.Quan@amd.com> wrote: > > [AMD Official Use Only] > > Thanks for the fix! > Reviewed-by: Evan Quan <evan.quan@amd.com> > > > -----Original Message----- > > From: Maíra Canal <maira.canal@usp.br> > > Sent: Thursday, February 3, 2022 8:40 AM > > To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander > > <Alexander.Deucher@amd.com>; Koenig, Christian > > <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; > > airlied@linux.ie; daniel@ffwll.ch; nathan@kernel.org; > > ndesaulniers@google.com; Lazar, Lijo <Lijo.Lazar@amd.com>; Tuikov, Luben > > <Luben.Tuikov@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; > > Zhang, Hawking <Hawking.Zhang@amd.com>; > > jiapeng.chong@linux.alibaba.com > > Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- > > kernel@vger.kernel.org > > 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") > > > > Signed-off-by: Maíra Canal <maira.canal@usp.br> > > --- > > 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(-) > > > > diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > > b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > > index ba5f6413412d..42efe838fa85 100644 > > --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > > +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm_internal.c > > @@ -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) > > { > > diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > > b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > > index 5cc05110cdae..09790413cbc4 100644 > > --- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > > +++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h > > @@ -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); > > > > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > > b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > > index 7427c50409d4..caae54487f9c 100644 > > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > > @@ -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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-07 21:17 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-02-03 0:39 [PATCH] drm/amd/pm: add missing prototypes to amdgpu_dpm_internal Maíra Canal 2022-02-07 3:30 ` Quan, Evan 2022-02-07 21:17 ` Alex Deucher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®