All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arun R Murthy" <arun.r.murthy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCHv5] drm/i915/dp: On DPCD init wake the DPRx for eDP
Date: Tue, 08 Sep 2026 16:25:46 +0000	[thread overview]
Message-ID: <20260908162547.045991F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908161248.1901822-1-arun.r.murthy@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing bitmask when checking the DP_SET_POWER state in intel_edp_wake_sink, leading to skipped wake sequences for valid sleep states.
--

commit 5baa07d75bcb19eae05989d83bea3bd4d212a13a
Author: Arun R Murthy <arun.r.murthy@intel.com>

drm/i915/dp: On DPCD init wake the DPRx for eDP

This commit attempts to wake the eDP sink before reading DPCD capabilities
to avoid AUX_CH failures when the sink is in an unknown or sleep state.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4391
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16654

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0cd5e6b5034cf..07cc39a6f2e37 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4779,6 +4779,33 @@ intel_edp_set_sink_rates(struct intel_dp *intel_dp)

[ ... ]

> +static void intel_edp_wake_sink(struct intel_dp *intel_dp)
> +{
> +	u8 value = 0;
> +	int ret;
> +
> +	/*
> +	 * Read the current sink power state. drm_dp_dpcd_read_byte() already
> +	 * retries the AUX transaction internally, so a single read suffices.
> +	 * First commercial eDP panels are Ver1.0 or 1.1, on which DPCD
> +	 * DP_SET_POWER is supported.
> +	 */
> +	ret = drm_dp_dpcd_read_byte(&intel_dp->aux, DP_SET_POWER, &value);
> +
> +	/*
> +	 * If the AUX read failed the sink may be asleep and not responding,
> +	 * or it read back D3; in either case wake it up to D3_AUX_ON.
> +	 */
> +	if (ret < 0 || value == DP_SET_POWER_D3) {
                       ^^^^^^^^^^^^^^^^^^^^^^^^

[Severity: High]
Does this strict equality check skip the wake sequence for valid sleep states?

If the sink returns a power state like DP_SET_POWER_D3_AUX_ON (0x5), or if
it returns 0x2 with non-zero reserved bits due to hardware quirks, this check
evaluates to false.

Without isolating the power state bits using a bitmask (or simply checking
if the value is not DP_SET_POWER_D0), the driver would skip writing
DP_SET_POWER_D0. Can this leave the main link powered down and cause
subsequent DPCD reads or link training to fail?

> +		/* After setting to D0 need a min of 1ms to wake (Spec DP2.1 sec 2.3.1.2) */
> +		drm_dp_dpcd_write_byte(&intel_dp->aux, DP_SET_POWER,
> +				       DP_SET_POWER_D0);
> +		fsleep(1000);
> +		drm_dp_dpcd_write_byte(&intel_dp->aux, DP_SET_POWER,
> +				       DP_SET_POWER_D0);
> +	}
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908161248.1901822-1-arun.r.murthy@intel.com?part=1

  reply	other threads:[~2026-09-08 16:25 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19  9:43 [PATCH] drm/i915/dp: On DPCD init/caps wake the DPRx Arun R Murthy
2026-02-19 10:45 ` ✗ CI.checkpatch: warning for " Patchwork
2026-02-19 10:46 ` ✓ CI.KUnit: success " Patchwork
2026-02-19 10:48 ` ✓ i915.CI.BAT: " Patchwork
2026-02-19 11:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-19 14:20 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-19 14:36 ` ✗ i915.CI.Full: " Patchwork
2026-02-19 14:53 ` [PATCH] " Ville Syrjälä
2026-02-19 15:12   ` Murthy, Arun R
2026-02-20  3:11     ` Ville Syrjälä
2026-02-20  5:01       ` Murthy, Arun R
2026-02-24  8:24         ` Ville Syrjälä
2026-02-24  8:48           ` Murthy, Arun R
2026-02-24  7:48 ` [PATCHv2] " Arun R Murthy
2026-02-24 14:50   ` Imre Deak
2026-02-25  3:33     ` Murthy, Arun R
2026-02-25  5:58       ` Murthy, Arun R
2026-03-02  7:57       ` Imre Deak
2026-03-02  9:04         ` Murthy, Arun R
2026-03-02  9:20           ` Imre Deak
2026-03-10  8:52             ` Murthy, Arun R
2026-02-24  7:56 ` ✓ CI.KUnit: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev2) Patchwork
2026-02-24  9:02 ` ✓ i915.CI.BAT: " Patchwork
2026-02-24 10:50 ` ✓ i915.CI.Full: " Patchwork
2026-02-25  6:11 ` [PATCHv3] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-08-05  9:58   ` Murthy, Arun R
2026-08-11 12:17     ` Kandpal, Suraj
2026-09-07  9:00       ` Murthy, Arun R
2026-09-07  9:04         ` Kandpal, Suraj
2026-09-07  9:06           ` Murthy, Arun R
2026-02-25  6:19 ` ✓ CI.KUnit: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev3) Patchwork
2026-02-25  6:56 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-25  7:17 ` ✗ i915.CI.BAT: failure " Patchwork
2026-02-25 11:20 ` ✗ Xe.CI.FULL: " Patchwork
2026-08-05 10:06 ` ✗ Fi.CI.BUILD: failure for drm/i915/dp: On DPCD init/caps wake the DPRx (rev4) Patchwork
2026-09-07  9:27 ` [PATCHv4] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-09-07  9:37   ` Kandpal, Suraj
2026-09-08  3:54     ` Murthy, Arun R
2026-09-08  4:13       ` Kandpal, Suraj
2026-09-07  9:40   ` sashiko-bot
2026-09-07 10:33   ` Jani Nikula
2026-09-08  4:36     ` Murthy, Arun R
2026-09-07 12:17 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev5) Patchwork
2026-09-07 19:37 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-08 16:12 ` [PATCHv5] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-09-08 16:25   ` sashiko-bot [this message]
2026-09-08 17:33 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev6) Patchwork
2026-09-09  9:27 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-15  4:23 ` [PATCHv6] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-09-15  4:32   ` sashiko-bot
2026-09-15  5:16     ` Murthy, Arun R
2026-09-15  5:46   ` Kandpal, Suraj
2026-09-15  6:20 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev7) Patchwork
2026-09-15 10:53 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-16  9:30 ` ✓ i915.CI.Full: success " 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=20260908162547.045991F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.