From: Imre Deak <imre.deak@intel.com>
To: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Cc: <stable@vger.kernel.org>
Subject: [PATCH 1/6] drm/i915/dp_aux: Take the TypeC port lock after the PPS lock
Date: Thu, 29 Oct 2026 13:30:12 +0200 [thread overview]
Message-ID: <20261029113017.618286-2-imre.deak@intel.com> (raw)
In-Reply-To: <20261029113017.618286-1-imre.deak@intel.com>
An upcoming change will need to acquire a TypeC port link reference
along with an AUX power domain reference when enabling PPS VDD for the
port during an AUX transfer. Acquiring the link reference requires
holding the TypeC port lock.
To allow the PPS VDD code to take this lock itself, acquire the TypeC
port lock in the AUX transfer function only after locking PPS and
enabling VDD.
CC: stable@vger.kernel.org # 6.14+
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp_aux.c | 39 ++++++++++-----------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
index 394326d17e0da..63bd72e537ec3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
@@ -269,22 +269,6 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
for (i = 0; i < ARRAY_SIZE(ch_data); i++)
ch_data[i] = intel_dp->aux_ch_data_reg(intel_dp, i);
- intel_digital_port_lock(encoder);
- /*
- * Abort transfers on a disconnected port as required by
- * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX
- * timeouts that would otherwise happen.
- */
- if (!intel_dp_is_edp(intel_dp) &&
- !intel_digital_port_connected_locked(&dig_port->base)) {
- ret = -ENXIO;
- goto out_unlock;
- }
-
- aux_domain = intel_aux_power_domain(dig_port);
-
- aux_wakeref = intel_display_power_get(display, aux_domain);
-
/*
* The PPS state needs to be locked for:
* - eDP on all platforms, since AUX transfers on eDP need VDD power
@@ -307,6 +291,21 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
*/
vdd = intel_pps_vdd_on_unlocked(intel_dp);
+ intel_digital_port_lock(encoder);
+ /*
+ * Abort transfers on a disconnected port as required by
+ * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX
+ * timeouts that would otherwise happen.
+ */
+ if (!intel_dp_is_edp(intel_dp) &&
+ !intel_digital_port_connected_locked(&dig_port->base)) {
+ ret = -ENXIO;
+ goto out_unlock;
+ }
+
+ aux_domain = intel_aux_power_domain(dig_port);
+ aux_wakeref = intel_display_power_get(display, aux_domain);
+
/*
* dp aux is extremely sensitive to irq latency, hence request the
* lowest possible wakeup latency and so prevent the cpu from going into
@@ -450,16 +449,16 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
out:
cpu_latency_qos_update_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE);
+ intel_display_power_put_async(display, aux_domain, aux_wakeref);
+out_unlock:
+ intel_digital_port_unlock(encoder);
+
if (vdd)
intel_pps_vdd_off_unlocked(intel_dp, false);
if (pps_wakeref)
intel_pps_unlock(intel_dp, pps_wakeref);
- intel_display_power_put_async(display, aux_domain, aux_wakeref);
-out_unlock:
- intel_digital_port_unlock(encoder);
-
return ret;
}
--
2.49.1
next prev parent reply other threads:[~2026-10-29 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 11:30 [PATCH 0/6] drm/i915/ptl+: Fix eDP support on TypeC PHYs Imre Deak
2026-10-29 11:30 ` Imre Deak [this message]
2026-10-29 11:30 ` [PATCH 2/6] drm/i915/pps: Hold a TypeC link reference for PPS VDD Imre Deak
2026-10-29 11:30 ` [PATCH 3/6] drm/i915/pps: Reset PPS state after TypeC port init on resume Imre Deak
2026-10-29 11:30 ` [PATCH 4/6] drm/i915/ptl+: Add TypeC HPD pin selection for port B Imre Deak
2026-10-29 11:30 ` [PATCH 5/6] drm/i915/mtl+: Use PHY type to identify TypeC ports in PLL ID lookup Imre Deak
2026-10-29 11:38 ` sashiko-bot
2026-10-29 11:30 ` [PATCH 6/6] drm/i915/ptl+: Fix TypeC detection for eDP on port B Imre Deak
2026-10-29 11:37 ` ✗ CI.checkpatch: warning for drm/i915/ptl+: Fix eDP support on TypeC PHYs Patchwork
2026-10-29 11:40 ` ✓ CI.KUnit: success " Patchwork
2026-10-29 12:16 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-10-29 13:21 ` ✓ i915.CI.BAT: success " Patchwork
2026-10-29 23:50 ` ✗ Xe.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=20261029113017.618286-2-imre.deak@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.