[PATCH 1/9] drm/amdgpu: fix total size calculation

Huang Rui ray.huang at amd.com
Tue Jul 31 02:34:14 UTC 2018


On Mon, Jul 30, 2018 at 04:51:51PM +0200, Christian König wrote:
> long might only be 32bit in size and we can easily use more than 4GB
> here.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>

Acked-by: Huang Rui <ray.huang at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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,
>  	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)
> -- 
> 2.14.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list