* FAILED: patch "[PATCH] drm/i915/dp_mst: Fix configuring TUs for a disconnected" failed to apply to 6.12-stable tree
@ 2026-09-29 8:35 gregkh
2026-09-29 19:30 ` [PATCH 6.12.y] drm/i915/dp_mst: Fix configuring TUs for a disconnected stream Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2026-09-29 8:35 UTC (permalink / raw)
To: imre.deak, jani.nikula, luciano.coelho; +Cc: stable
The patch below does not apply to the 6.12-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 <stable@vger.kernel.org>.
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.12.y
git checkout FETCH_HEAD
git cherry-pick -x a443e0b8d647c1401b110d9f919d8c6cb8607260
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026092957-hardening-slingshot-e073@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a443e0b8d647c1401b110d9f919d8c6cb8607260 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@intel.com>
Date: Mon, 7 Sep 2026 20:44:13 +0300
Subject: [PATCH] drm/i915/dp_mst: Fix configuring TUs for a disconnected
stream
During an atomic commit after all the MST stream CRTC state is computed
the driver ensures that the sum of TUs of all the streams on a given MST
topology link is within limits (63 for 8b10 and 64 for 128b132b). For a
disconnected stream the DRM MST core's BW verification doesn't ensure
this, because the topology state it uses for this is destroyed as soon
as the stream (i.e. MST connector/port) is disconnected. The driver
should keep the link state valid even for such disconnected streams, as
userspace may disable them one-by-one only in a deferred way. Ensure the
link's sum of TUs stays within limits in this case by simply reusing the
maximum link BPP limit from the stream's (i.e. CRTC's) old state.
The disconnection can happen either via the whole topology getting
disconnected or via only the given stream's port getting disconnected.
Check for both of these conditions separately, as a connector gets
unregistered after a link disconnect event only in a deferred way.
Cc: stable@vger.kernel.org # v6.10+
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16073
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16384
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260907174413.741851-2-imre.deak@intel.com
(cherry picked from commit ee00f8fbb2b202002ab90834e02e9ba372773a36)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 9e65b4a1c71d..fb3942f56b1f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -2168,6 +2168,27 @@ bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
return false;
}
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc)
+{
+ struct intel_connector *connector;
+
+ connector = get_connector_in_state_for_crtc(state, crtc);
+ if (!connector)
+ return false;
+
+ if (!connector->mst.dp)
+ return false;
+
+ if (!connector->mst.dp->mst.mgr.mst_state)
+ return true;
+
+ if (drm_connector_is_unregistered(&connector->base))
+ return true;
+
+ return false;
+}
+
/**
* intel_dp_mst_prepare_probe - Prepare an MST link for topology probing
* @intel_dp: DP port object
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
index ab09b487c6bb..8ce89242c05c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@ -28,6 +28,8 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
struct intel_link_bw_limits *limits);
bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
struct intel_crtc *crtc);
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc);
void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
index b47474a3e9fe..e71e76d6fd3e 100644
--- a/drivers/gpu/drm/i915/display/intel_link_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
@@ -64,7 +64,8 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
intel_atomic_get_new_crtc_state(state, crtc);
int forced_bpp_x16 = get_forced_link_bpp_x16(state, crtc);
- if (state->base.duplicated && crtc_state) {
+ if ((state->base.duplicated && crtc_state) ||
+ intel_dp_mst_stream_disconnected(state, crtc)) {
limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
if (intel_dsc_enabled_on_link(crtc_state))
limits->link_dsc_pipes |= BIT(pipe);
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 6.12.y] drm/i915/dp_mst: Fix configuring TUs for a disconnected stream
2026-09-29 8:35 FAILED: patch "[PATCH] drm/i915/dp_mst: Fix configuring TUs for a disconnected" failed to apply to 6.12-stable tree gregkh
@ 2026-09-29 19:30 ` Sasha Levin
2026-09-30 13:54 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-09-29 19:30 UTC (permalink / raw)
To: stable; +Cc: Imre Deak, Luca Coelho, Jani Nikula, Sasha Levin
From: Imre Deak <imre.deak@intel.com>
[ Upstream commit a443e0b8d647c1401b110d9f919d8c6cb8607260 ]
During an atomic commit after all the MST stream CRTC state is computed
the driver ensures that the sum of TUs of all the streams on a given MST
topology link is within limits (63 for 8b10 and 64 for 128b132b). For a
disconnected stream the DRM MST core's BW verification doesn't ensure
this, because the topology state it uses for this is destroyed as soon
as the stream (i.e. MST connector/port) is disconnected. The driver
should keep the link state valid even for such disconnected streams, as
userspace may disable them one-by-one only in a deferred way. Ensure the
link's sum of TUs stays within limits in this case by simply reusing the
maximum link BPP limit from the stream's (i.e. CRTC's) old state.
The disconnection can happen either via the whole topology getting
disconnected or via only the given stream's port getting disconnected.
Check for both of these conditions separately, as a connector gets
unregistered after a link disconnect event only in a deferred way.
Cc: stable@vger.kernel.org # v6.10+
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16073
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16384
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260907174413.741851-2-imre.deak@intel.com
(cherry picked from commit ee00f8fbb2b202002ab90834e02e9ba372773a36)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
[ adapted MST field accesses to `mst_port` and `mst_mgr`, reusing a local `crtc` lookup. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 21 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dp_mst.h | 2 ++
drivers/gpu/drm/i915/display/intel_link_bw.c | 7 ++++---
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index eeaedd979354b..eb0ee759569c3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -2053,6 +2053,27 @@ bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
return false;
}
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc)
+{
+ struct intel_connector *connector;
+
+ connector = get_connector_in_state_for_crtc(state, crtc);
+ if (!connector)
+ return false;
+
+ if (!connector->mst_port)
+ return false;
+
+ if (!connector->mst_port->mst_mgr.mst_state)
+ return true;
+
+ if (drm_connector_is_unregistered(&connector->base))
+ return true;
+
+ return false;
+}
+
/**
* intel_dp_mst_prepare_probe - Prepare an MST link for topology probing
* @intel_dp: DP port object
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
index 8343804ce3f8d..261a97e24d91e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@ -27,6 +27,8 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
struct intel_link_bw_limits *limits);
bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
struct intel_crtc *crtc);
+bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
+ const struct intel_crtc *crtc);
void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
index e7a9b860fac6e..da4f0186311ba 100644
--- a/drivers/gpu/drm/i915/display/intel_link_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
@@ -32,11 +32,12 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
limits->force_fec_pipes = 0;
limits->bpp_limit_reached_pipes = 0;
for_each_pipe(display, pipe) {
+ struct intel_crtc *crtc = intel_crtc_for_pipe(i915, pipe);
const struct intel_crtc_state *crtc_state =
- intel_atomic_get_new_crtc_state(state,
- intel_crtc_for_pipe(i915, pipe));
+ intel_atomic_get_new_crtc_state(state, crtc);
- if (state->base.duplicated && crtc_state) {
+ if ((state->base.duplicated && crtc_state) ||
+ intel_dp_mst_stream_disconnected(state, crtc)) {
limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
if (crtc_state->fec_enable)
limits->force_fec_pipes |= BIT(pipe);
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 6.12.y] drm/i915/dp_mst: Fix configuring TUs for a disconnected stream
2026-09-29 19:30 ` [PATCH 6.12.y] drm/i915/dp_mst: Fix configuring TUs for a disconnected stream Sasha Levin
@ 2026-09-30 13:54 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-09-30 13:54 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable, Imre Deak, Luca Coelho, Jani Nikula
On Tue, Sep 29, 2026 at 03:30:21PM -0400, Sasha Levin wrote:
> From: Imre Deak <imre.deak@intel.com>
>
> [ Upstream commit a443e0b8d647c1401b110d9f919d8c6cb8607260 ]
>
> During an atomic commit after all the MST stream CRTC state is computed
> the driver ensures that the sum of TUs of all the streams on a given MST
> topology link is within limits (63 for 8b10 and 64 for 128b132b). For a
> disconnected stream the DRM MST core's BW verification doesn't ensure
> this, because the topology state it uses for this is destroyed as soon
> as the stream (i.e. MST connector/port) is disconnected. The driver
> should keep the link state valid even for such disconnected streams, as
> userspace may disable them one-by-one only in a deferred way. Ensure the
> link's sum of TUs stays within limits in this case by simply reusing the
> maximum link BPP limit from the stream's (i.e. CRTC's) old state.
>
> The disconnection can happen either via the whole topology getting
> disconnected or via only the given stream's port getting disconnected.
> Check for both of these conditions separately, as a connector gets
> unregistered after a link disconnect event only in a deferred way.
>
> Cc: stable@vger.kernel.org # v6.10+
> Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16073
> Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16384
> Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> Link: https://patch.msgid.link/20260907174413.741851-2-imre.deak@intel.com
> (cherry picked from commit ee00f8fbb2b202002ab90834e02e9ba372773a36)
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> [ adapted MST field accesses to `mst_port` and `mst_mgr`, reusing a local `crtc` lookup. ]
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 21 ++++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_dp_mst.h | 2 ++
> drivers/gpu/drm/i915/display/intel_link_bw.c | 7 ++++---
> 3 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index eeaedd979354b..eb0ee759569c3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -2053,6 +2053,27 @@ bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
> return false;
> }
>
> +bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
> + const struct intel_crtc *crtc)
> +{
> + struct intel_connector *connector;
> +
> + connector = get_connector_in_state_for_crtc(state, crtc);
> + if (!connector)
> + return false;
> +
> + if (!connector->mst_port)
> + return false;
> +
> + if (!connector->mst_port->mst_mgr.mst_state)
> + return true;
> +
> + if (drm_connector_is_unregistered(&connector->base))
> + return true;
> +
> + return false;
> +}
> +
> /**
> * intel_dp_mst_prepare_probe - Prepare an MST link for topology probing
> * @intel_dp: DP port object
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> index 8343804ce3f8d..261a97e24d91e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> @@ -27,6 +27,8 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
> struct intel_link_bw_limits *limits);
> bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
> struct intel_crtc *crtc);
> +bool intel_dp_mst_stream_disconnected(struct intel_atomic_state *state,
> + const struct intel_crtc *crtc);
> void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
> bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
> index e7a9b860fac6e..da4f0186311ba 100644
> --- a/drivers/gpu/drm/i915/display/intel_link_bw.c
> +++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
> @@ -32,11 +32,12 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
> limits->force_fec_pipes = 0;
> limits->bpp_limit_reached_pipes = 0;
> for_each_pipe(display, pipe) {
> + struct intel_crtc *crtc = intel_crtc_for_pipe(i915, pipe);
> const struct intel_crtc_state *crtc_state =
> - intel_atomic_get_new_crtc_state(state,
> - intel_crtc_for_pipe(i915, pipe));
> + intel_atomic_get_new_crtc_state(state, crtc);
>
> - if (state->base.duplicated && crtc_state) {
> + if ((state->base.duplicated && crtc_state) ||
> + intel_dp_mst_stream_disconnected(state, crtc)) {
> limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
> if (crtc_state->fec_enable)
> limits->force_fec_pipes |= BIT(pipe);
> --
> 2.53.0
>
>
Breaks the build :(
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-30 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 8:35 FAILED: patch "[PATCH] drm/i915/dp_mst: Fix configuring TUs for a disconnected" failed to apply to 6.12-stable tree gregkh
2026-09-29 19:30 ` [PATCH 6.12.y] drm/i915/dp_mst: Fix configuring TUs for a disconnected stream Sasha Levin
2026-09-30 13:54 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox