Am 22.03.19 um 06:30 schrieb Monk Liu:
should use amdgpu_bo_map, otherwise you'll hit NULL
pointer bug if with amdgpu_bo_kptr

Yeah that is a known problem. NAK to this one cause that would map the BO at the wrong time.

But in general I have a proper fix for this in the pipeline.

Christian.


Signed-off-by: Monk Liu <monk....@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
index 9d53982..1fb6295a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
@@ -76,8 +76,10 @@ static int amdgpu_vm_cpu_update(struct 
amdgpu_vm_update_params *p,
  {
        unsigned int i;
        uint64_t value;
+       void *ptr;
- pe += (unsigned long)amdgpu_bo_kptr(bo);
+       amdgpu_bo_kmap(bo, &ptr);
+       pe += (unsigned long)ptr;
trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags);

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to