drm/amdgpu: fix the clearing wb size
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix the clearing wb size
The clearing wb size should be the one that it is assigned.
Signed-off-by Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -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 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1489563033-15984-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 15.03.2017 um 08:30 schrieb Huang Rui:
Quoted 3 lines
The clearing wb size should be the one that it is assigned.
Signed-off-by Huang Rui <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -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);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_wb_init(struct amdgpu_device *adev) · line 570
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -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 ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx