[Intel-gfx] [PATCH v4 08/23] drm/i915/adl_p: Handle TC cold
Souza, Jose
jose.souza at intel.com
Mon May 17 23:15:05 UTC 2021
On Mon, 2021-05-17 at 17:53 +0300, Imre Deak wrote:
> On Fri, May 14, 2021 at 08:10:20PM -0700, Matt Roper wrote:
> > From: José Roberto de Souza <jose.souza at intel.com>
> >
> > On ADL-P TC cold is exited and blocked when legacy aux is powered,
> > that is exacly the same of what ICL need for static TC ports.
> >
> > TODO: When a TBT hub or monitor is connected it will cause TBT and
> > legacy aux to be powered at the same time, hopefully this will not
> > cause any issues but if it do, some rework will be needed.
> >
> > v2:
> > - skip icl_tc_port_assert_ref_held() warn on, adl-p uses aux to
> > block TC cold
> >
> > BSpec: 55480
> > Cc: Imre Deak <imre.deak at intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> > Signed-off-by: Clinton Taylor <Clinton.A.Taylor at intel.com>
> > Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_display_power.c | 3 ++-
> > drivers/gpu/drm/i915/display/intel_tc.c | 2 +-
> > 2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> > index 54c6d65011ee..29d2f1d0cffd 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> > @@ -551,7 +551,8 @@ static void icl_tc_port_assert_ref_held(struct drm_i915_private *dev_priv,
> > if (drm_WARN_ON(&dev_priv->drm, !dig_port))
> > return;
> >
> > - if (DISPLAY_VER(dev_priv) == 11 && dig_port->tc_legacy_port)
> > + if (IS_ALDERLAKE_P(dev_priv) ||
>
> A TC port reference is held whenever enabling the port's AUX power
> domain (so whenever blocking TC-cold for instance), so this shouldn't be
> needed.
I'm kinda of rusty in this area so I could be making a mistake but I don't see how tc_lock is held or tc_link_refcount is != 0 when enabling aux to do
a DPCD transaction when the port is no driving image to the sink.
Will do some experiments and update here.
>
> OTOH, the !aux_powered check in intel_tc_port_reset_mode() needs this
> exception, since there TC-cold must be blocked and so AUX will be
> enabled as opposed to other platforms.
>
> Also, in icl_tc_phy_aux_power_well_enable() we need to avoid the power
> well enabling timeout error message, since it won't get enabled unless
> something is actually plugged to the TC connector.
Agree with both above, planning to squash patch.txt to fix it and make sure we don't have similar issues with future platforms.
>
> > + (DISPLAY_VER(dev_priv) == 11 && dig_port->tc_legacy_port))
> > return;
> >
> > drm_WARN_ON(&dev_priv->drm, !intel_tc_port_ref_held(dig_port));
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> > index e325463acddd..1b108dea5fed 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -28,7 +28,7 @@ tc_cold_get_power_domain(struct intel_digital_port *dig_port)
> > {
> > struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
> >
> > - if (DISPLAY_VER(i915) == 11)
> > + if (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) == 11)
> > return intel_legacy_aux_to_power_domain(dig_port->aux_ch);
> > else
> > return POWER_DOMAIN_TC_COLD_OFF;
> > --
> > 2.25.4
> >
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210517/219a938f/attachment.txt>
More information about the Intel-gfx
mailing list