From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Hogander, Jouni" <jouni.hogander@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915: Fix for PHY_MISC_TC1 offset
Date: Thu, 17 Feb 2022 14:56:31 +0200 [thread overview]
Message-ID: <Yg5F/xiC7PKyGU0J@intel.com> (raw)
In-Reply-To: <Yg0Rz8hntpO4WfAx@intel.com>
On Wed, Feb 16, 2022 at 05:01:35PM +0200, Ville Syrjälä wrote:
> On Wed, Feb 16, 2022 at 02:11:54PM +0000, Hogander, Jouni wrote:
> > On Wed, 2022-02-16 at 12:07 +0200, Ville Syrjälä wrote:
> > > On Wed, Feb 16, 2022 at 09:36:02AM +0000, Hogander, Jouni wrote:
> > > > On Wed, 2022-02-16 at 10:50 +0200, Ville Syrjälä wrote:
> > > > > On Tue, Feb 15, 2022 at 11:21:54AM +0530, Ramalingam C wrote:
> > > > > > From: Jouni Högander <jouni.hogander@intel.com>
> > > > > >
> > > > > > Currently ICL_PHY_MISC macro is returning offset 0x64C10 for
> > > > > > PHY_E
> > > > > > port. Correct offset is 0x64C14.
> > > > >
> > > > > Why is it PHY_E and not PHY_F?
> > > >
> > > > This is a valid question. It seems we have followed
> > > > intel_phy_is_snps()
> > > > here:
> > > >
> > > > // snip
> > > > else if (IS_DG2(dev_priv))
> > > > /*
> > > > * All four "combo" ports and the TC1 port (PHY E) use
> > > > * Synopsis PHYs.
> > > > */
> > > > return phy <= PHY_E;
> > > > // snip
> > > >
> > > > According to spec port E is "No connection". Better place to fix
> > > > this
> > > > could be intel_phy_is_snps() itself?
> > >
> > > I think the crucial question is where are all the places that
> > > the results of intel_port_to_phy() get used.
> > >
> > > I do see that for all the actual snps phy registers we
> > > do want PHY_E, but maybe it would be better to have a local
> > > SNPS_PHY enum just for intel_snps_phy.c, and leave the other
> > > phy thing for everything else?
> > >
> > > Not sure if there is some other register we index with the
> > > phy that specifically wants PHY_E?
> >
> > I went through registers accesses in intel_snps_phy.c. It is actually
> > only this one register which offset is wrong with PHY_E. Everything
> > else seems to be assuming PHY_E including those SNPS_* registers (as
> > you mentioned). I'm starting to think it would be overkill to open up
> > this phy enum for this purpose. I would propose to stick with current
> > patch. Maybe just update commit message. What do you think?
>
> I would put it the other way. It is *only* the SNPS PHY IP registers
> that use the wonky offsets (unless you found some others?). Everythting
> on the Intel IP side wants it to be PHY_F.
>
> So still would make more sense to me to add a new enum for the
> SNPS PHY instance and remap across the boundary. Otherwise we're
> just propagating this madness everwhere rather than containing in
> the SNPS PHY implementation.
Seems people want this is asap. I suppose it'll do as a temporary
measure given the phy stuff is already such mess.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
As for the proper way to do stuff, I'm thinking roughly:
enum intel_spns_phy {
SNPS_PHY_A,
...
SNPS_PHY_TC1, // == current PHY_E in value
};
and I think that can stay entirely inside intel_snps_phy.c.
As for our currnet enum phy I think we could start with something like
this:
enum phy {
PHY_A,
...
PHY_F,
PHY_TC1 = PHY_F,
...
};
I think that should make it line up with PHY_MISC stuff and the
VBT as well. So in the VBT code we could nuke all those crazy mapping
tables and just do:
old platform: port -> VBT port
new platform: phy -> VBT port
And we could probably have encoder->phy which gets populated
in the encoder init per-platform, similar to hpd_pin. That
would get rid of the intel_port_to_phy() disaster.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-02-17 12:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 5:51 [Intel-gfx] [PATCH 0/3] drm/i915/dg2: 5th Display output Ramalingam C
2022-02-15 5:51 ` [Intel-gfx] [PATCH 1/3] drm/i915/dg2: Enable 5th display Ramalingam C
2022-02-16 8:02 ` Shankar, Uma
2022-02-17 16:33 ` Matt Roper
2022-02-17 16:37 ` Matt Roper
2022-02-17 17:46 ` Ramalingam C
2022-02-17 18:42 ` [Intel-gfx] [PATCH v2 1/3] drm/i915/dg2: Enable 5th port Ramalingam C
2022-02-17 21:15 ` Lucas De Marchi
2022-02-15 5:51 ` [Intel-gfx] [PATCH 2/3] drm/i915/dg2: Drop 38.4 MHz MPLLB tables Ramalingam C
2022-02-16 8:06 ` Shankar, Uma
2022-02-17 19:35 ` Lucas De Marchi
2022-02-15 5:51 ` [Intel-gfx] [PATCH 3/3] drm/i915: Fix for PHY_MISC_TC1 offset Ramalingam C
2022-02-16 8:16 ` Shankar, Uma
2022-02-16 8:50 ` Ville Syrjälä
2022-02-16 9:36 ` Hogander, Jouni
2022-02-16 10:07 ` Ville Syrjälä
2022-02-16 14:11 ` Hogander, Jouni
2022-02-16 15:01 ` Ville Syrjälä
2022-02-17 12:56 ` Ville Syrjälä [this message]
2022-02-17 20:46 ` Lucas De Marchi
2022-02-17 19:38 ` Lucas De Marchi
2022-02-16 5:01 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dg2: 5th Display output Patchwork
2022-02-16 5:02 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-16 5:36 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-02-18 2:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dg2: 5th Display output (rev3) Patchwork
2022-02-18 2:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-18 3:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-18 13:49 ` [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=Yg5F/xiC7PKyGU0J@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@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