Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a970a6 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amdgpu: fix the clearing wb size



The clearing wb size should be the one that it is assigned.

Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e11ddff6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;