Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:

Pre-existing issues:
- [High] Calling `mutex_lock()` from within an atomic encoder callback path.
--

--- Patch [1]: Patch "drm/dp_mst: Handle torn-down topology gracefully in 
drm_dp_mst_topology_queue_probe()" has been added to the 6.12-stable tree ---
commit 746d73e2e2b5ca58eedb8e8371b10fa271386f44
Author: [email protected] <[email protected]>

drm/dp_mst: Handle torn-down topology gracefully in 
drm_dp_mst_topology_queue_probe()

This commit replaces a drm_WARN_ON with an early return in
drm_dp_mst_topology_queue_probe() to handle torn-down topologies gracefully
during concurrent hotplug or link-loss events. This eliminates spurious
kernel warnings and compositor crashes.

Link: 
https://lore.kernel.org/all/[email protected]
Link: https://patch.msgid.link/[email protected]

> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c 
> b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index ac90118b9e7a8..97ddd10df0229 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -3739,8 +3739,10 @@ void drm_dp_mst_topology_queue_probe(struct 
> drm_dp_mst_topology_mgr *mgr)
>  {
>       mutex_lock(&mgr->lock);

[Severity: High]
This is a pre-existing issue, but won't this mutex lock cause a sleeping
in atomic context warning?

During non-blocking commits, the encoder atomic callback
intel_mst_pre_enable_dp() runs in an atomic context where sleeping is
forbidden. It calls intel_mst_reprobe_topology(), which then calls this
function:

intel_mst_pre_enable_dp() ->
    intel_mst_reprobe_topology() ->
        drm_dp_mst_topology_queue_probe()

Since drm_dp_mst_topology_queue_probe() unconditionally acquires mgr->lock
using mutex_lock(), won't this lead to scheduling while atomic splats or
potential deadlocks during hotplug events and modesets involving MST links?

> -     if (drm_WARN_ON(mgr->dev, !mgr->mst_state || !mgr->mst_primary))
> +     if (!mgr->mst_state || !mgr->mst_primary) {
> +             drm_dbg_kms(mgr->dev, "queue_probe skipped: topology torn 
> down\n");
>               goto out_unlock;
> +     }
>  
>       drm_dp_mst_topology_mgr_invalidate_mstb(mgr->mst_primary);
>       drm_dp_mst_queue_probe_work(mgr);

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/2026072907-framing-morphine-00a8@gregkh?part=1

Reply via email to