aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-07-30 09:33:34 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-31 17:58:16 -0400
commit275105ce7be37a2cc80eb1b60e6526355f54df94 (patch)
treef314bc4bcdd7038bbf96fa83c752e4c95f6e96ae /drivers/gpu/drm/amd
parentba7f47831ebdad141791be53a51049d6771156cd (diff)
drm/amdgpu: fix total size calculation
long might only be 32bit in size and we can easily use more than 4GB here. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
index 944868e47119..6728448167ba 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
@@ -105,9 +105,9 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
105 struct amdgpu_bo *oa_obj = adev->gds.oa_gfx_bo; 105 struct amdgpu_bo *oa_obj = adev->gds.oa_gfx_bo;
106 106
107 unsigned last_entry = 0, first_userptr = num_entries; 107 unsigned last_entry = 0, first_userptr = num_entries;
108 uint64_t total_size = 0;
108 unsigned i; 109 unsigned i;
109 int r; 110 int r;
110 unsigned long total_size = 0;
111 111
112 array = kvmalloc_array(num_entries, sizeof(struct amdgpu_bo_list_entry), GFP_KERNEL); 112 array = kvmalloc_array(num_entries, sizeof(struct amdgpu_bo_list_entry), GFP_KERNEL);
113 if (!array) 113 if (!array)