mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu: fix the clearing wb size
The clearing wb size should be the one that it is assigned. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e11ddff68a
commit
60a970a6c5
|
@ -475,7 +475,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);
|
||||
|
@ -488,7 +488,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;
|
||||
|
|
Loading…
Reference in New Issue