Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1205049pxk; Mon, 31 Aug 2020 12:42:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIBCGEZtBZpeXGHcxtqTno3IECU4hOqlx6/Z8LLH5Dr/dAueOnVIOWKn4BiKQ4flFSgU3p X-Received: by 2002:aa7:c447:: with SMTP id n7mr2476878edr.323.1598902964075; Mon, 31 Aug 2020 12:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598902964; cv=none; d=google.com; s=arc-20160816; b=fmcTC3TzwkvsvVPmtYYar4/Ufngx9pzPVZjzwMDEv8AkaC0ZeNGE9yqozWJD391JV4 JYomv73GZnEfjB4cR6jatkKscOVgE5pY8n1lNHIuCwUDboYVVitJoEs2zR58PlqGCFN+ OjTNWxRNxicxb/hr3lzPVDu1R0hPekvgsHcltqfC3z5OQiHx6k1MJEVdsKNMifnw4FbW niF4wwA+HHv7JZr43QWLbce8dv4xvM103Qy6zcYwTHKKTEDufcpb3YGNRV+jVMtyXMiN TBcT8Uxk31Eyn2YZrPWQRKCmd8NDHkgdJbP/p1BlktscvsE4HhcM7SKveu+1On2bwwZB I+Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OPZLQmbdK4qxYbeAAXnLaOKRA6rGmkfhTGIoM8+Tq6Y=; b=kACClC4qjII5STb7QOmzOBd8KlRZwjgfans8MIk4HFxo4YYyVEQVJ3Hd5pBOTXVnpW /WzpphYhPOKo5RLpfh2uqjLGalktn5y+HL7A5gKA4pxrz1/G9RNn2TCCfDe/Pe1PdrXD KUemXrCPLsSDqRJIJcOhQU6OKVYg3xKs4yrDvLarcwAjBshHwlOe+Z0kubokxhjyHEVB FAX5wuvLcKpb6Cu0tb/irQfV3l1QrghLxTle3jnVT+rt9fkYfISXOiX3huGhI52k2dA/ Zw/TvhzQQulOrDj8oi4kvFmkNroj/9bh94UmiACusFcpPLUjN7pUIIem08O57+Mr8YY5 TesA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MbuBf1gT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si1934110ejx.142.2020.08.31.12.42.20; Mon, 31 Aug 2020 12:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MbuBf1gT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728598AbgHaPhA (ORCPT + 99 others); Mon, 31 Aug 2020 11:37:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:40082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728661AbgHaPac (ORCPT ); Mon, 31 Aug 2020 11:30:32 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 047D8214D8; Mon, 31 Aug 2020 15:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887832; bh=fT+Gl91n+3w+s/Fj+AVwPmeQvf8Pt8+tmLBCik5m63s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MbuBf1gTQpvKxmyBrV+3qFgBJoArJzSYAyxyZSQArBZH77bI36mvJVm1KSAS91Qs8 9/2k1yrbzKcvFe1ZdIyjxAPTWWSo1lx9MTirID4mmf0VtgBGDukw1Rve2tnrHRcwRU 8gfRiJQJUbylSy4kBT7+6FrX1dF0c01wXeE4oV5o= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Brandon Syu , Josip Pavic , Eryk Brol , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.8 38/42] drm/amd/display: Keep current gain when ABM disable immediately Date: Mon, 31 Aug 2020 11:29:30 -0400 Message-Id: <20200831152934.1023912-38-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brandon Syu [ 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 --- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1