projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9113a0f
)
drm/amdgpu: Use correct size when access vram
author
xinhui pan
<xinhui.pan@amd.com>
Mon, 22 Mar 2021 00:48:54 +0000
(08:48 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:39:49 +0000
(16:39 -0400)
To make size is 4 byte aligned. Use &~0x3ULL instead of &3ULL.
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index
8f98103
..
07e72d8
100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@
-1503,7
+1503,7
@@
static int amdgpu_ttm_access_memory(struct ttm_buffer_object *bo,
memcpy(buf, &value, bytes);
}
} else {
- bytes = cursor.size &
0x3ull
;
+ bytes = cursor.size &
~0x3ULL
;
amdgpu_device_vram_access(adev, cursor.start,
(uint32_t *)buf, bytes,
write);