OSDN Git Service

drm/amd/display: clip plane rects in DM before passing into DC
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Thu, 4 Jun 2020 19:54:39 +0000 (15:54 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:25 +0000 (01:59 -0400)
commit8c44515be175a1bc18620284d23efa385daea49f
tree83e1a284a6b77cd99ea9ee23636edb079f063c20
parentf822406cb186b8018554f167fecae43043a90359
drm/amd/display: clip plane rects in DM before passing into DC

[Why]
DC global validation can fail when userspace requests to draw large
plane without performing the clipping themselves.

This is observed in the IGT kms_plane panning tests for 4K displays
where they draw an 8K plane without any clipping while expecting only
the top 4K to be drawn.

[How]
DRM already has helpers to take care of the clipping necessary and to
mark whether a plane is visible or not, so make use of these helpers
in DM before passing the plane to DC.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@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