From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
imre.deak@intel.com, mika.kahola@intel.com,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS
Date: Tue, 24 Nov 2026 15:06:58 +0200 [thread overview]
Message-ID: <awWL8jQGrCxadBMt@intel.com> (raw)
In-Reply-To: <20261123050422.3130438-1-suraj.kandpal@intel.com>
On Mon, Nov 23, 2026 at 10:34:23AM +0530, Suraj Kandpal wrote:
> Some VBTs declare an unpopulated eDP port next to the real panel and
> assign both the same PPS. The ghost port adopts the VDD bit the real
> port turned on, and when its DPCD read fails it clears EDP_FORCE_VDD
> underneath the real port. The real port's VDD reference is then never
> released, leaking an AUX power domain reference and a runtime PM
> wakelock:
>
> drm_WARN_ON(intel_dp->pps.vdd_wakeref)
> i915 raw-wakerefs=1 wakelocks=1 on cleanup
>
> Don't adopt or turn off VDD owned by another eDP port on the same PPS.
>
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17232
> Cc: stable@vger.kernel.org # v6.15+
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_pps.c | 35 ++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
> index 442b00491a88..653b8bf7ec6d 100644
> --- a/drivers/gpu/drm/i915/display/intel_pps.c
> +++ b/drivers/gpu/drm/i915/display/intel_pps.c
> @@ -570,6 +570,30 @@ static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
> return intel_de_read(display, _pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD;
> }
>
> +static bool pps_vdd_owned_by_other_port(struct intel_dp *intel_dp)
> +{
> + struct intel_display *display = to_intel_display(intel_dp);
> + struct intel_encoder *encoder;
> +
> + lockdep_assert_held(&display->pps.mutex);
> +
> + if (display->platform.valleyview || display->platform.cherryview)
> + return false;
> +
> + for_each_intel_dp(display->drm, encoder) {
> + struct intel_dp *dp = enc_to_intel_dp(encoder);
> +
> + if (dp == intel_dp || encoder->type != INTEL_OUTPUT_EDP)
> + continue;
> +
> + if (dp->pps.pps_idx == intel_dp->pps.pps_idx &&
> + dp->pps.vdd_wakeref)
> + return true;
> + }
> +
> + return false;
> +}
> +
> void intel_pps_check_power_unlocked(struct intel_dp *intel_dp)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> @@ -839,6 +863,9 @@ static void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
> if (!edp_have_panel_vdd(intel_dp))
> return;
>
> + if (!intel_dp->pps.vdd_wakeref && pps_vdd_owned_by_other_port(intel_dp))
> + return;
> +
> drm_dbg_kms(display->drm, "[ENCODER:%d:%s] %s turning VDD off\n",
> dig_port->base.base.base.id, dig_port->base.base.name,
> pps_name(intel_dp));
> @@ -1334,6 +1361,14 @@ static void pps_vdd_init(struct intel_dp *intel_dp)
> if (!edp_have_panel_vdd(intel_dp))
> return;
>
> + if (pps_vdd_owned_by_other_port(intel_dp)) {
> + drm_dbg_kms(display->drm,
> + "[ENCODER:%d:%s] %s VDD owned by another eDP port, not adopting it\n",
> + dig_port->base.base.base.id, dig_port->base.base.name,
> + pps_name(intel_dp));
> + return;
> + }
If someone else already owns the PPS then we should stop the probe
of the current port right here. So I think this belongs in
pps_initial_setup(). And it should not look at the wakeref,
pps_idx alone should be sufficient to figure out who owns what.
That will also avoid racing with the delayed VDD off from a
previously probed port.
I think the proper solution for this PPS init mess should be
something along the lines of:
- extract the PPS tracking out from intel_dp into its' own per PPS
object, and have each intel_dp just point to the right one.
VLV/CHV with their screwed up PPS hardware would probably be the
hardest thing to handle here.
- never turn VDD off during until connector probing is fully done
- if multiple encoders are trying to use the same PPS let the first
one to successfully probe own it, don't even probe the remaining ones
- after all connectors are probed turn off all PPSs that aren't in
use, and schedule the delayed off for the ones that are in use
but that's a lot of work, so we do probably want a less refined
stopgap first.
> +
> /*
> * The VDD bit needs a power domain reference, so if the bit is
> * already enabled when we boot or resume, grab this reference and
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-11-24 13:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 5:04 [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS Suraj Kandpal
2026-11-23 5:10 ` ✗ CI.checkpatch: warning for " Patchwork
2026-11-23 5:12 ` ✗ CI.KUnit: failure " Patchwork
2026-11-23 17:04 ` ✓ i915.CI.BAT: success " Patchwork
2026-11-23 21:18 ` ✓ i915.CI.Full: " Patchwork
2026-11-24 12:12 ` [PATCH] " Kahola, Mika
2026-11-25 3:56 ` Kandpal, Suraj
2026-11-24 13:06 ` Ville Syrjälä [this message]
2026-11-25 4:24 ` [PATCH v2] drm/i915/pps: Reject eDP ports whose PPS is already in use Suraj Kandpal
2026-11-30 9:12 ` Kahola, Mika
2026-12-01 2:58 ` Kandpal, Suraj
2026-11-25 4:33 ` ✓ CI.KUnit: success for drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS (rev2) Patchwork
2026-11-25 5:14 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-11-25 6:18 ` ✓ i915.CI.BAT: success " Patchwork
2026-11-25 7:43 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-26 3:34 ` ✓ 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=awWL8jQGrCxadBMt@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
--cc=stable@vger.kernel.org \
--cc=suraj.kandpal@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 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.