From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v3 10/13] drm/i915/dmc: Add interface to control start of PKG C-state exit
Date: Mon, 12 May 2025 11:24:45 +0000 [thread overview]
Message-ID: <cfc2009edd2c15fc1e043e4e6871c16c9adf27fe.camel@intel.com> (raw)
In-Reply-To: <aCHUMS6tBdKU0VAA@intel.com>
On Mon, 2025-05-12 at 13:57 +0300, Ville Syrjälä wrote:
> On Mon, Apr 14, 2025 at 01:05:05PM +0300, Jouni Högander wrote:
> > Add interface to control if package C exit starts at the start of
> > the
> > undelayed vblank. This is needed to implement workaround for
> > underrun on
> > idle PSR HW issue (Wa_16025596647).
> >
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_dmc.c | 31
> > ++++++++++++++++++++++++
> > drivers/gpu/drm/i915/display/intel_dmc.h | 2 ++
> > 2 files changed, 33 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c
> > b/drivers/gpu/drm/i915/display/intel_dmc.c
> > index c65544e48c42..bd50c98c0ee4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> > @@ -534,6 +534,37 @@ void intel_dmc_block_pkgc(struct intel_display
> > *display, enum pipe pipe,
> > PIPEDMC_BLOCK_PKGC_SW_BLOCK_PKGC_ALWAYS : 0);
> > }
> >
> > +/**
> > + * intel_dmc_start_pkgc_exit_at_start_of_undelayed_vblank() -
> > start of PKG
> > + * C-state exit
> > + * @display: display instance
> > + * @pipe: pipe which register use to block
> > + * @enable: enable/disable
> > + *
> > + * This interface is target for Wa_16025596647 usage. I.e. start
> > the package C
> > + * exit at the start of the undelayed vblank
> > + */
> > +void intel_dmc_start_pkgc_exit_at_start_of_undelayed_vblank(struct
> > intel_display *display,
> > + enum
> > pipe pipe, bool enable)
> > +{
> > + u32 val;
> > +
> > + if (enable)
> > + val = DMC_EVT_CTL_ENABLE | DMC_EVT_CTL_RECURRING |
> > + REG_FIELD_PREP(DMC_EVT_CTL_TYPE_MASK,
> > + DMC_EVT_CTL_TYPE_EDGE_0_1)
> > |
> > + REG_FIELD_PREP(DMC_EVT_CTL_EVENT_ID_MASK,
> > +
> > DMC_EVT_CTL_EVENT_ID_VBLANK_A);
> > + else
> > + val = REG_FIELD_PREP(DMC_EVT_CTL_EVENT_ID_MASK,
> > + DMC_EVT_CTL_EVENT_ID_FALSE) |
> > + REG_FIELD_PREP(DMC_EVT_CTL_TYPE_MASK,
> > + DMC_EVT_CTL_TYPE_EDGE_0_1);
> > +
> > + intel_de_write(display, MTL_PIPEDMC_EVT_CTL_4(pipe),
> > + val);
> > +}
>
> This thing doesn't seem to be fully thought through:
>
> - Enabling PIPEDMC events exposes us to the DSB vs. DMC register
> corruption issues once again. Someone would need to come up with
> some
> kind of scheme to avoid DMC and DSB executing in parallel.
> Otherwise
> I don't think we can safely enable this
> - The w/a seems to be only for cases where the pkgc latency exceeds
> the
> delayed vblank length, but that is never allowed by the
> skl_is_vblank_too_short() stuff, so looks like this should never be
> needed currently
Ouch! Do you have suggestion how to take care of this now? Revert whole
thing?
BR,
Jouni Högander
>
> > +
> > static bool is_dmc_evt_ctl_reg(struct intel_display *display,
> > enum intel_dmc_id dmc_id,
> > i915_reg_t reg)
> > {
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.h
> > b/drivers/gpu/drm/i915/display/intel_dmc.h
> > index 236312fb791c..bd1c459b0075 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc.h
> > @@ -20,6 +20,8 @@ void intel_dmc_enable_pipe(struct intel_display
> > *display, enum pipe pipe);
> > void intel_dmc_disable_pipe(struct intel_display *display, enum
> > pipe pipe);
> > void intel_dmc_block_pkgc(struct intel_display *display, enum pipe
> > pipe,
> > bool block);
> > +void intel_dmc_start_pkgc_exit_at_start_of_undelayed_vblank(struct
> > intel_display *display,
> > + enum
> > pipe pipe, bool enable);
> > void intel_dmc_fini(struct intel_display *display);
> > void intel_dmc_suspend(struct intel_display *display);
> > void intel_dmc_resume(struct intel_display *display);
> > --
> > 2.43.0
>
next prev parent reply other threads:[~2025-05-12 11:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 10:04 [PATCH v3 00/13] Underrun on idle PSR workaround Jouni Högander
2025-04-14 10:04 ` [PATCH v3 01/13] drm/i915/display: Add new interface for getting dc_state Jouni Högander
2025-04-22 8:27 ` Kahola, Mika
2025-04-14 10:04 ` [PATCH v3 02/13] drm/i915/psr: Store enabled non-psr pipes into intel_crtc_state Jouni Högander
2025-04-22 7:49 ` Kahola, Mika
2025-04-14 10:04 ` [PATCH v3 03/13] drm/i915/dmc: Add PIPEDMC_EVT_CTL register definition Jouni Högander
2025-04-22 8:26 ` Kahola, Mika
2025-04-14 10:04 ` [PATCH v3 04/13] drm/i915/dmc: Add PIPEDMC_BLOCK_PKGC_SW definitions Jouni Högander
2025-04-14 10:05 ` [PATCH v3 05/13] drm/i915/dmc: Add interface to block PKG C-state Jouni Högander
2025-04-22 8:28 ` Kahola, Mika
2025-04-23 9:54 ` Hogander, Jouni
2025-04-14 10:05 ` [PATCH v3 06/13] drm/i915/psr: Block PKG C-State when enabling PSR Jouni Högander
2025-04-22 9:38 ` Kahola, Mika
2025-04-14 10:05 ` [PATCH v3 07/13] drm/i915/psr: Add mechanism to notify PSR of pipe enable/disable Jouni Högander
2025-04-14 10:05 ` [PATCH v3 08/13] drm/i915/psr: Add mechanism to notify PSR of DC5/6 enable disable Jouni Högander
2025-04-14 10:05 ` [PATCH v3 09/13] drm/i915/psr: Add interface to notify PSR of vblank enable/disable Jouni Högander
2025-04-14 10:05 ` [PATCH v3 10/13] drm/i915/dmc: Add interface to control start of PKG C-state exit Jouni Högander
2025-04-22 10:08 ` Kahola, Mika
2025-05-12 10:57 ` Ville Syrjälä
2025-05-12 11:24 ` Hogander, Jouni [this message]
2025-04-14 10:05 ` [PATCH v3 11/13] drm/i915/psr: Apply underrun on PSR idle workaround Jouni Högander
2025-04-22 10:16 ` Kahola, Mika
2025-04-14 10:05 ` [PATCH v3 12/13] drm/i915/display: Rename intel_psr_needs_block_dc_vblank Jouni Högander
2025-04-14 10:05 ` [PATCH v3 13/13] drm/i915/display: Rename vblank DC workaround functions and variables Jouni Högander
2025-04-14 11:08 ` ✓ CI.Patch_applied: success for Underrun on idle PSR workaround (rev6) Patchwork
2025-04-14 11:09 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-14 11:10 ` ✓ CI.KUnit: success " Patchwork
2025-04-14 11:19 ` ✓ CI.Build: " Patchwork
2025-04-14 11:21 ` ✓ CI.Hooks: " Patchwork
2025-04-14 11:24 ` ✗ CI.checksparse: warning " Patchwork
2025-04-14 12:09 ` ✓ Xe.CI.BAT: success " Patchwork
2025-04-14 14:37 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-23 9:04 ` 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=cfc2009edd2c15fc1e043e4e6871c16c9adf27fe.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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