FAILED: patch "[PATCH] drm/amd/display: Fix encoder disable logic" failed to apply to 6.1-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 0ee057e66c4b782809a0a9265cdac5542e646706
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023112432-schilling-murkiness-4092@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
0ee057e66c4b ("drm/amd/display: Fix encoder disable logic")e0b394a87a11 ("drm/amd/display: Add DCN35 DIO")25879d7b4986 ("drm/amd/display: Clean FPGA code in dc")7b1b3f5818c3 ("drm/amd/display: update dig enable sequence")98ce7d32e215 ("drm/amd/display: convert link.h functions to function pointer style") 22f1482aff4a ("drm/amd/display: add sysfs entry to read PSR residency from firmware") c186c13e6528 ("drm/amd/display: Drop unnecessary DCN guards")788c6e2ce5c7 ("drm/amd/display: replace all dc_link function call in link with link functions") 202a3816f37e ("drm/amd/display: move dc_link functions in protocols folder to dc_link_exports") 6455cb522191 ("drm/amd/display: link link_dp_dpia_bw.o in makefile")76f5dc40ebb1 ("drm/amd/display: move dc_link functions in link root folder to dc_link_exports") 36516001a7c9 ("drm/amd/display: move dc_link functions in accessories folder to dc_link_exports") 1e88eb1b2c25 ("drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP")aee0c07a74d3 ("drm/amd/display: Unify DC logging for BW Alloc")7ae1dbe6547c ("drm/amd/display: merge dc_link.h into dc.h and dc_types.h") 1099238b966e ("drm/amd/display: Update BW ALLOCATION Function declaration") a06d565b4a1c ("drm/amd/display: Allocation at stream Enable")c32699caeca8 ("drm/amd/display: Updating Video Format Fall Back Policy.") c69fc3d0de6c ("drm/amd/display: Reduce CPU busy-waiting for long delays") 455ad25997ba ("drm/amdgpu: Select DRM_DISPLAY_HDCP_HELPER in amdgpu")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0ee057e66c4b782809a0a9265cdac5542e646706 Mon Sep 17 00:00:00 2001
From: Nicholas Susanto <[email protected]>
Date: Wed, 1 Nov 2023 15:30:10 -0400
Subject: [PATCH] drm/amd/display: Fix encoder disable logic
[WHY]
DENTIST hangs when OTG is off and encoder is on. We were not disabling the encoder properly when switching from extended mode to external monitor only.
[HOW]
Disable the encoder using an existing enable/disable fifo helper instead of enc35_stream_encoder_enable.
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dio_stream_encoder.c +4 -6
@@ -261,12 +261,6 @@ static void enc35_stream_encoder_enable(/* invalid mode ! */ ASSERT_CRITICAL (false); } - -REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,1 ); -REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,1 ); - }else { -REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,0 ); -REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,0 ); } }
@@ -436,6 +430,8 @@ static void enc35_disable_fifo(struct stream_encoder *enc)struct dcn10_stream_encoder *enc1 =DCN10STRENC_FROM_STRENC (enc);REG_UPDATE (DIG_FIFO_CTRL0 ,DIG_FIFO_ENABLE ,0 ); +REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,0 ); +REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,0 ); }static void enc35_enable_fifo (struct stream_encoder *enc)
@@ -443,6 +439,8 @@ static void enc35_enable_fifo(struct stream_encoder *enc)struct dcn10_stream_encoder *enc1 =DCN10STRENC_FROM_STRENC (enc);REG_UPDATE (DIG_FIFO_CTRL0 ,DIG_FIFO_READ_START_LEVEL ,0x7 ); +REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,1 ); +REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,1 );enc35_reset_fifo (enc, true);enc35_reset_fifo (enc, false);