]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix size calculation in amdgpu_ttm_copy_mem_to_mem
authorChristian König <christian.koenig@amd.com>
Fri, 3 Apr 2020 13:56:12 +0000 (15:56 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 20:20:30 +0000 (16:20 -0400)
commit3c66e8d491caf3c11e0c1d5ee4c7650e382765ab
treeca0e95b2cabc7ca620e355f8b067dfc7180109ee
parentff08b77a494bb68f2e8cfb74bf117e78a2fa182b
drm/amdgpu: fix size calculation in amdgpu_ttm_copy_mem_to_mem

When the node is larger than 4GB we overrun the size calculation.

Fix this by correctly limiting the size to the window as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c