Skip to content

Commit

Permalink
drm/amdgpu: fix total size calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian König authored and Alex Deucher committed Jul 31, 2018
1 parent ba7f478 commit 275105c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
struct amdgpu_bo *oa_obj = adev->gds.oa_gfx_bo;

unsigned last_entry = 0, first_userptr = num_entries;
uint64_t total_size = 0;
unsigned i;
int r;
unsigned long total_size = 0;

array = kvmalloc_array(num_entries, sizeof(struct amdgpu_bo_list_entry), GFP_KERNEL);
if (!array)
Expand Down

0 comments on commit 275105c

Please sign in to comment.