FAILED: patch "[PATCH] drm/amd/display: Avoid closing unowned DDC pins" failed to apply to 6.1-stable tree
Sasha Levin
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 e7ba638b8116cb5f1a5690f543052371215f1626
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From e7ba638b8116cb5f1a5690f543052371215f1626 Mon Sep 17 00:00:00 2001
From: Alex Hung <[email protected]>
Date: Tue, 27 Oct 2026 17:17:04 -0600
Subject: [PATCH] drm/amd/display: Avoid closing unowned DDC pins
[WHY]dal_ddc_open() cleans up pins it acquires on later failures. If the data-pin open fails, this attempt acquired nothing. If opening the clock pin or configuring fails, dal_ddc_open() closes the pins it opened. An extra dal_ddc_close() is unnecessary and unsafe:GPIO_RESULT_ALREADY_OPENED can mean AUX owns the existing handles, and closing them here would disrupt AUX.
[HOW]
Remove the extra dal_ddc_close() from the failed-open path.
--- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +1 -5
@@ -2602,12 +2602,8 @@ bool dp_is_sink_present(struct dc_link *link)* which indicates we need additional delay */ -if (dal_ddc_open (ddc,GPIO_MODE_INPUT , -GPIO_DDC_CONFIG_TYPE_MODE_I2C ) !=GPIO_RESULT_OK ) { -dal_ddc_close (ddc); - +if (dal_ddc_open (ddc,GPIO_MODE_INPUT ,GPIO_DDC_CONFIG_TYPE_MODE_I2C ) !=GPIO_RESULT_OK )return present; - }/* * Read GPIO: DP sink is present if both clock and data pins are zero
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 drm/amd/display: Avoid closing unowned DDC pins
From: Alex Hung <[email protected]>
[ Upstream commit e7ba638b8116cb5f1a5690f543052371215f1626 ]
[WHY]dal_ddc_open() cleans up pins it acquires on later failures. If the data-pin open fails, this attempt acquired nothing. If opening the clock pin or configuring fails, dal_ddc_open() closes the pins it opened. An extra dal_ddc_close() is unnecessary and unsafe:GPIO_RESULT_ALREADY_OPENED can mean AUX owns the existing handles, and closing them here would disrupt AUX.
[HOW]
Remove the extra dal_ddc_close() from the failed-open path.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -5
@@ -399,12 +399,8 @@ bool dc_link_is_dp_sink_present(struct dc_link *link)* which indicates we need additional delay */ -if (dal_ddc_open (ddc,GPIO_MODE_INPUT , -GPIO_DDC_CONFIG_TYPE_MODE_I2C ) !=GPIO_RESULT_OK ) { -dal_ddc_close (ddc); - +if (dal_ddc_open (ddc,GPIO_MODE_INPUT ,GPIO_DDC_CONFIG_TYPE_MODE_I2C ) !=GPIO_RESULT_OK )return present; - }/* * Read GPIO: DP sink is present if both clock and data pins are zero
Signature · 1 line
2.53.0