]> 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)
commitf5a1847dd9a03586f27d7e38400223b0bb5ca5b2
treeffb2e442eb0d84a03898d7a29680d9c82419dae9
parentc9dc18730bd81ea220924c61186303704df82b5e
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