* [PATCH] drm/amdgpu: fix VM handling for GART allocations
@ 2021-06-05 14:51 Christian König
2021-06-07 8:59 ` Das, Nirmoy
0 siblings, 1 reply; 2+ messages in thread
From: Christian König @ 2021-06-05 14:51 UTC (permalink / raw)
To: amd-gfx, nirmoy.das, Agustin.Gutierrez
For GTT allocations with a GART address the res contains the VMID0
addresses and can't be used for VM handling.
So ignore the res when the pages array is given or we fill the page
tables with nonsense.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index c29fad97b63a..433642b3e498 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1705,8 +1705,8 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
if (r)
goto error_unlock;
- amdgpu_res_first(res, offset, (last - start + 1) * AMDGPU_GPU_PAGE_SIZE,
- &cursor);
+ amdgpu_res_first(pages_addr ? NULL : res, offset,
+ (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, &cursor);
while (cursor.remaining) {
uint64_t tmp, num_entries, addr;
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: fix VM handling for GART allocations
2021-06-05 14:51 [PATCH] drm/amdgpu: fix VM handling for GART allocations Christian König
@ 2021-06-07 8:59 ` Das, Nirmoy
0 siblings, 0 replies; 2+ messages in thread
From: Das, Nirmoy @ 2021-06-07 8:59 UTC (permalink / raw)
To: Christian König, amd-gfx, Agustin.Gutierrez
Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>
On 6/5/2021 4:51 PM, Christian König wrote:
> For GTT allocations with a GART address the res contains the VMID0
> addresses and can't be used for VM handling.
>
> So ignore the res when the pages array is given or we fill the page
> tables with nonsense.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index c29fad97b63a..433642b3e498 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1705,8 +1705,8 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
> if (r)
> goto error_unlock;
>
> - amdgpu_res_first(res, offset, (last - start + 1) * AMDGPU_GPU_PAGE_SIZE,
> - &cursor);
> + amdgpu_res_first(pages_addr ? NULL : res, offset,
> + (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, &cursor);
> while (cursor.remaining) {
> uint64_t tmp, num_entries, addr;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-07 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 14:51 [PATCH] drm/amdgpu: fix VM handling for GART allocations Christian König
2021-06-07 8:59 ` Das, Nirmoy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.