From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17BC1CE7A8A for ; Sun, 24 Sep 2023 13:17:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C456110E155; Sun, 24 Sep 2023 13:17:24 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A16510E126; Sun, 24 Sep 2023 13:17:12 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 88E72B80920; Sun, 24 Sep 2023 13:17:10 +0000 (UTC) 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 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-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wenjing Liu , dri-devel@lists.freedesktop.org, mario.limonciello@amd.com, Jun.Lei@amd.com, airlied@gmail.com, Sasha Levin , charlene.liu@amd.com, sancchen@amd.com, Rodrigo.Siqueira@amd.com, syed.hassan@amd.com, amd-gfx@lists.freedesktop.org, tony.tascioglu@amd.com, harry.wentland@amd.com, Stylon Wang , ahmed.ahmed@amd.com, Jingwen.Zhu@amd.com, sunpeng.li@amd.com, Daniel Wheeler , Swapnil Patel , Xinhui.Pan@amd.com, daniel@ffwll.ch, Alex Deucher , christian.koenig@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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