Commit 96316211 authored by Yifan Zhang's avatar Yifan Zhang Committed by Alex Deucher

drm/amdkfd: Don't drain ih1 for APU

ih1 is not initialized for APUs. Don't drain it or NULL pointer
error will be triggered.

Fixes: 6ef29715 ("drm/amdkfd: Change kfd/svm page fault drain handling")
Signed-off-by: default avatarYifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1125f95c
...@@ -2464,11 +2464,14 @@ svm_range_unmap_from_cpu(struct mm_struct *mm, struct svm_range *prange, ...@@ -2464,11 +2464,14 @@ svm_range_unmap_from_cpu(struct mm_struct *mm, struct svm_range *prange,
adev = pdd->dev->adev; adev = pdd->dev->adev;
/* Check and drain ih1 ring if cam not available */ /* Check and drain ih1 ring if cam not available */
ih = &adev->irq.ih1; if (adev->irq.ih1.ring_size) {
checkpoint_wptr = amdgpu_ih_get_wptr(adev, ih); ih = &adev->irq.ih1;
if (ih->rptr != checkpoint_wptr) { checkpoint_wptr = amdgpu_ih_get_wptr(adev, ih);
svms->checkpoint_ts[i] = amdgpu_ih_decode_iv_ts(adev, ih, checkpoint_wptr, -1); if (ih->rptr != checkpoint_wptr) {
continue; svms->checkpoint_ts[i] =
amdgpu_ih_decode_iv_ts(adev, ih, checkpoint_wptr, -1);
continue;
}
} }
/* check if dev->irq.ih_soft is not empty */ /* check if dev->irq.ih_soft is not empty */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment