Skip to content

Commit 55a806d

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Fix disabled cursor on top screen edge
[Why] The cursor vanishes when touching the top of edge of the screen for Raven on Linux. This occurs because the cursor height is not taken into account when deciding to disable the cursor. [How] Factor in the cursor height into the cursor calculations - and mimic the existing x position calculations. Fixes: 94a4ffd ("drm/amd/display: fix PIP bugs on Dal3") Signed-off-by: Nicholas Kazlauskas <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Acked-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent b03a599 commit 55a806d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ void dpp1_set_cursor_position(
463463
if (src_y_offset >= (int)param->viewport.height)
464464
cur_en = 0; /* not visible beyond bottom edge*/
465465

466-
if (src_y_offset < 0)
466+
if (src_y_offset + (int)height <= 0)
467467
cur_en = 0; /* not visible beyond top edge*/
468468

469469
REG_UPDATE(CURSOR0_CONTROL,

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ void hubp1_cursor_set_position(
11401140
if (src_y_offset >= (int)param->viewport.height)
11411141
cur_en = 0; /* not visible beyond bottom edge*/
11421142

1143-
if (src_y_offset < 0) //+ (int)hubp->curs_attr.height
1143+
if (src_y_offset + (int)hubp->curs_attr.height <= 0)
11441144
cur_en = 0; /* not visible beyond top edge*/
11451145

11461146
if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0)

0 commit comments

Comments
 (0)