drm/amd/display: fix missing cursor on some rotated SLS displays
authorSamson Tam <Samson.Tam@amd.com>
Wed, 4 Dec 2019 23:35:15 +0000 (18:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2019 21:09:10 +0000 (16:09 -0500)
commit64267454273ac8203aa3f4c0a9ca71193884e862
tree775a717320c10ba7e30adb6b776061127bcfb087
parent760ef473f2fccdf8ca9bc0773960e16d4ce6f3d2
drm/amd/display: fix missing cursor on some rotated SLS displays

[Why]
Cursor disappears for some SLS displays that are rotated 180
and 270 degrees.  This occurs when there is no pipe split being
done ( ex. 3 or more displays ).  The cursor calculations assume
pipe splitting is done so when it calculates the new cursor
position in hwss.set_cursor_position(), it is out-of-bounds so
it disables the cursor in hubp.set_cursor_position().

[How]
In non pipe split cases, calculate cursor using viewport size
( width or height ) instead of viewport size * 2 ( the two
because pipe splitting divides the rectangle into two ).

Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c