diff options
| author | Christian König <[email protected]> | 2019-02-07 10:41:59 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-02-07 19:03:18 +0000 |
| commit | 7fbd31cceac0596c46394ea8745fe09b98d6ed79 (patch) | |
| tree | da3d3f0d3f211d64aabf5d5265335d9cc3c11bf7 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amd/powerplay: add override pcie parameters for Vega20 (v2) (diff) | |
| download | kernel-7fbd31cceac0596c46394ea8745fe09b98d6ed79.tar.gz kernel-7fbd31cceac0596c46394ea8745fe09b98d6ed79.zip | |
drm/amdgpu: fix NULL ptr dref in the VM code
The exclusive fence is of course perfectly optional here.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 1e3a36c90d38..75481cf3348f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1789,9 +1789,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, return r; /* Wait for any BO move to be completed */ - r = dma_fence_wait(exclusive, true); - if (unlikely(r)) - return r; + if (exclusive) { + r = dma_fence_wait(exclusive, true); + if (unlikely(r)) + return r; + } params.func = amdgpu_vm_cpu_set_ptes; params.pages_addr = pages_addr; |
