[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR12MB3344EFEEA62F1FC0CE238F2CE4CE0@MN2PR12MB3344.namprd12.prod.outlook.com>
Date: Tue, 16 Jul 2019 01:00:02 +0000
From: "Quan, Evan" <Evan.Quan@....com>
To: Nathan Chancellor <natechancellor@...il.com>,
Arnd Bergmann <arnd@...db.de>
CC: "Deucher, Alexander" <Alexander.Deucher@....com>,
"Koenig, Christian" <Christian.Koenig@....com>,
"Zhou, David(ChunMing)" <David1.Zhou@....com>,
"Wentland, Harry" <Harry.Wentland@....com>,
"Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
Rex Zhu <rex.zhu@....com>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
"Wang, Kevin(Yang)" <Kevin1.Wang@....com>
Subject: RE: [PATCH 6/7] drm/amd/powerplay: Use proper enums in
vega20_print_clk_levels
Thanks! This is reviewed-by: Evan Quan <evan.quan@....com>
Regards
Evan
> -----Original Message-----
> From: Nathan Chancellor <natechancellor@...il.com>
> Sent: Monday, July 15, 2019 11:40 PM
> To: Arnd Bergmann <arnd@...db.de>
> Cc: Deucher, Alexander <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Zhou, David(ChunMing)
> <David1.Zhou@....com>; Wentland, Harry <Harry.Wentland@....com>;
> Li, Sun peng (Leo) <Sunpeng.Li@....com>; Rex Zhu <rex.zhu@....com>;
> Quan, Evan <Evan.Quan@....com>; David Airlie <airlied@...ux.ie>; Daniel
> Vetter <daniel@...ll.ch>; amd-gfx list <amd-gfx@...ts.freedesktop.org>; dri-
> devel <dri-devel@...ts.freedesktop.org>; Linux Kernel Mailing List <linux-
> kernel@...r.kernel.org>; clang-built-linux <clang-built-
> linux@...glegroups.com>; Wang, Kevin(Yang) <Kevin1.Wang@....com>
> Subject: Re: [PATCH 6/7] drm/amd/powerplay: Use proper enums in
> vega20_print_clk_levels
>
> On Mon, Jul 15, 2019 at 11:25:29AM +0200, Arnd Bergmann wrote:
> > On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor
> > <natechancellor@...il.com> wrote:
> > >
> > > clang warns:
> > >
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > > ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1016:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > > ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1031:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > > ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
> > >
> > > The values are mapped one to one in vega20_get_smu_clk_index so just
> > > use the proper enums here.
> > >
> > > Fixes: 096761014227 ("drm/amd/powerplay: support sysfs to get
> > > socclk, fclk, dcefclk")
> > > Link: https://github.com/ClangBuiltLinux/linux/issues/587
> > > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> > > ---
> >
> > Adding Kevin Wang for further review, as he sent a related patch in
> > d36893362d22 ("drm/amd/powerplay: fix smu clock type change miss
> > error")
> >
> > I assume this one is still required as it triggers the same warning.
> > Kevin, can you have a look?
> >
> > Arnd
>
> Indeed, this one and https://github.com/ClangBuiltLinux/linux/issues/586
> are still outstanding.
>
> https://patchwork.freedesktop.org/patch/315581/
>
> Cheers,
> Nathan
>
> >
> > > drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > index 0f14fe14ecd8..e62dd6919b24 100644
> > > --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > @@ -992,7 +992,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > > break;
> > >
> > > case SMU_SOCCLK:
> > > - ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now);
> > > + ret = smu_get_current_clk_freq(smu, SMU_SOCCLK,
> > > + &now);
> > > if (ret) {
> > > pr_err("Attempt to get current socclk Failed!");
> > > return ret;
> > > @@ -1013,7 +1013,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > > break;
> > >
> > > case SMU_FCLK:
> > > - ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now);
> > > + ret = smu_get_current_clk_freq(smu, SMU_FCLK, &now);
> > > if (ret) {
> > > pr_err("Attempt to get current fclk Failed!");
> > > return ret;
> > > @@ -1028,7 +1028,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > > break;
> > >
> > > case SMU_DCEFCLK:
> > > - ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now);
> > > + ret = smu_get_current_clk_freq(smu, SMU_DCEFCLK,
> > > + &now);
> > > if (ret) {
> > > pr_err("Attempt to get current dcefclk Failed!");
> > > return ret;
Powered by blists - more mailing lists