aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch')
-rw-r--r--common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch b/common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch
new file mode 100644
index 00000000..b6e77ef4
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0016-amdgpu-gfxv8-Simplification-in-gfx_v8_0_enable_gui_i.patch
@@ -0,0 +1,44 @@
+From 8b58a7e84ac160e687c8a184833c4d6210125dd2 Mon Sep 17 00:00:00 2001
+From: Tom St Denis <tom.stdenis@amd.com>
+Date: Tue, 1 Dec 2015 10:42:28 -0500
+Subject: [PATCH 0016/1110] amdgpu/gfxv8: Simplification in
+ gfx_v8_0_enable_gui_idle_interrupt()
+
+Simplified the function by folding the two paths into one.
+
+Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+index 38f960c..0446565 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+@@ -2818,17 +2818,11 @@ static void gfx_v8_0_enable_gui_idle_interrupt(struct amdgpu_device *adev,
+ {
+ u32 tmp = RREG32(mmCP_INT_CNTL_RING0);
+
+- if (enable) {
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_BUSY_INT_ENABLE, 1);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_EMPTY_INT_ENABLE, 1);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CMP_BUSY_INT_ENABLE, 1);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, GFX_IDLE_INT_ENABLE, 1);
+- } else {
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_BUSY_INT_ENABLE, 0);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_EMPTY_INT_ENABLE, 0);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CMP_BUSY_INT_ENABLE, 0);
+- tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, GFX_IDLE_INT_ENABLE, 0);
+- }
++ tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_BUSY_INT_ENABLE, enable ? 1 : 0);
++ tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_EMPTY_INT_ENABLE, enable ? 1 : 0);
++ tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CMP_BUSY_INT_ENABLE, enable ? 1 : 0);
++ tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, GFX_IDLE_INT_ENABLE, enable ? 1 : 0);
++
+ WREG32(mmCP_INT_CNTL_RING0, tmp);
+ }
+
+--
+2.7.4
+