From: Brandon Syu Date: Wed, 10 Jun 2020 08:44:33 +0000 (+0800) Subject: drm/amd/display: Keep current gain when ABM disable immediately X-Git-Tag: v5.8.8~152 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3a943b6f211c7323250009f1c3c5102a9c77418;p=thirdparty%2Fkernel%2Fstable.git drm/amd/display: Keep current gain when ABM disable immediately [ Upstream commit cba4b52e431e5de3d8012281cfe194f1c39a9052 ] [Why] When system enters s3/s0i3, backlight PWM would set user level. [How] ABM disable function add keep current gain to avoid it. Signed-off-by: Brandon Syu Reviewed-by: Josip Pavic Acked-by: Eryk Brol Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h index 49aad691e687e..ccac2315a903a 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_stream.h +++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h @@ -222,7 +222,7 @@ struct dc_stream_state { union stream_update_flags update_flags; }; -#define ABM_LEVEL_IMMEDIATE_DISABLE 0xFFFFFFFF +#define ABM_LEVEL_IMMEDIATE_DISABLE 255 struct dc_stream_update { struct dc_stream_state *stream;