mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
drm/amdgpu: resume kiq access debugfs
If there is no GPU hang, user still can access debugfs through kiq. Signed-off-by: Yintian Tao <yttao@amd.com> Reviewed-by: Monk Liu <Monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
6952e99cfd
commit
d32709dac6
@@ -335,17 +335,23 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
|
||||
}
|
||||
}
|
||||
|
||||
bool amdgpu_virt_can_access_debugfs(struct amdgpu_device *adev)
|
||||
bool amdgpu_virt_access_debugfs_is_mmio(struct amdgpu_device *adev)
|
||||
{
|
||||
return amdgpu_sriov_is_debug(adev) ? true : false;
|
||||
}
|
||||
|
||||
bool amdgpu_virt_access_debugfs_is_kiq(struct amdgpu_device *adev)
|
||||
{
|
||||
return amdgpu_sriov_is_normal(adev) ? true : false;
|
||||
}
|
||||
|
||||
int amdgpu_virt_enable_access_debugfs(struct amdgpu_device *adev)
|
||||
{
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
if (!amdgpu_sriov_vf(adev) ||
|
||||
amdgpu_virt_access_debugfs_is_kiq(adev))
|
||||
return 0;
|
||||
|
||||
if (amdgpu_virt_can_access_debugfs(adev))
|
||||
if (amdgpu_virt_access_debugfs_is_mmio(adev))
|
||||
adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME;
|
||||
else
|
||||
return -EPERM;
|
||||
|
||||
Reference in New Issue
Block a user