Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915/dmc: Also disable HRR event on TGL main DMC
Date: Wed, 13 Dec 2023 11:31:24 +0200	[thread overview]
Message-ID: <ZXl57Kgi78g9Wx-h@intel.com> (raw)
In-Reply-To: <ZXlotrNjfr2yja5/@ideak-desk.fi.intel.com>

On Wed, Dec 13, 2023 at 10:17:58AM +0200, Imre Deak wrote:
> On Mon, Dec 11, 2023 at 11:37:49PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Unlike later platforms TGL has the half refresh rate (HRR) event
> > on the main DMC (as opposed to the pipe DMC). Since we're disabling
> > that event on all later platforms already let's do the same on
> > TGL as well.
> > 
> > There is supposedly a bit somewhere (DMC_CHICKEN on TGL) to make
> > the handler not do anything, but we don't currently have code
> > to frob it. Though that bit should be off by default, the ADL+
> > experience has shown us that trusting any of this isn't a good
> > idea. So seems safer to just disable all event handlers we know
> > that we don't need.
> > 
> > Also the TGL DMC firmware is apparently using the wrong event
> > (undelayed vblank) here anyway. It should be using the delayed
> > vblank event instead (like ADL+ firmware does), but they didn't
> > release a firmware fix for this and instead just hacked around
> > this in the Windows driver code :/
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dmc.c      | 5 +++++
> >  drivers/gpu/drm/i915/display/intel_dmc_regs.h | 1 +
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
> > index 9385898e3aa5..0722d322ec63 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> > @@ -448,6 +448,11 @@ static bool disable_dmc_evt(struct drm_i915_private *i915,
> >  	    REG_FIELD_GET(DMC_EVT_CTL_EVENT_ID_MASK, data) == DMC_EVT_CTL_EVENT_ID_CLK_MSEC)
> >  		return true;
> >  
> > +	/* also disable the HRR event on the main DMC on TGL */
> > +	if (IS_TIGERLAKE(i915) &&
> > +	    REG_FIELD_GET(DMC_EVT_CTL_EVENT_ID_MASK, data) == DMC_EVT_CTL_EVENT_ID_VBLANK_A)
> 
> The adls FW has the same event (but not the MSEC flip-queue one for some
> reason).

I can't see it in the binary. Though I am using hexdump so it might
also be that I'm looking in the wrong place :P

> 
> > +		return true;
> > +
> >  	return false;
> >  }
> >  
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc_regs.h b/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> > index cf10094acae3..90d0dbb41cfe 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> > @@ -60,6 +60,7 @@
> >  
> >  #define DMC_EVT_CTL_EVENT_ID_MASK	REG_GENMASK(15, 8)
> >  #define DMC_EVT_CTL_EVENT_ID_FALSE	0x01
> > +#define DMC_EVT_CTL_EVENT_ID_VBLANK_A	0x32 /* main DMC */
> >  /* An event handler scheduled to run at a 1 kHz frequency. */
> >  #define DMC_EVT_CTL_EVENT_ID_CLK_MSEC	0xbf
> >  
> > -- 
> > 2.41.0
> > 

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-12-13  9:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 21:37 [PATCH 0/4] drm/i915/dmc: DMC event stuff Ville Syrjala
2023-12-11 21:37 ` [PATCH 1/4] drm/i915/dmc: Don't enable any pipe DMC events Ville Syrjala
2023-12-11 21:37 ` [PATCH 2/4] drm/i915/dmc: Also disable the flip queue event on TGL main DMC Ville Syrjala
2023-12-11 21:37 ` [PATCH 3/4] drm/i915/dmc: Also disable HRR " Ville Syrjala
2023-12-13  8:17   ` Imre Deak
2023-12-13  9:31     ` Ville Syrjälä [this message]
2023-12-13 10:58       ` Imre Deak
2023-12-13 15:02         ` Ville Syrjälä
2023-12-13 15:05           ` Imre Deak
2023-12-13 15:08   ` [PATCH v2 3/4] drm/i915/dmc: Also disable HRR event on TGL/ADLS " Ville Syrjala
2023-12-11 21:37 ` [PATCH 4/4] drm/i915/dmc: Print out the DMC mmio register list at fw load time Ville Syrjala
2023-12-11 22:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: DMC event stuff Patchwork
2023-12-11 22:55 ` ✗ Fi.CI.SPARSE: " Patchwork
2023-12-11 23:09 ` ✓ Fi.CI.BAT: success " Patchwork
2023-12-12  0:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2023-12-13  7:35   ` Imre Deak
2023-12-13  7:41     ` Ville Syrjälä
2023-12-13  7:44 ` [PATCH 0/4] " Imre Deak
2023-12-13 22:00 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: DMC event stuff (rev2) Patchwork
2023-12-13 22:00 ` ✗ Fi.CI.SPARSE: " Patchwork
2023-12-13 22:17 ` ✓ Fi.CI.BAT: success " Patchwork
2023-12-13 23:11 ` ✓ 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=ZXl57Kgi78g9Wx-h@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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