From patchwork Tue Sep 8 15:22:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EDB2C43461 for ; Tue, 8 Sep 2020 19:27:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 662DB2145D for ; Tue, 8 Sep 2020 19:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599593231; bh=fT+Gl91n+3w+s/Fj+AVwPmeQvf8Pt8+tmLBCik5m63s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aTdxkKTgK2aB0HLg8PxDHwXPidNftBm6D/yicdb0lrO/6SXUDMuNdy7krUjEGrCxc 1ISZFlTh1o7G8+wN0iDN0pKaVLRAaX9uUaQZUMSsdjFec1ACUfg/D5PIu7O3nGhB3P Aj3HhQk8hDRNkx4a9gJ7xTSRVKGbKM2mXPCy2hr4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbgIHT0k (ORCPT ); Tue, 8 Sep 2020 15:26:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731055AbgIHQAE (ORCPT ); Tue, 8 Sep 2020 12:00:04 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5BA9121D7A; Tue, 8 Sep 2020 15:35:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579334; bh=fT+Gl91n+3w+s/Fj+AVwPmeQvf8Pt8+tmLBCik5m63s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qe+4BuHXEeJAdvZSaFqnYRpqnOlE/rRyQEqrG5a58P3bNUAgAqERXWPgYeDPveDCG 2OqJhfGm/V3N8jh33AR1NEvFN5nJiWrOey7A0dzSAm/gc0QAoihGGez+qe1z0pneqb z2pIxDDSl7rmabfdBOFgY5QLHZvxhaXtaKZ59HR4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brandon Syu , Josip Pavic , Eryk Brol , Alex Deucher , Sasha Levin Subject: [PATCH 5.8 034/186] drm/amd/display: Keep current gain when ABM disable immediately Date: Tue, 8 Sep 2020 17:22:56 +0200 Message-Id: <20200908152243.331005239@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152241.646390211@linuxfoundation.org> References: <20200908152241.646390211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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;