drm/amdgpu:fix wb_clear
Subsystems (2)
PATCH 1/1 drm/amdgpu:fix wb_clear
Change-Id I6d50cc769ee29bf13524c83105d5004b0a2d85e3
Signed-off-by Monk Liu <[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
@@ -551,7 +551,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)if (offset < adev->wb.num_wb) {__set_bit (offset, adev->wb.used); - *wb = offset *8 ;/* convert to dw offset */ + *wb = offset <<3 ;/* convert to dw offset */ return 0 ; }else {return -EINVAL ;
@@ -569,7 +569,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)void amdgpu_wb_free (struct amdgpu_device *adev,u32 wb) {if (wb < adev->wb.num_wb) -__clear_bit (wb, adev->wb.used); +__clear_bit (wb >>3 , adev->wb.used); }/**
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): 1508316721-8657-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 2 lines · Monk Liu
Change-Id I6d50cc769ee29bf13524c83105d5004b0a2d85e3Signed-off-by Monk Liu <[email protected]>
Please include a better patch description. Something like:
Properly shift the index when clearing so we clear the right bit.
With that fixed:
Reviewed-by Alex Deucher <[email protected]>
Quoted 29 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 +2
-3@@ -551,7 +551,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)if (offset < adev->wb.num_wb) {__set_bit (offset, adev->wb.used); - *wb = offset *8 ;/* convert to dw offset */ + *wb = offset <<3 ;/* convert to dw offset */ return 0 ; }else {return -EINVAL ;@@ -569,7 +569,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)void amdgpu_wb_free (struct amdgpu_device *adev,u32 wb) {if (wb < adev->wb.num_wb) -__clear_bit (wb, adev->wb.used); +__clear_bit (wb >>3 , adev->wb.used); }/** -- 2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx