aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch')
-rw-r--r--common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch b/common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch
new file mode 100644
index 00000000..86c667f2
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0594-drm-amdgpu-dce10-Move-hotspot-handling-out-of-set_cu.patch
@@ -0,0 +1,91 @@
+From bd38e1fc0ebd33c9bd5c335ff05bfa7f6e3f62d3 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 24 Sep 2015 17:46:19 -0400
+Subject: [PATCH 0594/1050] drm/amdgpu/dce10: Move hotspot handling out of
+ set_cursor
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's only needed in dce10 crtc_cursor_set2.
+
+Port of radeon commit:
+2e007e611bc0a46dfed1547e0228a57f800e703d
+
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 36 ++++++++++++++++------------------
+ 1 file changed, 17 insertions(+), 19 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+index 7c60bd6..681bc3e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+@@ -2555,8 +2555,7 @@ static int dce_v10_0_cursor_move_locked(struct drm_crtc *crtc,
+ return 0;
+ }
+
+-static int dce_v10_0_set_cursor(struct drm_crtc *crtc, struct drm_gem_object *obj,
+- int hot_x, int hot_y)
++static int dce_v10_0_set_cursor(struct drm_crtc *crtc, struct drm_gem_object *obj)
+ {
+ struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
+ struct amdgpu_device *adev = crtc->dev->dev_private;
+@@ -2578,19 +2577,6 @@ static int dce_v10_0_set_cursor(struct drm_crtc *crtc, struct drm_gem_object *ob
+ WREG32(mmCUR_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset,
+ lower_32_bits(gpu_addr));
+
+- if (hot_x != amdgpu_crtc->cursor_hot_x ||
+- hot_y != amdgpu_crtc->cursor_hot_y) {
+- int x, y;
+-
+- x = amdgpu_crtc->cursor_x + amdgpu_crtc->cursor_hot_x - hot_x;
+- y = amdgpu_crtc->cursor_y + amdgpu_crtc->cursor_hot_y - hot_y;
+-
+- dce_v10_0_cursor_move_locked(crtc, x, y);
+-
+- amdgpu_crtc->cursor_hot_x = hot_x;
+- amdgpu_crtc->cursor_hot_y = hot_y;
+- }
+-
+ return 0;
+
+ fail:
+@@ -2646,7 +2632,21 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ amdgpu_crtc->cursor_height = height;
+
+ dce_v10_0_lock_cursor(crtc, true);
+- ret = dce_v10_0_set_cursor(crtc, obj, hot_x, hot_y);
++
++ if (hot_x != amdgpu_crtc->cursor_hot_x ||
++ hot_y != amdgpu_crtc->cursor_hot_y) {
++ int x, y;
++
++ x = amdgpu_crtc->cursor_x + amdgpu_crtc->cursor_hot_x - hot_x;
++ y = amdgpu_crtc->cursor_y + amdgpu_crtc->cursor_hot_y - hot_y;
++
++ dce_v10_0_cursor_move_locked(crtc, x, y);
++
++ amdgpu_crtc->cursor_hot_x = hot_x;
++ amdgpu_crtc->cursor_hot_y = hot_y;
++ }
++
++ ret = dce_v10_0_set_cursor(crtc, obj);
+ if (ret)
+ DRM_ERROR("dce_v10_0_set_cursor returned %d, not changing cursor\n",
+ ret);
+@@ -2681,9 +2681,7 @@ static void dce_v10_0_cursor_reset(struct drm_crtc *crtc)
+ dce_v10_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x,
+ amdgpu_crtc->cursor_y);
+
+- ret = dce_v10_0_set_cursor(crtc, amdgpu_crtc->cursor_bo,
+- amdgpu_crtc->cursor_hot_x,
+- amdgpu_crtc->cursor_hot_y);
++ ret = dce_v10_0_set_cursor(crtc, amdgpu_crtc->cursor_bo);
+ if (ret)
+ DRM_ERROR("dce_v10_0_set_cursor returned %d, not showing "
+ "cursor\n", ret);
+--
+1.9.1
+