FAILED: patch "[PATCH] drm/amd/display: Fix DCE LVDS handling" failed to apply to 6.18-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.18-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.18.y
git checkout FETCH_HEAD
git cherry-pick -x 90d239cc53723c1a3f89ce08eac17bf3a9e9f2d4
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026033025-autism-expanse-4891@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 90d239cc53723c1a3f89ce08eac17bf3a9e9f2d4 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Thu, 26 Feb 2026 17:12:08 -0500
Subject: [PATCH] drm/amd/display: Fix DCE LVDS handling
LVDS does not use an HPD pin so it may be invalid. Handle this case correctly in link encoder creation.
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +2 -4
@@ -650,9 +650,6 @@ static struct link_encoder *dce100_link_encoder_create(return &enc110->base; } -if (enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) -return NULL ; - link_regs_id =map_transmitter_id_to_phy_instance (enc_init_data->transmitter);
@@ -661,7 +658,8 @@ static struct link_encoder *dce100_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +3 -2
@@ -671,7 +671,7 @@ static struct link_encoder *dce110_link_encoder_create(kzalloc_obj (struct dce110_link_encoder );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -682,7 +682,8 @@ static struct link_encoder *dce110_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +3 -2
@@ -632,7 +632,7 @@ static struct link_encoder *dce112_link_encoder_create(kzalloc_obj (struct dce110_link_encoder );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -643,7 +643,8 @@ static struct link_encoder *dce112_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +3 -2
@@ -716,7 +716,7 @@ static struct link_encoder *dce120_link_encoder_create(kzalloc_obj (struct dce110_link_encoder );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -727,7 +727,8 @@ static struct link_encoder *dce120_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +6 -8
@@ -746,18 +746,16 @@ static struct link_encoder *dce60_link_encoder_create(return &enc110->base; } -if (enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) -return NULL ; - link_regs_id =map_transmitter_id_to_phy_instance (enc_init_data->transmitter);dce60_link_encoder_construct (enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[link_regs_id], - &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data, + &link_enc_feature, + &link_enc_regs[link_regs_id], + &link_enc_aux_regs[enc_init_data->channel -1 ], + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? +NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +2 -4
@@ -752,9 +752,6 @@ static struct link_encoder *dce80_link_encoder_create(return &enc110->base; } -if (enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) -return NULL ; - link_regs_id =map_transmitter_id_to_phy_instance (enc_init_data->transmitter);
@@ -763,7 +760,8 @@ static struct link_encoder *dce80_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
Sasha Levin
maintainerPATCH 1/1 drm/amd/display: Fix DCE LVDS handling
From: Alex Deucher <[email protected]>
[ Upstream commit 90d239cc53723c1a3f89ce08eac17bf3a9e9f2d4 ]
LVDS does not use an HPD pin so it may be invalid. Handle this case correctly in link encoder creation.
--- .../display/dc/resource/dce100/dce100_resource.c | 5 +++-- .../display/dc/resource/dce110/dce110_resource.c | 5 +++-- .../display/dc/resource/dce112/dce112_resource.c | 5 +++-- .../display/dc/resource/dce120/dce120_resource.c | 5 +++-- .../amd/display/dc/resource/dce60/dce60_resource.c | 13 +++++++------ .../amd/display/dc/resource/dce80/dce80_resource.c | 5 +++-- 6 files changed, 22 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +3 -2
@@ -624,7 +624,7 @@ static struct link_encoder *dce100_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -635,7 +635,8 @@ static struct link_encoder *dce100_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +3 -2
@@ -668,7 +668,7 @@ static struct link_encoder *dce110_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -679,7 +679,8 @@ static struct link_encoder *dce110_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +3 -2
@@ -629,7 +629,7 @@ static struct link_encoder *dce112_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -640,7 +640,8 @@ static struct link_encoder *dce112_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +3 -2
@@ -713,7 +713,7 @@ static struct link_encoder *dce120_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -724,7 +724,8 @@ static struct link_encoder *dce120_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +7 -6
@@ -718,18 +718,19 @@ static struct link_encoder *dce60_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =map_transmitter_id_to_phy_instance (enc_init_data->transmitter);dce60_link_encoder_construct (enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[link_regs_id], - &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data, + &link_enc_feature, + &link_enc_regs[link_regs_id], + &link_enc_aux_regs[enc_init_data->channel -1 ], + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? +NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +3 -2
@@ -724,7 +724,7 @@ static struct link_encoder *dce80_link_encoder_create(kzalloc (sizeof (struct dce110_link_encoder ),GFP_KERNEL );int link_regs_id; -if (!enc110 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs)) +if (!enc110)return NULL ; link_regs_id =
@@ -735,7 +735,8 @@ static struct link_encoder *dce80_link_encoder_create( &link_enc_feature, &link_enc_regs[link_regs_id], &link_enc_aux_regs[enc_init_data->channel -1 ], - &link_enc_hpd_regs[enc_init_data->hpd_source]); + enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs) ? + NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);return &enc110->base; }
Signature · 1 line
2.53.0