[PATCH] drm/amdgpu: fix the clearing wb size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 15.03.2017 um 08:30 schrieb Huang Rui:
> The clearing wb size should be the one that it is assigned.
>
> Signed-off-by: Huang Rui <ray.huang at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index b0ac610..b0e0471 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -550,7 +550,7 @@ static int amdgpu_wb_init(struct amdgpu_device *adev)
>   	int r;
>   
>   	if (adev->wb.wb_obj == NULL) {
> -		r = amdgpu_bo_create_kernel(adev, AMDGPU_MAX_WB * 4,
> +		r = amdgpu_bo_create_kernel(adev, AMDGPU_MAX_WB * sizeof(uint32_t),
>   					    PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
>   					    &adev->wb.wb_obj, &adev->wb.gpu_addr,
>   					    (void **)&adev->wb.wb);
> @@ -564,7 +564,7 @@ static int amdgpu_wb_init(struct amdgpu_device *adev)
>   		memset(&adev->wb.used, 0, sizeof(adev->wb.used));
>   
>   		/* clear wb memory */
> -		memset((char *)adev->wb.wb, 0, AMDGPU_GPU_PAGE_SIZE);
> +		memset((char *)adev->wb.wb, 0, AMDGPU_MAX_WB * sizeof(uint32_t));
>   	}
>   
>   	return 0;




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux