From: "Souza, Jose" <jose.souza@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [10/12] drm/i915: Introduce HPD_PORT_TC<n>
Date: Mon, 14 Sep 2020 16:58:33 +0000 [thread overview]
Message-ID: <eb854ce65015611df9c9edabfd9a17a15651ba07.camel@intel.com> (raw)
In-Reply-To: <20200914144841.GP6112@intel.com>
On Mon, 2020-09-14 at 17:48 +0300, Ville Syrjälä wrote:
> On Sat, Sep 12, 2020 at 01:30:23AM +0000, Souza, Jose wrote:
> > On Wed, 2020-07-01 at 00:55 +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <
> > > ville.syrjala@linux.intel.com
> > >
> > >
> > > Make a clean split between hpd pins for DDI vs. TC. This matches
> > > how the actual hardware is split.
> > >
> > > And with this we move the DDI/PHY->HPD pin mapping into the encoder
> > > init instead of having to remap yet again in the interrupt code.
> > >
> > > Signed-off-by: Ville Syrjälä <
> > > ville.syrjala@linux.intel.com
> > >
> > >
> > > ---
> > > drivers/gpu/drm/i915/display/intel_ddi.c | 65 +++++++++-
> > > drivers/gpu/drm/i915/display/intel_hotplug.c | 25 +---
> > > drivers/gpu/drm/i915/i915_drv.h | 17 +--
> > > drivers/gpu/drm/i915/i915_irq.c | 121 +++++--------------
> > > 4 files changed, 102 insertions(+), 126 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > index d024491738b3..a2c9815c5abc 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > @@ -4847,6 +4847,57 @@ intel_ddi_max_lanes(struct intel_digital_port *intel_dport)
> > > return max_lanes;
> > > }
> > >
> > > +static enum hpd_pin tgl_hpd_pin(struct drm_i915_private *dev_priv,
> > > + enum port port)
> > > +{
> > > + if (port >= PORT_D)
> > > + return HPD_PORT_TC1 + port - PORT_D;
> > > + else
> > > + return HPD_PORT_A + port - PORT_A;
> > > +}
> > > +
> > > +static enum hpd_pin rkl_hpd_pin(struct drm_i915_private *dev_priv,
> > > + enum port port)
> > > +{
> > > + if (HAS_PCH_TGP(dev_priv))
> > > + return tgl_hpd_pin(dev_priv, port);
> > > +
> > > + if (port >= PORT_D)
> > > + return HPD_PORT_C + port - PORT_D;
> >
> > The above looks wrong, for it would match with only the return bellow.
>
> On rkl+tgp we want:
> PORT_A (DDI A) -> HPD_PORT_A
> PORT_B (DDI B) -> HPD_PORT_B
> PORT_D (DDI TC1) -> HPD_PORT_TC1
> PORT_E (DDI TC2) -> HPD_PORT_TC2
>
> On rkl+cmp we want:
> PORT_A (DDI A) -> HPD_PORT_A
> PORT_B (DDI B) -> HPD_PORT_B
> PORT_D (DDI TC1) -> HPD_PORT_C
> PORT_E (DDI TC2) -> HPD_PORT_D
oohh okay, missed this.
>
> > > + else
> > > + return HPD_PORT_A + port - PORT_A;
> > > +}
> > > +
> > > +static enum hpd_pin icl_hpd_pin(struct drm_i915_private *dev_priv,
> > > + enum port port)
> > > +{
> > > + if (port >= PORT_C)
> > > + return HPD_PORT_TC1 + port - PORT_C;
> > > + else
> > > + return HPD_PORT_A + port - PORT_A;
> > > +}
> > > +
> > > +static enum hpd_pin ehl_hpd_pin(struct drm_i915_private *dev_priv,
> > > + enum port port)
> > > +{
> > > + if (port == PORT_D)
> > > + return HPD_PORT_A;
> > > +
> > > + if (HAS_PCH_MCC(dev_priv))
> > > + return icl_hpd_pin(dev_priv, port);
> >
> > Maybe call tgl_hpd_pin() for HAS_PCH_MCC()? The code bellow will match but just for consistency.
>
> On jsl+mcc we want:
> PORT_A/D (DDI A/D) -> HPD_PORT_A
> PORT_B (DDI B) -> HPD_PORT_B
> PORT_C (DDI C) -> HPD_PORT_TC1
>
> on jsl+icp we want:
> PORT_A/D (DDI A/D) -> HPD_PORT_A
> PORT_B (DDI B) -> HPD_PORT_B
> PORT_C (DDI C) -> HPD_PORT_C
>
>
The above would be the output of tgl_hpd_pin() but okay as it can be associate with SPT, LPT, ICP and TGP better keep the current code.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-14 16:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200630215601.28557-11-ville.syrjala@linux.intel.com>
2020-09-12 1:30 ` [Intel-gfx] [10/12] drm/i915: Introduce HPD_PORT_TC<n> Souza, Jose
2020-09-14 14:48 ` Ville Syrjälä
2020-09-14 16:58 ` Souza, Jose [this message]
2020-09-14 17:06 ` Ville Syrjälä
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=eb854ce65015611df9c9edabfd9a17a15651ba07.camel@intel.com \
--to=jose.souza@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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