mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
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: 312b4dc11d
("drm/amdgpu: Fix VRAM BO swap issue")
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2abe92c7ad
commit
8273b40486
1 changed files with 3 additions and 0 deletions
|
@ -439,6 +439,9 @@ static bool amdgpu_mem_visible(struct amdgpu_device *adev,
|
||||||
while (cursor.remaining) {
|
while (cursor.remaining) {
|
||||||
amdgpu_res_next(&cursor, cursor.size);
|
amdgpu_res_next(&cursor, cursor.size);
|
||||||
|
|
||||||
|
if (!cursor.remaining)
|
||||||
|
break;
|
||||||
|
|
||||||
/* ttm_resource_ioremap only supports contiguous memory */
|
/* ttm_resource_ioremap only supports contiguous memory */
|
||||||
if (end != cursor.start)
|
if (end != cursor.start)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue