aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch
new file mode 100644
index 00000000..95c73cd0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2040-drm-amdgpu-fix-wb_clear.patch
@@ -0,0 +1,40 @@
+From 6e96f13398d5b7ac8d9efc72d4e85d945ca4b0e3 Mon Sep 17 00:00:00 2001
+From: Monk Liu <Monk.Liu@amd.com>
+Date: Tue, 17 Oct 2017 19:18:56 +0800
+Subject: [PATCH 2040/4131] drm/amdgpu:fix wb_clear
+
+Properly shift the index when clearing so we clear
+the right bit
+
+Change-Id: I6d50cc769ee29bf13524c83105d5004b0a2d85e3
+Signed-off-by: Monk Liu <Monk.Liu@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@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 2131134..199bb88 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -547,7 +547,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;
+@@ -565,7 +565,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
+