From: Arun R Murthy <arun.r.murthy@intel.com>
To: Simona Vetter <simona@ffwll.ch>,
Jani Nikula <jani.nikula@linux.intel.com>,
ville.syrjala@linux.intel.com, suraj.kandpal@intel.com,
imre.deak@intel.com
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCH RFC 1/3] drm/display/dp: Export function to wake the sink AUX_CH
Date: Mon, 09 Mar 2026 12:59:24 +0530 [thread overview]
Message-ID: <20260309-dp_aux_timeout-v1-1-08c610a63a84@intel.com> (raw)
In-Reply-To: <20260309-dp_aux_timeout-v1-0-08c610a63a84@intel.com>
On a native AUX_CH transaction timeout, as per Spec 2.1 Section 2.3.4
says that if the AUX Reply Timeout timer timesout, DPTX can rety for 3
times because the No Reply may be due to the DPRX waking up from
power-saving state.
Export a function to wake the DP sink AUX_CH.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 36 +++++++++++++++++++++++++++++++++
include/drm/display/drm_dp_helper.h | 1 +
2 files changed, 37 insertions(+)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index a697cc227e28964cd8322803298178e7d788e820..1b8aa543ec3dc5819948af6f2724f3514b96b918 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -701,6 +701,42 @@ void drm_dp_dpcd_set_powered(struct drm_dp_aux *aux, bool powered)
}
EXPORT_SYMBOL(drm_dp_dpcd_set_powered);
+/**
+ * drm_dp_wake_sink() - Try to wake up the sink device AUX_CH if in sleep
+ *
+ * @aux: DisplayPort AUX channel
+ */
+void drm_dp_wake_sink(struct drm_dp_aux *aux)
+{
+ const u8 wake_retry = 6;
+ u8 value = 0;
+ int ret = 0;
+
+ /*
+ * Wake the sink device
+ * Spec DP2.1 section 2.3.1.2 if AUX CH is powered down by writing 0x02
+ * to DP_SET_POWER dpcd reg, 1ms time would be required to wake it up
+ */
+ ret = poll_timeout_us(ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &value),
+ ret > 0,
+ 1000, wake_retry * 1000, true);
+
+ /*
+ * If sink is in D3 then it may not respond to the AUX tx so
+ * wake it up to D3_AUX_ON state
+ * If the above poll_timeout_us fails, try waking the sink.
+ */
+ if (value == DP_SET_POWER_D3 || ret < 0) {
+ /* After setting to D0 need a min of 1ms to wake(Spec DP2.1 sec 2.3.1.2) */
+ drm_dp_dpcd_writeb(aux, DP_SET_POWER,
+ DP_SET_POWER_D0);
+ fsleep(1000);
+ drm_dp_dpcd_writeb(aux, DP_SET_POWER,
+ DP_SET_POWER_D3_AUX_ON);
+ }
+}
+EXPORT_SYMBOL(drm_dp_wake_sink);
+
/**
* drm_dp_dpcd_set_probe() - Set whether a probing before DPCD access is done
* @aux: DisplayPort AUX channel
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 1d0acd58f48676f60ff6a07cc6812f72cbb452e8..933428025c4d75ab7a0aa63039ed5f8e45ca625b 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -546,6 +546,7 @@ struct drm_dp_aux {
bool dpcd_probe_disabled;
};
+void drm_dp_wake_sink(struct drm_dp_aux *aux);
int drm_dp_dpcd_probe(struct drm_dp_aux *aux, unsigned int offset);
void drm_dp_dpcd_set_powered(struct drm_dp_aux *aux, bool powered);
void drm_dp_dpcd_set_probe(struct drm_dp_aux *aux, bool enable);
--
2.25.1
next prev parent reply other threads:[~2026-03-09 7:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 7:29 [PATCH RFC 0/3] Some updates over DP AUX Transactions Arun R Murthy
2026-03-09 7:29 ` Arun R Murthy [this message]
2026-03-10 2:41 ` Claude review: drm/display/dp: Export function to wake the sink AUX_CH Claude Code Review Bot
2026-03-09 7:29 ` [PATCH RFC 2/3] drm/i915/dp: On AUX_CH tx timeout, wake up the sink Arun R Murthy
2026-03-10 2:41 ` Claude review: " Claude Code Review Bot
2026-03-09 7:29 ` [PATCH RFC 3/3] drm/i915/dp: Configure PORT_AUX_CTL and then trigger the tx Arun R Murthy
2026-03-09 13:09 ` Jani Nikula
2026-03-09 13:20 ` Murthy, Arun R
2026-03-10 2:41 ` Claude review: " Claude Code Review Bot
2026-03-10 2:41 ` Claude review: Some updates over DP AUX Transactions Claude Code Review Bot
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=20260309-dp_aux_timeout-v1-1-08c610a63a84@intel.com \
--to=arun.r.murthy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@linux.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