diff options
| author | Christian König <[email protected]> | 2020-01-30 12:09:07 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-02-05 04:30:39 +0000 |
| commit | bfcd6c69e4c3f73f2f92b997983537f9a3ac3b29 (patch) | |
| tree | ed9d183c1fb138de46a2787977ada43d6c6a1a93 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amdgpu: make sure to never allocate PDs/PTs for invalidations (diff) | |
| download | kernel-bfcd6c69e4c3f73f2f92b997983537f9a3ac3b29.tar.gz kernel-bfcd6c69e4c3f73f2f92b997983537f9a3ac3b29.zip | |
drm/amdgpu: fix parentheses in amdgpu_vm_update_ptes
For the root PD mask can be 0xffffffff as well which would
overrun to 0 if we don't cast it before we add one.
Signed-off-by: Christian König <[email protected]>
Tested-by: Tom St Denis <[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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index b40c01794795..60da830863da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1487,7 +1487,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params, incr = (uint64_t)AMDGPU_GPU_PAGE_SIZE << shift; mask = amdgpu_vm_entries_mask(adev, cursor.level); pe_start = ((cursor.pfn >> shift) & mask) * 8; - entry_end = (uint64_t)(mask + 1) << shift; + entry_end = ((uint64_t)mask + 1) << shift; entry_end += cursor.pfn & ~(entry_end - 1); entry_end = min(entry_end, end); |
