From: Kunal Joshi <kunal1.joshi@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: imre.deak@intel.com, jani.nikula@intel.com,
Kunal Joshi <kunal1.joshi@intel.com>
Subject: [RFC 7/7] drm/i915/dp_tunnel: Re-attach dp_tunnel debugfs to MST children on re-detect
Date: Mon, 11 May 2026 11:10:28 +0530 [thread overview]
Message-ID: <20260511054028.1310995-8-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20260511054028.1310995-1-kunal1.joshi@intel.com>
After a tunnel destroy/re-detect cycle (e.g. suspend/resume or a
debugfs-driven BWA toggle), MST child connectors lose their
dp_tunnel/ subdir because only the primary connector is
re-registered via the existing detect_new_tunnel() path.
Walk the live MST child connectors in
intel_dp_tunnel_debugfs_add() and re-register their dp_tunnel/
subdir against the current tunnel. The DRM-core helper
deduplicates entries by parent dentry, so both the initial-detect
and re-detect paths are safe.
Cc: Imre Deak <imre.deak@intel.com>
Assisted-by: Copilot:claude-sonnet-4-6
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
.../gpu/drm/i915/display/intel_dp_tunnel.c | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_tunnel.c b/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
index cc36d5651f6a9..c348f17d3c1e6 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
@@ -18,13 +18,40 @@
static void intel_dp_tunnel_debugfs_add(struct intel_dp *intel_dp)
{
+ struct intel_display *display = to_intel_display(intel_dp);
struct intel_connector *connector = intel_dp->attached_connector;
+ struct drm_connector_list_iter conn_iter;
+ struct intel_connector *iter;
if (!connector || !intel_dp->tunnel)
return;
drm_dp_tunnel_debugfs_add(intel_dp->tunnel,
connector->base.debugfs_entry);
+
+ /*
+ * After a tunnel destroy/re-detect cycle the new tunnel object
+ * has an empty debugfs_dirs list, but MST child connectors are
+ * not unregistered/re-registered (only the primary path goes
+ * through intel_connector_debugfs_add() again). Walk live MST
+ * children of @intel_dp and (re-)register their dp_tunnel/
+ * subdir against the current tunnel. The DRM-core helper
+ * deduplicates by parent dentry, so this is safe on the initial
+ * detect path too.
+ */
+ drm_connector_list_iter_begin(display->drm, &conn_iter);
+ for_each_intel_connector_iter(iter, &conn_iter) {
+ if (iter == connector)
+ continue;
+ if (iter->mst.dp != intel_dp)
+ continue;
+ if (!iter->base.debugfs_entry)
+ continue;
+
+ drm_dp_tunnel_debugfs_add(intel_dp->tunnel,
+ iter->base.debugfs_entry);
+ }
+ drm_connector_list_iter_end(&conn_iter);
}
struct intel_dp_tunnel_inherited_state {
--
2.25.1
next prev parent reply other threads:[~2026-05-11 5:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 5:40 [RFC 0/7] drm/display/dp_tunnel: Add debugfs surface for BWA validation Kunal Joshi
2026-05-11 5:40 ` [RFC 1/7] drm/display/dp_tunnel: Add debugfs interface with info file Kunal Joshi
2026-05-11 5:40 ` [RFC 2/7] drm/display/dp_tunnel: Add bw_alloc_enable debugfs knob Kunal Joshi
2026-05-11 5:40 ` [RFC 3/7] drm/display/dp_tunnel: Add bw_limit debugfs cap for BW pressure injection Kunal Joshi
2026-05-11 5:40 ` [RFC 4/7] drm/i915/dp_tunnel: Wire up DP tunnel debugfs from DRM core Kunal Joshi
2026-05-11 5:40 ` [RFC 5/7] drm/i915/display: Expose DP tunnel debugfs under each connector Kunal Joshi
2026-05-11 5:40 ` [RFC 6/7] drm/display/dp_tunnel: Sync SW allocated_bw after enabling BW alloc Kunal Joshi
2026-05-11 5:40 ` Kunal Joshi [this message]
2026-05-11 14:54 ` ✓ i915.CI.BAT: success for drm/display/dp_tunnel: Add debugfs surface for BWA validation Patchwork
2026-05-11 20:10 ` ✗ i915.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260511054028.1310995-8-kunal1.joshi@intel.com \
--to=kunal1.joshi@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox