Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp654908rdh; Sun, 24 Sep 2023 06:20:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGP56iT1bEhyy6cqgJpm2WSDFItixJYX67xbz2uMt2coIrCEO3rdclTVq69v3iIdDxyX6O X-Received: by 2002:a17:902:9a42:b0:1c5:fa71:22fb with SMTP id x2-20020a1709029a4200b001c5fa7122fbmr3378138plv.65.1695561601081; Sun, 24 Sep 2023 06:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695561601; cv=none; d=google.com; s=arc-20160816; b=gZquz5JAEYi3irPPmi/5KncjKfEGoUAgtftcbsmZfw8egz0QHaYdWAdArR+d+qa8dD wM++aYwW83g8DqPJVLYzoNQeYV93AHjLqs1gCj2bRUGvoqVmbSCkgHXPJwjzolwhqbBy AJRpnzhlhtxmz/8GJYeneU2cGyO2JnddW3hyNtjv/Xi/RR0LmuT2SweAJDZst0h988LS AEVXm1nehTITjzAtkgTi4I7lE1ezundrqDf/mgiqBw7OKQ23qbgk2ZGImSDcZTTUqsSm EB9HVDyMgT2d4hRFCi/CR4galUB4KAaB75Ivmdc6ZLkjgaoajSjiaDHZ1TmDcFRUrut6 Cq/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ui1IHYMbvQIv56ABbuZ+IzkpaVxDJCUYk8d3YLioOX8=; fh=cvr4gJ5gd3leE1i3yY4kr7g0CL/XUX5LEV563GMj9sc=; b=H1NUAaRJ3QiQNvrlnFhniTcucT55LH4fx2hWESsPE6RAQSohqKX4NqekCyhx8I691U 9TmY+by4v1fo5KkEMiWUojkWBGHiviUpG/4F3tXBwPKV6wA4WJyeuUhCGztTHns5TdC6 cy7WMu0iUeXDkZSBy5adflC/xqB+Jh4egBKeSO7s1m0mgltVZOr/u2CAv89jUsIVhrjl DakXAs4b00gW5XTjzpfMBzJKL6xSnlBL3kB3Fa0ALXe+j+UKtlY64hqO8EFqbhwbAlAg FAzdQjLgCsv7n2Vtp2bIcUWZE1UV2G1E1RZAjbY8Vh3uC0xK8H31ubCKX4gIPBGCIcdq T79w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JAJ6qV9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c7-20020a170903234700b001a6bb7b7a44si8253350plh.307.2023.09.24.06.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 06:20:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JAJ6qV9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5690B8119045; Sun, 24 Sep 2023 06:19:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbjIXNS0 (ORCPT + 99 others); Sun, 24 Sep 2023 09:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbjIXNSC (ORCPT ); Sun, 24 Sep 2023 09:18:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BF861707; Sun, 24 Sep 2023 06:17:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3939FC433C9; Sun, 24 Sep 2023 13:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695561429; bh=UFd4NFNK04mJdVWR6pG7ED08c9UGVdsoNdccAFVnesg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JAJ6qV9tqF/zDcVYdgfO6rutin0nMi2pv+nxR7JgEN7uto1GWwJDv+aahmub/otla cJVA2ZII0JRAp1Uw9OBaVIdJc/yYo4UurgHeJy29E1y95Rgc0+tQ31+6wzKTYNX/tX KQeZ8tm6WWAq9i4yCmpcxVMnb7xXW0cKtSonk7stGnncQIjgO32axCs2utAOw1zrLY 0acypFOlsFQHIyJIP+eACS2ydWywainuVTnDDyWKGekYLsmv8wuQLgwdq8eOfWqokP 6NMqEjJe9fXTNMKc1CwjLVmWMo+kYhUPcH6FE9AhkClHRs+Zc66UY9C0zKrQeoXzeE 0BBvQoNxT/rnQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Swapnil Patel , Wenjing Liu , Stylon Wang , Daniel Wheeler , Alex Deucher , Sasha Levin , harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, charlene.liu@amd.com, Jun.Lei@amd.com, syed.hassan@amd.com, tony.tascioglu@amd.com, mario.limonciello@amd.com, sancchen@amd.com, Jingwen.Zhu@amd.com, ahmed.ahmed@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.5 28/41] drm/amd/display: Don't check registers, if using AUX BL control Date: Sun, 24 Sep 2023 09:15:16 -0400 Message-Id: <20230924131529.1275335-28-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230924131529.1275335-1-sashal@kernel.org> References: <20230924131529.1275335-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.5.5 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 24 Sep 2023 06:19:49 -0700 (PDT) From: Swapnil Patel [ Upstream commit f5b2c10b57615828b531bb0ae56bd6325a41167e ] [Why] Currently the driver looks DCN registers to access if BL is on or not. This check is not valid if we are using AUX based brightness control. This causes driver to not send out "backlight off" command during power off sequence as it already thinks it is off. [How] Only check DCN registers if we aren't using AUX based brightness control. Reviewed-by: Wenjing Liu Acked-by: Stylon Wang Signed-off-by: Swapnil Patel Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c index 6966420dfbac3..15fa19ee748cf 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c @@ -964,7 +964,9 @@ void dce110_edp_backlight_control( return; } - if (link->panel_cntl) { + if (link->panel_cntl && !(link->dpcd_sink_ext_caps.bits.oled || + link->dpcd_sink_ext_caps.bits.hdr_aux_backlight_control == 1 || + link->dpcd_sink_ext_caps.bits.sdr_aux_backlight_control == 1)) { bool is_backlight_on = link->panel_cntl->funcs->is_panel_backlight_on(link->panel_cntl); if ((enable && is_backlight_on) || (!enable && !is_backlight_on)) { -- 2.40.1