drm/amd/display: Allow commits with no planes active
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 4 Apr 2019 15:00:53 +0000 (11:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Apr 2019 19:58:38 +0000 (14:58 -0500)
commitbc92c06525e5865c94256ef0227bfe870c095823
tree1fec747876be2bf4f0207d729de78625ccd59683
parentb5e83f6fe1f003f95fcdbde8a3364f776c18d28d
drm/amd/display: Allow commits with no planes active

[Why]
Many userspace applications (and IGT) seem to expect that most drivers
can keep a CRTC active and enabled if there are no primary or overlay
planes.

DC is setup to handle this but only in the case where there are
absolutely no planes on the CRTC - no primary, cursor, or overlay.

[How]
Add a check to reject commits that have cursor planes enabled and
nothing else on CRTCs since we can't handle that. The new helper
does_crtc_have_active_cursor is used for this.

In atomic commit tail, we need to let DC know that there are zero
planes enabled when doing stream updates to let it disable and blank
pipes as appropriate.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c