drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)
authorShirish S <shirish.s@amd.com>
Wed, 28 Feb 2018 06:44:58 +0000 (12:14 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Mar 2018 21:27:03 +0000 (16:27 -0500)
commit36cc549d59864b7161f0e23d710c1c4d1b9cf022
tree01e13025e3151e81b5d9acbf41e71565e4c2109f
parent3c27b3f41391125e4037b24371df72c792cad0fb
drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)

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.

This change leads to BUG hit while performing atomic commit on amd driver.

As a fix this patch ensures that we disable the CRTC's with NULL FB by returning
-EINVAL and hence triggering fall back to the old behavior and turning off the
crtc in atomic_remove_fb().

V2: Added error check for plane_state and removed sanity check for crtc.

Signed-off-by: Shirish S <shirish.s@amd.com>
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c