All of lore.kernel.org
 help / color / mirror / Atom feed
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>
Subject: Re: [Intel-gfx] [PATCH 3/9] drm/i915: Define more pipe timestamp registers
Date: Thu, 16 Mar 2023 11:44:41 +0200	[thread overview]
Message-ID: <ZBLlCQOB11u8IadA@intel.com> (raw)
In-Reply-To: <e69701372c2527fbfb67011a08b0322e4933f3c3.camel@intel.com>

On Thu, Mar 16, 2023 at 08:43:12AM +0000, Hogander, Jouni wrote:
> On Tue, 2023-03-14 at 15:02 +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Add definitions for various pipe timestamp registers:
> > - frame timestamp (last start of vblank) (g4x+), already had this
> > defined
> > - flip timestamp (when SURF was last written) (g4x+)
> > - flipdone timestamp (when last flipdone was signalled) (tgl+)
> > 
> > Note that on pre-tgl the flip related timestamps are only updated
> > for primary plane flips, but on tgl+ we can select which plane
> > updates them (via PIPE_MISC2). Let's define those related bits
> > as well.
> > 
> > Curiously VLV/CHV do not have the frame/flip timestamp registers,
> > despite all the other related registers being inherited from g4x.
> > This means we can get rid of the pipe_offsets[] usage for these,
> > and thus the implicit dev_priv is gone as well.
> 
> According to bspec these exist in VLV (Bspec: 8264, 8261) ?

It is lying to you.

> 
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_reg.h | 18 +++++++++++++++++-
> >  1 file changed, 17 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> > b/drivers/gpu/drm/i915/i915_reg.h
> > index a383397ebeca..66b6f451b80a 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -3526,6 +3526,8 @@
> >  #define   PIPE_MISC2_BUBBLE_COUNTER_MASK       REG_GENMASK(31, 24)
> >  #define  
> > PIPE_MISC2_BUBBLE_COUNTER_SCALER_EN  REG_FIELD_PREP(PIPE_MISC2_BUBBLE
> > _COUNTER_MASK, 80)
> >  #define  
> > PIPE_MISC2_BUBBLE_COUNTER_SCALER_DIS REG_FIELD_PREP(PIPE_MISC2_BUBBLE
> > _COUNTER_MASK, 20)
> > +#define  
> > PIPE_MISC2_FLIP_INFO_PLANE_SEL_MASK          REG_GENMASK(2, 0) /*
> > tgl+ */
> > +#define  
> > PIPE_MISC2_FLIP_INFO_PLANE_SEL(plane_id)     REG_FIELD_PREP(PIPE_MISC
> > 2_FLIP_INFO_PLANE_SEL_MASK, (plane_id))
> >  #define PIPE_MISC2(pipe)               _MMIO_PIPE(pipe,
> > _PIPE_MISC2_A, _PIPE_MISC2_B)
> >  
> >  /* Skylake+ pipe bottom (background) color */
> > @@ -7545,9 +7547,23 @@ enum skl_power_gate {
> >  #define  GEN9_TIMESTAMP_OVERRIDE_US_COUNTER_DENOMINATOR_SHIFT  12
> >  #define  GEN9_TIMESTAMP_OVERRIDE_US_COUNTER_DENOMINATOR_MASK   (0xf
> > << 12)
> >  
> > +/* g4x+, except vlv/chv! */
> >  #define _PIPE_FRMTMSTMP_A              0x70048
> > +#define _PIPE_FRMTMSTMP_B              0x71048
> >  #define PIPE_FRMTMSTMP(pipe)           \
> > -                       _MMIO_PIPE2(pipe, _PIPE_FRMTMSTMP_A)
> > +       _MMIO_PIPE(pipe, _PIPE_FRMTMSTMP_A, _PIPE_FRMTMSTMP_B)
> > +
> > +/* g4x+, except vlv/chv! */
> > +#define _PIPE_FLIPTMSTMP_A             0x7004C
> > +#define _PIPE_FLIPTMSTMP_B             0x7104C
> > +#define PIPE_FLIPTMSTMP(pipe)          \
> > +       _MMIO_PIPE(pipe, _PIPE_FLIPTMSTMP_A, _PIPE_FLIPTMSTMP_B)
> > +
> > +/* tgl+ */
> 
> This is mentioned in pre tgl documentation as well? (Bspec: 29591)

I think that is only a leftover artifact from before the
gen12+ split. If you set the filter to ICLLP (or earlier)
the register should disappear for you.

> 
> > +#define _PIPE_FLIPDONETMSTMP_A         0x70054
> > +#define _PIPE_FLIPDONETMSTMP_B         0x71054
> > +#define PIPE_FLIPDONETIMSTMP(pipe)     \
> > +       _MMIO_PIPE(pipe, _PIPE_FLIPDONETMSTMP_A,
> > _PIPE_FLIPDONETMSTMP_B)
> >  
> >  #define GGC                            _MMIO(0x108040)
> >  #define   GMS_MASK                     REG_GENMASK(15, 8)
> 
> BR,
> 
> Jouni Högander

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-03-16  9:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 13:02 [Intel-gfx] [PATCH 0/9] drm/i915: Plane cleanups and extra registers Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 1/9] drm/i915: Stop using pipe_offsets[] for PIPE_MISC* Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 2/9] drm/i915: s/PIPEMISC/PIPE_MISC/ Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 3/9] drm/i915: Define more pipe timestamp registers Ville Syrjala
2023-03-16  8:43   ` Hogander, Jouni
2023-03-16  9:44     ` Ville Syrjälä [this message]
2023-03-14 13:02 ` [Intel-gfx] [PATCH 4/9] drm/i915: Program VLV/CHV PIPE_MSA_MISC register Ville Syrjala
2023-03-16  8:55   ` Hogander, Jouni
2023-03-16  9:40     ` Ville Syrjälä
2023-03-14 13:02 ` [Intel-gfx] [PATCH 5/9] drm/i915: Define skl+ universal plane SURFLIVE registers Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 6/9] drm/i915: Define vlv/chv sprite " Ville Syrjala
2023-03-16  9:12   ` Hogander, Jouni
2023-03-16  9:41     ` Ville Syrjälä
2023-03-14 13:02 ` [Intel-gfx] [PATCH 7/9] drm/i915: Clean up skl+ plane alpha bits Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 8/9] drm/i915: Relocate intel_plane_check_src_coordinates() Ville Syrjala
2023-03-14 13:02 ` [Intel-gfx] [PATCH 9/9] drm/i915: Extract intel_sprite_uapi.c Ville Syrjala
2023-03-14 17:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Plane cleanups and extra registers Patchwork
2023-03-14 17:30 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-15 20:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-03-17 11:12 ` [Intel-gfx] [PATCH 0/9] " Hogander, Jouni

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=ZBLlCQOB11u8IadA@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --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 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.