AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Asad Kamal <asad.kamal@amd.com>,
	amd-gfx@lists.freedesktop.org, KevinYang.Wang@amd.com
Cc: le.ma@amd.com, shiwu.zhang@amd.com, hawking.zhang@amd.com
Subject: Re: [PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6
Date: Fri, 18 Aug 2023 16:58:26 +0530	[thread overview]
Message-ID: <fdb66994-436e-e852-e289-7654364e2baa@amd.com> (raw)
In-Reply-To: <20230818110055.1231261-1-asad.kamal@amd.com>



On 8/18/2023 4:30 PM, Asad Kamal wrote:
> Critical Temperature needs to be reported in
> millidegree Celsius.
> 
> Signed-off-by: Asad Kamal <asad.kamal@amd.com>

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

Thanks,
Lijo

> ---
>   drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> index 7d8af9b309b7..d3b578e6bc2a 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
> @@ -2086,7 +2086,7 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,
>   						     struct smu_temperature_range *range)
>   {
>   	struct amdgpu_device *adev = smu->adev;
> -	u32 aid_temp, xcd_temp;
> +	u32 aid_temp, xcd_temp, mem_temp;
>   	uint32_t smu_version;
>   	u32 ccd_temp = 0;
>   	int ret;
> @@ -2119,13 +2119,14 @@ static int smu_v13_0_6_get_thermal_temperature_range(struct smu_context *smu,
>   	if (ret)
>   		goto failed;
>   
> -	range->hotspot_crit_max = max3(aid_temp, xcd_temp, ccd_temp);
> +	range->hotspot_crit_max = max3(aid_temp, xcd_temp, ccd_temp) *
> +				       SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
>   	ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GetCTFLimit,
> -					      PPSMC_HBM_THM_TYPE, &range->mem_crit_max);
> +					      PPSMC_HBM_THM_TYPE, &mem_temp);
>   	if (ret)
>   		goto failed;
>   
> -	return 0;
> +	range->mem_crit_max = mem_temp * SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
>   failed:
>   	return ret;
>   }

      parent reply	other threads:[~2023-08-18 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 11:00 [PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6 Asad Kamal
2023-08-18 11:24 ` Wang, Yang(Kevin)
2023-08-18 11:28 ` Lazar, Lijo [this message]

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=fdb66994-436e-e852-e289-7654364e2baa@amd.com \
    --to=lijo.lazar@amd.com \
    --cc=KevinYang.Wang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=asad.kamal@amd.com \
    --cc=hawking.zhang@amd.com \
    --cc=le.ma@amd.com \
    --cc=shiwu.zhang@amd.com \
    /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