Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/display: Increase AUX timeout for Type-C
Date: Mon, 17 Apr 2023 14:53:27 +0300	[thread overview]
Message-ID: <ZD0zN66ryN2HqqYV@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <SN7PR11MB6750A7954E47CF19AA16DDD9E39C9@SN7PR11MB6750.namprd11.prod.outlook.com>

On Mon, Apr 17, 2023 at 02:43:25PM +0300, Kandpal, Suraj wrote:
> > [...]
> > Adding a non-default enable_timeout to the power well descriptor would
> > avoid adding more platform checks:
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power_map.c
> > b/drivers/gpu/drm/i915/display/intel_display_power_map.c
> > index 6645eb1911d85..8ca1f34be14c2 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power_map.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power_map.c
> > @@ -1378,13 +1378,18 @@ static const struct i915_power_well_desc
> > xelpd_power_wells_main[] = {
> >                       I915_PW("AUX_C", &icl_pwdoms_aux_c, .hsw.idx = ICL_PW_CTL_IDX_AUX_C),
> >                       I915_PW("AUX_D", &icl_pwdoms_aux_d, .hsw.idx = XELPD_PW_CTL_IDX_AUX_D),
> >                       I915_PW("AUX_E", &icl_pwdoms_aux_e, .hsw.idx = XELPD_PW_CTL_IDX_AUX_E),
> > +             ),
> > +             .ops = &icl_aux_power_well_ops,
> > +             .fixed_enable_delay = true,
> > +     }, {
> > +             .instances = &I915_PW_INSTANCES(
> >                       I915_PW("AUX_USBC1", &tgl_pwdoms_aux_usbc1, .hsw.idx = TGL_PW_CTL_IDX_AUX_TC1),
> >                       I915_PW("AUX_USBC2", &tgl_pwdoms_aux_usbc2, .hsw.idx = TGL_PW_CTL_IDX_AUX_TC2),
> >                       I915_PW("AUX_USBC3", &tgl_pwdoms_aux_usbc3, .hsw.idx = TGL_PW_CTL_IDX_AUX_TC3),
> >                       I915_PW("AUX_USBC4", &tgl_pwdoms_aux_usbc4, .hsw.idx = TGL_PW_CTL_IDX_AUX_TC4),
> >               ),
> >               .ops = &icl_aux_power_well_ops,
> > -             .fixed_enable_delay = true,
> > +             .enable_timeout = 500,
> >       }, {
> >               .instances = &I915_PW_INSTANCES(
> >                       I915_PW("AUX_TBT1", &icl_pwdoms_aux_tbt1,
> > .hsw.idx = TGL_PW_CTL_IDX_AUX_TBT1), diff --git
> > a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > index 62bafcbc7937c..930a42c825c36 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > @@ -253,6 +253,7 @@ static void hsw_wait_for_power_well_enable(struct
> > drm_i915_private *dev_priv,  {
> >       const struct i915_power_well_regs *regs = power_well->desc->ops->regs;
> >       int pw_idx = i915_power_well_instance(power_well)->hsw.idx;
> > +     int timeout = power_well->desc->enable_timeout ? : 1;
> >
> >       /*
> >        * For some power wells we're not supposed to watch the status bit
> > for @@ -266,7 +267,7 @@ static void
> > hsw_wait_for_power_well_enable(struct drm_i915_private *dev_priv,
> >
> >       /* Timeout for PW1:10 us, AUX:not specified, other PWs:20 us. */
> >       if (intel_de_wait_for_set(dev_priv, regs->driver,
> > -                               HSW_PWR_WELL_CTL_STATE(pw_idx), 1)) {
> > +                               HSW_PWR_WELL_CTL_STATE(pw_idx), timeout)) {
> >               drm_dbg_kms(&dev_priv->drm, "%s power well enable timeout\n",
> >                           intel_power_well_name(power_well));
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.h
> > b/drivers/gpu/drm/i915/display/intel_display_power_well.h
> > index ba7cb977e7c7f..fd5acf68503e1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power_well.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.h
> > @@ -110,6 +110,8 @@ struct i915_power_well_desc {
> >        * Thunderbolt mode.
> >        */
> >       u16 is_tc_tbt:1;
> > +     /* Enable timeout if bigger than the default 1ms. */
> > +     u16 enable_timeout;
> >  };
> >
> 
> How would we make sure that this timeout only applies to ADLS in that
> case as that's whom the workaround is for?

The HSD is for display 13 ADL, that is ADL-P/M/N. The ADL-S power wells
are described separately in adls_power_wells.

--Imre

  reply	other threads:[~2023-04-17 11:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03  8:01 [Intel-gfx] [PATCH] drm/i915/display: Increase AUX timeout for Type-C Suraj Kandpal
2023-04-03 10:11 ` Nautiyal, Ankit K
2023-04-03 14:58 ` Murthy, Arun R
2023-04-04  5:40   ` Kandpal, Suraj
2023-04-03 15:01 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2023-04-05  7:19 ` [Intel-gfx] [PATCH v2] " Suraj Kandpal
2023-04-17  4:30   ` Murthy, Arun R
2023-04-17  6:51     ` Kandpal, Suraj
2023-04-17  7:33       ` Murthy, Arun R
2023-04-17  8:52   ` Jani Nikula
2023-04-17 10:18     ` Kandpal, Suraj
2023-04-17 10:33       ` Jani Nikula
2023-04-17 10:51         ` Kandpal, Suraj
2023-04-17 10:56           ` Jani Nikula
2023-04-17 11:00             ` Kandpal, Suraj
2023-04-17 11:15               ` Jani Nikula
2023-04-17 11:27             ` Imre Deak
2023-04-17 11:39               ` Kandpal, Suraj
2023-04-17 11:43               ` Kandpal, Suraj
2023-04-17 11:53                 ` Imre Deak [this message]
2023-04-17 12:25                   ` Kandpal, Suraj
2023-04-17 12:29                     ` Imre Deak
2023-04-18  5:02                       ` Kandpal, Suraj
2023-04-18  6:44                         ` Jani Nikula
2023-04-05 19:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Increase AUX timeout for Type-C (rev2) Patchwork
2023-04-06 10:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-17 15:24 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Increase AUX timeout for Type-C (rev3) Patchwork
2023-04-17 15:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-17 23:30 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-04-18  9:23 ` [Intel-gfx] [PATCH v3] drm/i915/display: Increase AUX timeout for Type-C Suraj Kandpal
2023-04-18 10:00   ` Jani Nikula
2023-04-18 10:10   ` Imre Deak
2023-04-18 10:52 ` [Intel-gfx] [PATCH v4] " Suraj Kandpal
2023-04-18 10:54   ` Suraj Kandpal
2023-04-18 11:03     ` Imre Deak
2023-04-18 11:45       ` Kandpal, Suraj
2023-04-18 12:41         ` Imre Deak
2023-04-18 11:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Increase AUX timeout for Type-C (rev6) Patchwork
2023-04-18 11:56 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-04-18 13:05 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/display: Increase AUX timeout for Type-C (rev7) Patchwork
2023-04-18 13:14 ` [Intel-gfx] [PATCH v5] drm/i915/display: Increase AUX timeout for Type-C Suraj Kandpal
2023-04-19 12:28   ` Imre Deak
2023-04-18 14:00 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Increase AUX timeout for Type-C (rev8) Patchwork
2023-04-18 14:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-18 17:06 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=ZD0zN66ryN2HqqYV@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox