From: Huang Rui <ray.huang@amd.com>
To: "Yu, Lang" <Lang.Yu@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Lazar, Lijo" <Lijo.Lazar@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/amd/pm: use existing fini_smc_tables function for cyan skillfish
Date: Mon, 24 Jan 2022 15:55:34 +0800 [thread overview]
Message-ID: <Ye5bdqT5wZuxV7Bg@amd.com> (raw)
In-Reply-To: <20220124064342.273055-2-Lang.Yu@amd.com>
On Mon, Jan 24, 2022 at 02:43:42PM +0800, Yu, Lang wrote:
> Remove redundant code and use general smu_v11_0_fini_smc_tables function.
>
> Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> .../amd/pm/swsmu/smu11/cyan_skillfish_ppt.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
> index 665905a568eb..a2b72d19a400 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
> @@ -125,22 +125,6 @@ static int cyan_skillfish_init_smc_tables(struct smu_context *smu)
> return smu_v11_0_init_smc_tables(smu);
> }
>
> -static int cyan_skillfish_finit_smc_tables(struct smu_context *smu)
> -{
> - struct smu_table_context *smu_table = &smu->smu_table;
> -
> - kfree(smu_table->metrics_table);
> - smu_table->metrics_table = NULL;
> -
> - kfree(smu_table->gpu_metrics_table);
> - smu_table->gpu_metrics_table = NULL;
> - smu_table->gpu_metrics_table_size = 0;
> -
> - smu_table->metrics_time = 0;
> -
> - return 0;
> -}
> -
> static int
> cyan_skillfish_get_smu_metrics_data(struct smu_context *smu,
> MetricsMember_t member,
> @@ -567,7 +551,7 @@ static const struct pptable_funcs cyan_skillfish_ppt_funcs = {
> .init_power = smu_v11_0_init_power,
> .fini_power = smu_v11_0_fini_power,
> .init_smc_tables = cyan_skillfish_init_smc_tables,
> - .fini_smc_tables = cyan_skillfish_finit_smc_tables,
> + .fini_smc_tables = smu_v11_0_fini_smc_tables,
> .read_sensor = cyan_skillfish_read_sensor,
> .print_clk_levels = cyan_skillfish_print_clk_levels,
> .is_dpm_running = cyan_skillfish_is_dpm_running,
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-01-24 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 6:43 [PATCH 1/2] drm/amd/pm: add get_dpm_ultimate_freq function for cyan skillfish Lang Yu
2022-01-24 6:43 ` [PATCH 2/2] drm/amd/pm: use existing fini_smc_tables " Lang Yu
2022-01-24 7:55 ` Huang Rui [this message]
2022-01-24 7:52 ` [PATCH 1/2] drm/amd/pm: add get_dpm_ultimate_freq " Huang Rui
2022-01-24 7:58 ` Lazar, Lijo
2022-01-24 8:18 ` Lang Yu
2022-01-24 8:30 ` Lazar, Lijo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ye5bdqT5wZuxV7Bg@amd.com \
--to=ray.huang@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Lang.Yu@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox