diff options
| author | Arunpravin Paneer Selvam <[email protected]> | 2022-10-18 14:08:38 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-10-18 18:52:49 +0000 |
| commit | df768a9770271b0d9faab25f42dfc7bdec87b21c (patch) | |
| tree | cfdfd6a696963747673f329b4e7f059603ddef3f /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
| parent | drm/amdgpu: dequeue mes scheduler during fini (diff) | |
| download | kernel-df768a9770271b0d9faab25f42dfc7bdec87b21c.tar.gz kernel-df768a9770271b0d9faab25f42dfc7bdec87b21c.zip | |
drm/amdgpu: Fix for BO move issue
A user reported a bug on CAPE VERDE system where uvd_v3_1
IP component failed to initialize as there is an issue with
BO move code from one memory to other.
In function amdgpu_mem_visible() called by amdgpu_bo_move(),
when there are no blocks to compare or if we have a single
block then break the loop.
Fixes: 312b4dc11d4f ("drm/amdgpu: Fix VRAM BO swap issue")
Signed-off-by: Arunpravin Paneer Selvam <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 8782fc6bcd2c..0de9bc12793d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -439,6 +439,9 @@ static bool amdgpu_mem_visible(struct amdgpu_device *adev, while (cursor.remaining) { amdgpu_res_next(&cursor, cursor.size); + if (!cursor.remaining) + break; + /* ttm_resource_ioremap only supports contiguous memory */ if (end != cursor.start) return false; |
