FAILED: patch "[PATCH] drm/amd/pm: disable cstate feature for gpu reset scenario" failed to apply to 6.1-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Possible dependencies:
b31d6ada8346 ("drm/amd/pm: disable cstate feature for gpu reset scenario")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b31d6ada8346574ce04656e5ce9676ec763f5144 Mon Sep 17 00:00:00 2001
From: Evan Quan <[email protected]>
Date: Thu, 29 Sep 2022 10:50:44 +0800
Subject: [PATCH] drm/amd/pm: disable cstate feature for gpu reset scenario
Suggested by PMFW team and same as what did for gfxoff feature. This can address some Mode1Reset failures observed on SMU13.0.0.
Signed-off-by Evan Quan <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
Cc [email protected] # 6.0.x
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -0
@@ -2928,6 +2928,14 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE ); +/* +* Per PMFW team's suggestion, driver needs to handle gfxoff +* and df cstate features disablement for gpu reset(e.g. Mode1Reset) +* scenario. Add the missing df cstate disablement here. +*/ +if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) +dev_warn (adev->dev,"Failed to disallow df cstate" ); +for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid)continue ;
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +8 -0
@@ -2242,9 +2242,17 @@ static void arcturus_get_unique_id(struct smu_context *smu)static int arcturus_set_df_cstate (struct smu_context *smu,enum pp_df_cstate state) { +struct amdgpu_device *adev = smu->adev;uint32_t smu_version;int ret; +/* +* Arcturus does not need the cstate disablement +* prerequisite for gpu reset. +*/ +if (amdgpu_in_reset (adev) || adev->in_suspend) +return 0 ; + ret =smu_cmn_get_smc_version (smu,NULL , &smu_version);if (ret) {dev_err (smu->adev->dev,"Failed to get smu version!\n" );
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +9 -0
@@ -1640,6 +1640,15 @@ static bool aldebaran_is_baco_supported(struct smu_context *smu)static int aldebaran_set_df_cstate (struct smu_context *smu,enum pp_df_cstate state) { +struct amdgpu_device *adev = smu->adev; + +/* +* Aldebaran does not need the cstate disablement +* prerequisite for gpu reset. +*/ +if (amdgpu_in_reset (adev) || adev->in_suspend) +return 0 ; +return smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_DFCstateControl, state,NULL ); }