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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF308CE7A8B for ; Sun, 24 Sep 2023 13:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbjIXNS1 (ORCPT ); Sun, 24 Sep 2023 09:18:27 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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