* [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS
@ 2026-11-23 5:04 Suraj Kandpal
2026-11-24 12:12 ` Kahola, Mika
2026-11-24 13:06 ` Ville Syrjälä
0 siblings, 2 replies; 3+ messages in thread
From: Suraj Kandpal @ 2026-11-23 5:04 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: imre.deak, mika.kahola, Suraj Kandpal, stable
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;
+ }
+
/*
* 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
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS
2026-11-23 5:04 [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS Suraj Kandpal
@ 2026-11-24 12:12 ` Kahola, Mika
2026-11-24 13:06 ` Ville Syrjälä
1 sibling, 0 replies; 3+ messages in thread
From: Kahola, Mika @ 2026-11-24 12:12 UTC (permalink / raw)
To: Kandpal, Suraj, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org
Cc: Deak, Imre, stable@vger.kernel.org
> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal@intel.com>
> Sent: Monday, 23 November 2026 7.04
> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> Cc: Deak, Imre <imre.deak@intel.com>; Kahola, Mika <mika.kahola@intel.com>; Kandpal, Suraj <suraj.kandpal@intel.com>;
> stable@vger.kernel.org
> Subject: [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS
>
> 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+
Is there a patch which is fixed by this patch? This patch could benefit of having Fixes tag as well.
Otherwise LGTM,
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> 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;
> + }
> +
> /*
> * 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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS
2026-11-23 5:04 [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS Suraj Kandpal
2026-11-24 12:12 ` Kahola, Mika
@ 2026-11-24 13:06 ` Ville Syrjälä
1 sibling, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2026-11-24 13:06 UTC (permalink / raw)
To: Suraj Kandpal; +Cc: intel-gfx, intel-xe, imre.deak, mika.kahola, stable
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-24 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 5:04 [PATCH] drm/i915/pps: Don't steal VDD from another eDP port sharing the PPS Suraj Kandpal
2026-11-24 12:12 ` Kahola, Mika
2026-11-24 13:06 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox