]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6088d7923d74a850e02a386848fcd547916b822b
treeffb2e442eb0d84a03898d7a29680d9c82419dae9
parent04c2d1eb93882970d49afeab078b3f1e1275c5ab
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