RE: [PATCH 12/16] drm/amd/powerplay: better namings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: Alex Deucher <alexdeucher@xxxxxxxxx>
Sent: Friday, June 5, 2020 5:07 AM
To: Quan, Evan <Evan.Quan@xxxxxxx>
Cc: amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: Re: [PATCH 12/16] drm/amd/powerplay: better namings

On Thu, Jun 4, 2020 at 12:47 AM Evan Quan <evan.quan@xxxxxxx> wrote:
>
> And some minor changes as dropping unused parameter and label internal
> used API as static.
>
> Change-Id: I0af0aea029dc4fc7d8e150ab6ec984e9a5f1a74a
> Signed-off-by: Evan Quan <evan.quan@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c     | 12 +++++-------
>  drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h |  2 --
>  2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index b3410d111316..55ffbf1cf086 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -638,7 +638,7 @@ int smu_sys_set_pp_table(struct smu_context *smu,  void *buf, size_t size)
>         return ret;
>  }
>
> -int smu_feature_init_dpm(struct smu_context *smu)
> +static int smu_get_driver_allowed_feature_mask(struct smu_context
> +*smu)
>  {
>         struct smu_feature *feature = &smu->smu_feature;
>         int ret = 0;
> @@ -662,7 +662,6 @@ int smu_feature_init_dpm(struct smu_context *smu)
>         return ret;
>  }
>
> -
>  int smu_feature_is_enabled(struct smu_context *smu, enum
> smu_feature_mask mask)  {
>         struct smu_feature *feature = &smu->smu_feature; @@ -1115,8
> +1114,7 @@ static int smu_sw_fini(void *handle)
>         return 0;
>  }
>
> -static int smu_smc_table_hw_init(struct smu_context *smu,
> -                                bool initialize)
> +static int smu_internal_hw_setup(struct smu_context *smu)

The "internal" in the name made me think this was related to someting in smu_internal.h.  Maybe call it smu_smc_hw_setup()?  I guess I could go either way.

[Quan, Evan] Thanks. This and other comments were addressed on code submitted.
Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

>  {
>         struct amdgpu_device *adev = smu->adev;
>         int ret;
> @@ -1287,11 +1285,11 @@ static int smu_hw_init(void *handle)
>         if (ret)
>                 return ret;
>
> -       ret = smu_feature_init_dpm(smu);
> +       ret = smu_get_driver_allowed_feature_mask(smu);
>         if (ret)
>                 goto failed;
>
> -       ret = smu_smc_table_hw_init(smu, true);
> +       ret = smu_internal_hw_setup(smu);
>         if (ret)
>                 goto failed;
>
> @@ -1487,7 +1485,7 @@ static int smu_resume(void *handle)
>                 goto failed;
>         }
>
> -       ret = smu_smc_table_hw_init(smu, false);
> +       ret = smu_internal_hw_setup(smu);
>         if (ret)
>                 goto failed;
>
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> index b2de042493ad..5f5a210668a1 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> @@ -656,8 +656,6 @@ extern const struct amd_ip_funcs smu_ip_funcs;
> extern const struct amdgpu_ip_block_version smu_v11_0_ip_block;
> extern const struct amdgpu_ip_block_version smu_v12_0_ip_block;
>
> -extern int smu_feature_init_dpm(struct smu_context *smu);
> -
>  extern int smu_feature_is_enabled(struct smu_context *smu,
>                                   enum smu_feature_mask mask);  extern
> int smu_feature_set_enabled(struct smu_context *smu,
> --
> 2.27.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cev
> an.quan%40amd.com%7Cc40db198d5ce43d1c5f408d808cb414c%7C3dd8961fe4884e6
> 08e11a82d994e183d%7C0%7C0%7C637269016367160396&amp;sdata=XQbV2yqVdKZZY
> fM0j%2FZWQe2U53ik6untquO4FRp2OEU%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux