drm/amd/display: Disallow enabling CRTC without primary plane with FB
authorHarry Wentland <harry.wentland@amd.com>
Mon, 16 Apr 2018 21:28:11 +0000 (17:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:44:07 +0000 (13:44 -0500)
commit3d777c82bda9a82cc304de5ba51122d248f7a584
tree17a06610ff7b6c258cbe8f867369e38b34b00f0f
parenta80aa93de1a0e69fdb83e04a9aca7c33bfb18941
drm/amd/display: Disallow enabling CRTC without primary plane with FB

The below commit

    "drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2"

introduces a slight behavioral change to rmfb. Instead of disabling a crtc
when the primary plane is disabled, it now preserves it.

Since DC is currently not equipped to handle this we need to fail such
a commit, otherwise we might see a corrupted screen.

This is based on Shirish's previous approach but avoids adding all
planes to the new atomic state which leads to a full update in DC for
any commit, and is not what we intend.

Theoretically DM should be able to deal with states with fully populated planes,
even for simple updates, such as cursor updates. This should still be
addressed in the future.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c