drm/amd/display: Avoid pipe split when plane is too small
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 6 May 2020 18:21:35 +0000 (14:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 May 2020 16:48:43 +0000 (12:48 -0400)
commitb6dbb8ff9dbfdf55ee88e668099d9d7517f109a5
tree56187ba5a9cf40da14ee862fc8c1601499fcbe1e
parent63731e73dae413d535fd4cef3d8a77203c13f3f4
drm/amd/display: Avoid pipe split when plane is too small

[Why]
The minimum plane size we can support in DML is 16x16. If we try to pass
a 16x16 plane with dynamic pipe split then validation will fail since it
tries to split it into two pipes, each 8x8.

Some userspace doesn't check that the commit fails and because the
commit fails the old state is retained, resulting in corruption.

[How]
Add a workaround to avoid pipe split if any plane is 16x16 or smaller.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@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/calcs/dcn_calcs.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c