mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/pm: add support for checking SDMA reset capability
This patch introduces a new function to check if the SMU supports resetting the SDMA engine. This capability check ensures that the driver does not attempt to reset the SDMA engine on hardware that does not support it. The following changes are included: - New function `amdgpu_dpm_reset_sdma_is_supported` to check SDMA reset support at the AMDGPU driver level. - New function `smu_reset_sdma_is_supported` to check SDMA reset support at the SMU level. - Implementation of `smu_v13_0_6_reset_sdma_is_supported` for the specific SMU version v13.0.6. - Updated `smu_v13_0_6_reset_sdma` to use the new capability check before attempting to reset the SDMA engine. v2: change smu_reset_sdma_is_supported type to bool (Tim) Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Tim Huang <tim.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
8225254492
commit
d190e4d0f7
@@ -722,6 +722,29 @@ int amdgpu_dpm_send_rma_reason(struct amdgpu_device *adev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_dpm_reset_sdma_is_supported - Check if SDMA reset is supported
|
||||
* @adev: amdgpu_device pointer
|
||||
*
|
||||
* This function checks if the SMU supports resetting the SDMA engine.
|
||||
* It returns false if the hardware does not support software SMU or
|
||||
* if the feature is not supported.
|
||||
*/
|
||||
bool amdgpu_dpm_reset_sdma_is_supported(struct amdgpu_device *adev)
|
||||
{
|
||||
struct smu_context *smu = adev->powerplay.pp_handle;
|
||||
bool ret;
|
||||
|
||||
if (!is_support_sw_smu(adev))
|
||||
return false;
|
||||
|
||||
mutex_lock(&adev->pm.mutex);
|
||||
ret = smu_reset_sdma_is_supported(smu);
|
||||
mutex_unlock(&adev->pm.mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int amdgpu_dpm_reset_sdma(struct amdgpu_device *adev, uint32_t inst_mask)
|
||||
{
|
||||
struct smu_context *smu = adev->powerplay.pp_handle;
|
||||
|
||||
Reference in New Issue
Block a user