AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/amdgpu: fix braces in amdgpu_vm_update_ptes
@ 2020-01-30 12:49 Christian König
  2020-01-30 12:49 ` [PATCH 2/5] drm/amdgpu: return EINVAL instead of ENOENT in the VM code Christian König
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Christian König @ 2020-01-30 12:49 UTC (permalink / raw)
  To: amd-gfx

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 <christian.koenig@amd.com>
Tested-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 5cb182231f5d..4ba6a5e5d094 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);
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-31 11:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-30 12:49 [PATCH 1/5] drm/amdgpu: fix braces in amdgpu_vm_update_ptes Christian König
2020-01-30 12:49 ` [PATCH 2/5] drm/amdgpu: return EINVAL instead of ENOENT in the VM code Christian König
2020-01-30 22:18   ` Felix Kuehling
2020-01-30 12:49 ` [PATCH 3/5] drm/amdgpu: allow higher level PD invalidations Christian König
2020-01-30 22:17   ` Felix Kuehling
2020-01-30 12:49 ` [PATCH 4/5] drm/amdgpu: simplify and fix amdgpu_sync_resv Christian König
2020-01-30 22:34   ` Felix Kuehling
2020-01-30 12:49 ` [PATCH 5/5] drm/amdgpu: rework synchronization of VM updates v4 Christian König
2020-01-30 22:42   ` Felix Kuehling
2020-01-30 22:11 ` [PATCH 1/5] drm/amdgpu: fix braces in amdgpu_vm_update_ptes Felix Kuehling
2020-01-31 11:58   ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox