RE: [PATCH] drm/amd/pm: skip PrepareMp1ForUnload message in s0ix

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

 



[AMD Official Use Only]

Thanks update this patch and remove APU flag for avoiding over protection in this case.

Reviewed-by: Prike Liang <Prike.Liang@xxxxxxx>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Shyam Sundar S K
> Sent: Monday, June 28, 2021 3:55 PM
> To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian
> <Christian.Koenig@xxxxxxx>; airlied@xxxxxxxx; daniel@xxxxxxxx; Huang, Ray
> <Ray.Huang@xxxxxxx>; Hou, Xiaomeng (Matthew)
> <Xiaomeng.Hou@xxxxxxx>; Liu, Aaron <Aaron.Liu@xxxxxxx>
> Cc: S-k, Shyam-sundar <Shyam-sundar.S-k@xxxxxxx>; dri-
> devel@xxxxxxxxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH] drm/amd/pm: skip PrepareMp1ForUnload message in s0ix
>
> The documentation around PrepareMp1ForUnload message says that
> anything sent to SMU after this command would be stalled as the PMFW
> would not be in a state to take further job requests.
>
> Technically this is right in case of S3 scenario. But, this might not be the case
> during s0ix as the PMC driver would be the last to send the SMU on the
> OS_HINT. If SMU gets a PrepareMp1ForUnload message before the OS_HINT,
> this would stall the entire S0ix process.
>
> Results show that, this message to SMU is not required during S0ix and hence
> skip it.
>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
> Acked-by: Huang Rui <ray.huang@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> index 7664334d8144..18a1ffdca227 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> @@ -189,10 +189,11 @@ static int yellow_carp_init_smc_tables(struct
> smu_context *smu)  static int yellow_carp_system_features_control(struct
> smu_context *smu, bool en)  {
>       struct smu_feature *feature = &smu->smu_feature;
> +     struct amdgpu_device *adev = smu->adev;
>       uint32_t feature_mask[2];
>       int ret = 0;
>
> -     if (!en)
> +     if (!en && !adev->in_s0ix)
>               ret = smu_cmn_send_smc_msg(smu,
> SMU_MSG_PrepareMp1ForUnload, NULL);
>
>       bitmap_zero(feature->enabled, feature->feature_num);
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
> reedesktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&amp;data=04%7C01%7CPrike.Liang%40amd.com%7C05062eb7dd9c4520
> b28d08d93a0a0c5e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7
> C637604637106550264%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd
> ata=fyo4FgXkxaRWWPEAMufdXj0f2aom%2Fhz8nE%2FZP1AM7Wo%3D&amp;
> reserved=0

<<attachment: winmail.dat>>


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux