mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
drm/amdkfd: avoid PTL confused warning message
PTL is a special feature for gfxv9.4.4, but the warning is always appearing on other ASICs when rocprof is running, it causes confusion, so move hw_supported check earlier to avoid it. Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4e9c8a9c32
commit
b78bd145e4
|
|
@ -1783,9 +1783,6 @@ static int kfd_ptl_control(struct kfd_process_device *pdd, bool enable)
|
|||
uint32_t ptl_state = enable ? 1 : 0;
|
||||
int ret;
|
||||
|
||||
if (!ptl->hw_supported)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!pdd->dev->kfd2kgd || !pdd->dev->kfd2kgd->ptl_ctrl)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
|
@ -1804,6 +1801,9 @@ int kfd_ptl_disable_request(struct kfd_process_device *pdd,
|
|||
struct amdgpu_ptl *ptl = &adev->psp.ptl;
|
||||
int ret = 0;
|
||||
|
||||
if (!ptl->hw_supported)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&ptl->mutex);
|
||||
|
||||
if (pdd->ptl_disable_req)
|
||||
|
|
@ -1833,6 +1833,9 @@ int kfd_ptl_disable_release(struct kfd_process_device *pdd,
|
|||
struct amdgpu_ptl *ptl = &adev->psp.ptl;
|
||||
int ret = 0;
|
||||
|
||||
if (!ptl->hw_supported)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&ptl->mutex);
|
||||
|
||||
if (!pdd->ptl_disable_req)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user