drm/amd/display: Make cursor source translation adjustment optional
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Sun, 5 Apr 2020 20:41:08 +0000 (16:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Apr 2020 14:43:17 +0000 (10:43 -0400)
commit033baeeefbf088416b975ac1aae08a4b8e8ef914
tree154a569b3321c0cec95a1c55656e78d821f57d21
parenta1a0e61f3c43c610f0a3c109348c14ce930c1977
drm/amd/display: Make cursor source translation adjustment optional

[Why]
In some usecases, like tiled display, the stream and plane configuration
can be setup in a way where the caller expects DAL to perform the
clipping, eg:

P0:
src_rect(0, 0, w, h)
dst_rect(0, 0, w, h)

P1:
src_rect(w, 0, w, h)
dst_rect(0, 0, w, h)

Cursor is enabled on both streams with the same position.

This can result in double cursor on tiled display, even though this
behavior is technically correct from the DC interface point of view.

We need a mechanism to control this dynamically.

[How]
This is something that should live in the DM layer based on detection
of the specified configuration but it's not something that we really
have enough information to deal with today.

Add a flag to the cursor position state that specifies whether we
want DC to do the translation or not and make it opt-in and let
the DM decide when to do it.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c