drm/amd/display: fix ABM disablement
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Wed, 22 Nov 2023 19:50:34 +0000 (14:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 21:49:22 +0000 (16:49 -0500)
commit7a6931a476d30f0d6bf70b01a925f76f92d23940
tree78b73724c360ab616d42ac512994f1c18c1e9817
parent201761b5eb57c3fad810cde555795c3b5721a031
drm/amd/display: fix ABM disablement

On recent versions of DMUB firmware, if we want to completely disable
ABM we have to pass ABM_LEVEL_IMMEDIATE_DISABLE as the requested ABM
level to DMUB. Otherwise, LCD eDP displays are unable to reach their
maximum brightness levels. So, to fix this whenever the user requests an
ABM level of 0 pass ABM_LEVEL_IMMEDIATE_DISABLE to DMUB instead. Also,
to keep the user's experience consistent map ABM_LEVEL_IMMEDIATE_DISABLE
to 0 when a user tries to read the requested ABM level.

Cc: stable@vger.kernel.org # 6.1+
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c