drm/amd/display: Refine condition for cursor visibility
authorKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Fri, 9 Jul 2021 14:25:44 +0000 (10:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jul 2021 14:07:58 +0000 (10:07 -0400)
commit5bb0d5cf9fc7f595a1d5348b3e2f35530cfde3a0
tree45075e7aa42e8ce8169b87c908930fc597ea7cec
parentff7903551c9626be8de481a46796c067a57c958d
drm/amd/display: Refine condition for cursor visibility

[why]
There's a special case where upper plane is not the main plane. If it owns
the cursor, it will be invisible in the majority of the screen.

[How]
The condition for disabling cursor is changed:
- check if upper viewport completely covers current. This was the
previous change that doesn't handle all scenarios with pipe splitting.
- if not, show the cursor only if it's not scaled or no upper pipe.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h