Revert "drm/amdgpu: Only update the CUR_SIZE register when necessary"
Subsystems (2)
PATCH 1/1 Revert "drm/amdgpu: Only update the CUR_SIZE register when necessary"
From: Michel Dänzer <[email protected]>
This reverts commits 7c83d7abc9997cf1efac2c0ce384b5e8453ee870 and a1f49cc179ce6b7b7758ae3ff5cdb138d0ee0f56.
They caused the HW cursor to disappear under various circumstances in the wild. I wasn't able to reproduce any of them, and I'm not sure what's going on. But those changes aren't a big deal anyway, so let's just revert for now.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191291
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99143
--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 22 +++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 22 +++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 24 +++++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 22 +++++++--------------- 4 files changed, 30 insertions(+), 60 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +7 -15
@@ -2513,6 +2513,8 @@ static int dce_v10_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); +WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width -1 ) <<16 ) | (amdgpu_crtc->cursor_height -1 ));return 0 ; }
@@ -2538,7 +2540,6 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;int ret;
@@ -2579,7 +2580,9 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v10_0_lock_cursor (crtc, true); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;
@@ -2588,16 +2591,10 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v10_0_cursor_move_locked (crtc, x, y); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }dce_v10_0_show_cursor (crtc);
@@ -2621,7 +2618,6 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,static void dce_v10_0_cursor_reset (struct drm_crtc *crtc) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {dce_v10_0_lock_cursor (crtc, true);
@@ -2629,10 +2625,6 @@ 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); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v10_0_show_cursor (crtc);dce_v10_0_lock_cursor (crtc, false);
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +7 -15
@@ -2533,6 +2533,8 @@ static int dce_v11_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); +WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width -1 ) <<16 ) | (amdgpu_crtc->cursor_height -1 ));return 0 ; }
@@ -2558,7 +2560,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;int ret;
@@ -2599,7 +2600,9 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v11_0_lock_cursor (crtc, true); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;
@@ -2608,16 +2611,10 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v11_0_cursor_move_locked (crtc, x, y); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }dce_v11_0_show_cursor (crtc);
@@ -2641,7 +2638,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,static void dce_v11_0_cursor_reset (struct drm_crtc *crtc) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {dce_v11_0_lock_cursor (crtc, true);
@@ -2649,10 +2645,6 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc)dce_v11_0_cursor_move_locked (crtc, amdgpu_crtc->cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v11_0_show_cursor (crtc);dce_v11_0_lock_cursor (crtc, false);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +9 -15
@@ -1859,6 +1859,8 @@ static int dce_v6_0_cursor_move_locked(struct drm_crtc *crtc,struct amdgpu_device *adev = crtc->dev->dev_private;int xorigin =0 , yorigin =0 ; +int w = amdgpu_crtc->cursor_width; + amdgpu_crtc->cursor_x = x; amdgpu_crtc->cursor_y = y;
@@ -1878,6 +1880,8 @@ static int dce_v6_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); +WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((w -1 ) <<16 ) | (amdgpu_crtc->cursor_height -1 ));return 0 ; }
@@ -1903,7 +1907,6 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;int ret;
@@ -1944,7 +1947,9 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v6_0_lock_cursor (crtc, true); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;
@@ -1953,16 +1958,10 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v6_0_cursor_move_locked (crtc, x, y); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }dce_v6_0_show_cursor (crtc);
@@ -1986,7 +1985,6 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,static void dce_v6_0_cursor_reset (struct drm_crtc *crtc) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {dce_v6_0_lock_cursor (crtc, true);
@@ -1994,10 +1992,6 @@ static void dce_v6_0_cursor_reset(struct drm_crtc *crtc)dce_v6_0_cursor_move_locked (crtc, amdgpu_crtc->cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v6_0_show_cursor (crtc);dce_v6_0_lock_cursor (crtc, false); }
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +7 -15
@@ -2364,6 +2364,8 @@ static int dce_v8_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); +WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width -1 ) <<16 ) | (amdgpu_crtc->cursor_height -1 ));return 0 ; }
@@ -2389,7 +2391,6 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;int ret;
@@ -2430,7 +2431,9 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v8_0_lock_cursor (crtc, true); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;
@@ -2439,16 +2442,10 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,dce_v8_0_cursor_move_locked (crtc, x, y); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }dce_v8_0_show_cursor (crtc);
@@ -2472,7 +2469,6 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,static void dce_v8_0_cursor_reset (struct drm_crtc *crtc) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {dce_v8_0_lock_cursor (crtc, true);
@@ -2480,10 +2476,6 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc)dce_v8_0_cursor_move_locked (crtc, amdgpu_crtc->cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v8_0_show_cursor (crtc);dce_v8_0_lock_cursor (crtc, false);
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170111093625.10254-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Acked-by Alex DeucherQuoted 14 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, January 11, 2017 4:36 AM
To: [email protected]
Cc: Harald Judt; Johannes Hirte
Subject: [PATCH] Revert "drm/amdgpu: Only update theCUR_SIZEregister when necessary"From: Michel Dänzer <[email protected]>
This reverts commits
7c83d7abc9997cf1efac2c0ce384b5e8453ee870anda1f49cc179ce6b7b7758ae3ff5cdb138d0ee0f56.
Quoted 8 lines
They caused the HW cursor to disappear under various circumstances in the wild. I wasn't able to reproduce any of them, and I'm not sure what's going on. But those changes aren't a big deal anyway, so let's just revert for now.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191291
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99143Signed-off-by Michel Dänzer <[email protected]>
Quoted 339 lines
--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 22 +++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 22 +++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 24 +++++++++--------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 22 +++++++--------------- 4 files changed, 30 insertions(+), 60 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +2
-0@@ -2513,6 +2513,8 @@ static int dce_v10_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); + WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width - 1) << 16) | (amdgpu_crtc-Quoted 1 line
cursor_height- 1));drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-1return 0 ; }@@ -2538,7 +2540,6 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +5
-9int ret;@@ -2579,7 +2580,9 @@ static int dce_v10_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v10_0_lock_cursor (crtc ,true ); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;@@ -2588,16 +2591,10 @@ static int dce_v10_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v10_0_cursor_move_locked (crtc ,x ,y ); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-1dce_v10_0_show_cursor (crtc);@@ -2621,7 +2618,6 @@ static int dce_v10_0_crtc_cursor_set2(structdrm_crtc *crtc, static void dce_v10_0_cursor_reset(struct drm_crtc *crtc) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-4dce_v10_0_lock_cursor (crtc, true);@@ -2629,10 +2625,6 @@ 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); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); - dce_v10_0_show_cursor(crtc);drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0
-0dce_v10_0_lock_cursor (crtc, false);drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +2
-0@@ -2533,6 +2533,8 @@ static int dce_v11_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); + WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width - 1) << 16) | (amdgpu_crtc-Quoted 1 line
cursor_height- 1));drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-1return 0 ; }@@ -2558,7 +2560,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +5
-9int ret;@@ -2599,7 +2600,9 @@ static int dce_v11_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v11_0_lock_cursor (crtc ,true ); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;@@ -2608,16 +2611,10 @@ static int dce_v11_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v11_0_cursor_move_locked (crtc ,x ,y ); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-1dce_v11_0_show_cursor (crtc);@@ -2641,7 +2638,6 @@ static int dce_v11_0_crtc_cursor_set2(structdrm_crtc *crtc, static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-4dce_v11_0_lock_cursor (crtc, true);@@ -2649,10 +2645,6 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc- >cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); - dce_v11_0_show_cursor(crtc);drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0
-0dce_v11_0_lock_cursor (crtc, false);drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +4
-0@@ -1859,6 +1859,8 @@ static int dce_v6_0_cursor_move_locked(structdrm_crtc *crtc, struct amdgpu_device *adev = crtc->dev->dev_private;int xorigin =0 , yorigin =0 ; +int w = amdgpu_crtc->cursor_width; + amdgpu_crtc->cursor_x = x; amdgpu_crtc->cursor_y = y;@@ -1878,6 +1880,8 @@ static int dce_v6_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); +WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((w -1 ) <<16 ) | (amdgpu_crtc->cursor_height -1 ));drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-1return 0 ; }@@ -1903,7 +1907,6 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +5
-9int ret;@@ -1944,7 +1947,9 @@ static int dce_v6_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v6_0_lock_cursor (crtc ,true ); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;@@ -1953,16 +1958,10 @@ static int dce_v6_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v6_0_cursor_move_locked (crtc ,x ,y ); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-1dce_v6_0_show_cursor (crtc);@@ -1986,7 +1985,6 @@ static int dce_v6_0_crtc_cursor_set2(structdrm_crtc *crtc, static void dce_v6_0_cursor_reset(struct drm_crtc *crtc) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-4dce_v6_0_lock_cursor (crtc, true);@@ -1994,10 +1992,6 @@ static void dce_v6_0_cursor_reset(struct drm_crtc *crtc)dce_v6_0_cursor_move_locked (crtc, amdgpu_crtc- >cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v6_0_show_cursor (crtc);drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0
-0dce_v6_0_lock_cursor (crtc, false); }drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +2
-0@@ -2364,6 +2364,8 @@ static int dce_v8_0_cursor_move_locked(struct drm_crtc *crtc,WREG32 (mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x <<16 ) | y);WREG32 (mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin <<16 ) | yorigin); + WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, + ((amdgpu_crtc->cursor_width - 1) << 16) | (amdgpu_crtc-Quoted 1 line
cursor_height- 1));drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0
-1return 0 ; }@@ -2389,7 +2391,6 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc, int32_t hot_y) {struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;struct drm_gem_object *obj;struct amdgpu_bo *aobj;drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +5
-9int ret;@@ -2430,7 +2431,9 @@ static int dce_v8_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v8_0_lock_cursor (crtc ,true ); -if (hot_x != amdgpu_crtc->cursor_hot_x || +if (width != amdgpu_crtc->cursor_width || + height != amdgpu_crtc->cursor_height || + hot_x != amdgpu_crtc->cursor_hot_x || hot_y != amdgpu_crtc->cursor_hot_y) {int x, y;@@ -2439,16 +2442,10 @@ static int dce_v8_0_crtc_cursor_set2(structdrm_crtc *crtc,dce_v8_0_cursor_move_locked (crtc ,x ,y ); - amdgpu_crtc->cursor_hot_x = hot_x; - amdgpu_crtc->cursor_hot_y = hot_y; - } - -if (width != amdgpu_crtc->cursor_width || - height != amdgpu_crtc->cursor_height) { -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (width -1 ) <<16 | (height -1 )); amdgpu_crtc->cursor_width = width; amdgpu_crtc->cursor_height = height; + amdgpu_crtc->cursor_hot_x = hot_x; + amdgpu_crtc->cursor_hot_y = hot_y; }drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0
-1dce_v8_0_show_cursor (crtc);@@ -2472,7 +2469,6 @@ static int dce_v8_0_crtc_cursor_set2(structdrm_crtc *crtc, static void dce_v8_0_cursor_reset(struct drm_crtc *crtc) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); -struct amdgpu_device *adev = crtc->dev->dev_private;if (amdgpu_crtc->cursor_bo) {drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0
-4dce_v8_0_lock_cursor (crtc, true);@@ -2480,10 +2476,6 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc)dce_v8_0_cursor_move_locked (crtc, amdgpu_crtc- >cursor_x, amdgpu_crtc->cursor_y); -WREG32 (mmCUR_SIZE + amdgpu_crtc->crtc_offset, - (amdgpu_crtc->cursor_width -1 ) <<16 | - (amdgpu_crtc->cursor_height -1 )); -dce_v8_0_show_cursor (crtc);
Quoted 8 lines
dce_v8_0_lock_cursor(crtc, false);
--
2.11.0_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB16520DDBF6552F9A13E168F5F7660-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 19 lines · Alexander
Quoted 19 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, January 11, 2017 4:36 AM
To: [email protected]
Cc: Harald Judt; Johannes Hirte
Subject: [PATCH] Revert "drm/amdgpu: Only update theCUR_SIZEregister when necessary"From: Michel Dänzer <[email protected]>
This reverts commits
7c83d7abc9997cf1efac2c0ce384b5e8453ee870anda1f49cc179ce6b7b7758ae3ff5cdb138d0ee0f56.They caused the HW cursor to disappear under various circumstances in the wild. I wasn't able to reproduce any of them, and I'm not sure what's going on. But those changes aren't a big deal anyway, so let's just revert for now.
Quoted 5 lines
Quoted 3 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191291
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99143Signed-off-by Michel Dänzer <[email protected]>Acked-by Alex Deucher <[email protected]>
Thanks Alex. Which tree should I commit this to, in order for you to pick it up for 4.10?
Signature · 7 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ 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): e5e7830c-b1d9-0105-d8bf-59bc1f16690b-otUistvHUpPR7s880joybQ@public.gmane.org
Quoted 30 lines
-----Original Message-----
From: Michel Dänzer [mailto:[email protected]]
Sent: Thursday, January 12, 2017 3:31 AM
To: Deucher, Alexander
Cc: [email protected]
Subject: Re: [PATCH] Revert "drm/amdgpu: Only update theCUR_SIZEregister when necessary"Quoted 2 lines · Alexander
Quoted 2 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] OnBehalf
Quoted 5 lines
Quoted 5 lines
Of Michel Dänzer
Sent: Wednesday, January 11, 2017 4:36 AM
To: [email protected]
Cc: Harald Judt; Johannes Hirte
Subject: [PATCH] Revert "drm/amdgpu: Only update theCUR_SIZEregister
Quoted 12 lines
Quoted 12 lines
when necessary"
From: Michel Dänzer <[email protected]>
This reverts commits
7c83d7abc9997cf1efac2c0ce384b5e8453ee870anda1f49cc179ce6b7b7758ae3ff5cdb138d0ee0f56.They caused the HW cursor to disappear under various circumstances in the wild. I wasn't able to reproduce any of them, and I'm not sure what's going on. But those changes aren't a big deal anyway, so let's just revert for now.
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191291
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99143Signed-off-by Michel Dänzer <[email protected]>Acked-by Alex Deucher <[email protected]>Thanks Alex. Which tree should I commit this to, in order for you to pick it up for 4.10?
Go ahead and commit it to amd-staging. I'll pull it into my -fixes branch.
Thanks!
Alex
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx