From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/i9xx_wm: Prefer intel_de functions over intel_uncore.
Date: Wed, 8 Mar 2023 23:53:54 +0200 [thread overview]
Message-ID: <ZAkD8vJTr3J2DSE7@intel.com> (raw)
In-Reply-To: <ZAjRjK57OQV4rFAo@intel.com>
On Wed, Mar 08, 2023 at 08:18:52PM +0200, Ville Syrjälä wrote:
> On Wed, Mar 08, 2023 at 12:56:28PM -0500, Rodrigo Vivi wrote:
> > On Wed, Mar 08, 2023 at 07:50:27PM +0200, Ville Syrjälä wrote:
> > > On Wed, Mar 08, 2023 at 11:58:59AM -0500, Rodrigo Vivi wrote:
> > > > } else if (IS_I915GM(dev_priv)) {
> > > > /*
> > > > * FIXME can't find a bit like this for 915G, and
> > > > * yet it does have the related watermark in
> > > > * FW_BLC_SELF. What's going on?
> > > > */
> > > > - was_enabled = intel_uncore_read(&dev_priv->uncore, INSTPM) & INSTPM_SELF_EN;
> > > > + was_enabled = intel_de_read(dev_priv, INSTPM) & INSTPM_SELF_EN;
> > > > val = enable ? _MASKED_BIT_ENABLE(INSTPM_SELF_EN) :
> > > > _MASKED_BIT_DISABLE(INSTPM_SELF_EN);
> > > > - intel_uncore_write(&dev_priv->uncore, INSTPM, val);
> > > > - intel_uncore_posting_read(&dev_priv->uncore, INSTPM);
> > > > + intel_de_write(dev_priv, INSTPM, val);
> > > > + intel_de_posting_read(dev_priv, INSTPM);
> > >
> > > I'm still not really convinced that we want to
> > > use intel_de_*() for non-display registers.
> >
> > hmmm... I see...
> > so should we create a new component out of i915/display and move
> > these calls there?
> >
> > but in the end of the day it is the same uncore functions that
> > are getting calling underneath anyway, right?!
>
> Currently yes. Though I have occasionally thought about
> splitting it up lower down, since no display registers need
> forcewake, and IIRC the RM unclaimed stuff only really works
> for display registers. So we could perhaps lighten each
> side a bit by knowing ahead of time what kind of register
> we're dealing with.
>
> >
> > I believe i915/display should only call intel_de for mmio, so it
> > gets easier on the code reuse on Xe.
>
> Yeah, I get idea. However I think it might also be nice
> to check that we are not touching registers that we're
> not supposed to touch from the display code. So having
> intel_de*() validate the register offset might be nice.
> Would be especially important if we did do the lower
> level register accessor split.
>
> Though admittedly on these old platforms that valiation
> is perhaps a bit moot since the display vs. not split
> is far from clear, and even the truly dedicated display
> registers can live at rather weird offsets.
I guess we can always backpedal a bit if we do decide
to do those things. There shouldn't be that many non-display
registers in the mix anyway.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-03-08 21:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 16:58 [Intel-gfx] [PATCH 1/2] drm/i915/display: Restore dsparb_lock Rodrigo Vivi
2023-03-08 16:58 ` [Intel-gfx] [PATCH 2/2] drm/i915/i9xx_wm: Prefer intel_de functions over intel_uncore Rodrigo Vivi
2023-03-08 17:50 ` Ville Syrjälä
2023-03-08 17:56 ` Rodrigo Vivi
2023-03-08 18:18 ` Ville Syrjälä
2023-03-08 21:53 ` Ville Syrjälä [this message]
2023-03-08 22:03 ` [Intel-gfx] [PATCH 1/2] drm/i915/display: Restore dsparb_lock Ville Syrjälä
2023-03-09 22:03 ` Rodrigo Vivi
2023-03-10 16:26 ` Ville Syrjälä
2023-03-10 19:09 ` Rodrigo Vivi
2023-03-09 21:55 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/display: Restore dsparb_lock. (rev2) Patchwork
2023-03-10 20:08 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/display: Restore dsparb_lock. (rev3) Patchwork
2023-03-24 19:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/display: Restore dsparb_lock. (rev4) Patchwork
2023-03-24 19:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-24 19:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-25 1:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-03-27 16:12 [Intel-gfx] [PATCH 1/2] drm/i915/display: Restore dsparb_lock Rodrigo Vivi
2023-03-27 16:12 ` [Intel-gfx] [PATCH 2/2] drm/i915/i9xx_wm: Prefer intel_de functions over intel_uncore Rodrigo Vivi
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=ZAkD8vJTr3J2DSE7@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.