drm/amd/display: Reject too small viewport size when validating plane
authorNikola Cornij <nikola.cornij@amd.com>
Fri, 22 Jan 2021 03:35:54 +0000 (22:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 17:12:22 +0000 (12:12 -0500)
commit40d916a2602c8920e0f04a49abfd1ff7c1e54e91
treeffb2e442eb0d84a03898d7a29680d9c82419dae9
parente2dcd9b8b803b927b4cbc59d91c4088334a248bb
drm/amd/display: Reject too small viewport size when validating plane

[why]
Overlay won't move to a new positon if viewport size is smaller than
what can be handled. It'd either disappear or stay at the old
position. This condition is for example hit if overlay is moved too
much outside of left or top edge of the screen, but it applies to
any non-cursor plane type.

[how]
Reject this contidion at validation time. This gives the calling
level a chance to handle this gracefully and avoid inconsistent
behaivor.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@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/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h