From: Imre Deak <imre.deak@intel.com>
To: "Naladala, Ramanaidu" <Ramanaidu.naladala@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v5] drm/i915/dmc: Create debugfs entry for dc6 counter
Date: Wed, 12 Mar 2025 22:06:25 +0200 [thread overview]
Message-ID: <Z9HpQSrfoaRm0m30@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <040232c9-1928-4324-a05f-07a879848734@intel.com>
On Thu, Mar 13, 2025 at 01:02:09AM +0530, Naladala, Ramanaidu wrote:
>
> On 3/13/2025 12:19 AM, Imre Deak wrote:
> > On Wed, Mar 12, 2025 at 11:44:20PM +0530, Naladala, Ramanaidu wrote:
> > > [...]
> > > > > +static u32 intel_dmc_get_dc6_allowed_count(struct intel_display *display, u32 *count)
> > > > The return type isn't compatible with the -ENODEV returned value. I'd
> > > > just return a bool, since the reason for an error is always the same.
> > > >
> > > > > +{
> > > > > + struct i915_power_domains *power_domains = &display->power.domains;
> > > > > + struct intel_dmc *dmc = display_to_dmc(display);
> > > > > +
> > > > > + if (DISPLAY_VER(display) < 14)
> > > > > + return -ENODEV;
> > > > > +
> > > > > + mutex_lock(&power_domains->lock);
> > > > > + bool dc6_enabled = DC_STATE_EN_UPTO_DC6 &
> > > > > + intel_de_read(display, DC_STATE_EN);
> > > The dc6_enabled flag indicates only the DC state limit. If all conditions
> > > are met, the DMC can entry/exits DC6.
> > >
> > > However, if the DC6 conditions are not met, the DMC can perform entry/exits
> > > up to DC5. Entry/exits from DC5 to DC3 can also change the DG1_DMC_DEBUG_DC5_COUNT
> > > counter values. It is better to add a pc10 check along with the dc6_enabled flag.
> > >
> > > Correct me if my understanding is wrong.
> > According to HW people, the conditions for DC6 are met from the
> > _display_ side if the conditions for DC5 are met and DC6 is enabled. The
> > problem of making this dependent on package C states is that those
> > states also depend on non-display IPs. The purpose of this counter (DC6
> > allowed) is validating the display driver's DC6 programming, without
> > depending on the validity of the programming for all other IPs (by
> > non-display drivers) that could block actual DC6 transitions.
>
> In that case, we have the DC3 entry/exit counter DG1_DMC_DEBUG_DC1_COUNT.
> Add a check to ensure it does not change when the DC5 counters are changing.
>
> It will confirm the transaction entry/exits are between DC5 and DC6. If DC3
> counter is changed, don't increment the dc6 counter value.
We are using the DG1_DMC_DEBUG_DC5_COUNT (0x134154) register to check
for DC5 _entries_. This matches the bspec (49786) definition of the
register:
"Residency counter for DC5 state. Indicates the number of DC5 entries."
In fact all other DMC_DEBUG_ registers are specified in a similar way,
indicating the residency for a given state, that is entries. Counting
both entries and exits in the same counter would be ultimately broken in
any case.
> >
> > > > > + if (dc6_enabled)
> > > > > + intel_dmc_update_dc6_allowed_count(display, false);
> > > > > +
> > > > > + *count = dmc->dc6_allowed.count;
> > > > > + mutex_unlock(&power_domains->lock);
> > > > > +
> > > > > + return 0;
> > > > > +}
> > > > > +
next prev parent reply other threads:[~2025-03-12 20:06 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 8:56 [PATCH] drm/i915/dmc: Add debugfs for dc6 counter Mohammed Thasleem
2025-02-03 9:23 ` Jani Nikula
2025-02-03 15:46 ` Rodrigo Vivi
2025-02-03 12:43 ` Imre Deak
2025-02-03 13:39 ` Gustavo Sousa
2025-02-03 14:26 ` Imre Deak
2025-02-03 14:59 ` Gustavo Sousa
2025-02-03 15:14 ` Imre Deak
2025-02-03 15:45 ` Rodrigo Vivi
2025-02-03 16:01 ` Imre Deak
2025-02-03 16:12 ` Rodrigo Vivi
2025-02-03 16:27 ` Imre Deak
2025-02-03 16:42 ` Rodrigo Vivi
2025-02-03 16:51 ` Imre Deak
2025-02-03 17:15 ` Rodrigo Vivi
2025-02-03 19:22 ` Imre Deak
2025-02-03 20:19 ` Gustavo Sousa
2025-02-03 20:23 ` Vivi, Rodrigo
2025-02-03 20:40 ` Gustavo Sousa
2025-02-03 20:59 ` Vivi, Rodrigo
2025-02-03 21:18 ` Gustavo Sousa
2025-02-04 18:10 ` Imre Deak
2025-02-04 17:15 ` Imre Deak
2025-02-03 16:37 ` Gustavo Sousa
2025-02-03 16:49 ` Imre Deak
2025-02-03 17:15 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2025-02-03 17:15 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-03 17:31 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-03 20:06 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-12 11:49 ` [PATCH v2] drm/i915/dmc: Create debugfs entry " Mohammed Thasleem
2025-02-19 1:33 ` [v2] " Almahallawy, Khaled
2025-02-21 17:53 ` Rodrigo Vivi
2025-02-21 17:49 ` [PATCH v2] " Rodrigo Vivi
2025-02-21 18:35 ` Imre Deak
2025-02-21 18:44 ` Imre Deak
2025-02-12 14:17 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: Add debugfs for dc6 counter (rev2) Patchwork
2025-02-12 14:17 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-12 14:51 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-12 21:47 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-03 19:23 ` [PATCH v3] drm/i915/dmc: Create debugfs entry for dc6 counter Mohammed Thasleem
2025-03-04 8:32 ` Jani Nikula
2025-03-04 8:33 ` Jani Nikula
2025-03-04 11:00 ` Imre Deak
2025-03-04 12:16 ` Jani Nikula
2025-03-04 12:22 ` Imre Deak
2025-03-09 8:10 ` [PATCH v4] " Mohammed Thasleem
2025-03-10 15:04 ` Imre Deak
2025-03-10 15:12 ` Imre Deak
2025-03-03 21:23 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: Add debugfs for dc6 counter (rev3) Patchwork
2025-03-03 21:23 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-03-03 21:42 ` ✗ i915.CI.BAT: failure " Patchwork
2025-03-09 9:28 ` ✗ i915.CI.BAT: failure for drm/i915/dmc: Add debugfs for dc6 counter (rev4) Patchwork
2025-03-12 14:43 ` [PATCH v5] drm/i915/dmc: Create debugfs entry for dc6 counter Mohammed Thasleem
2025-03-12 15:08 ` Imre Deak
2025-03-12 18:14 ` Naladala, Ramanaidu
2025-03-12 18:49 ` Imre Deak
2025-03-12 19:32 ` Naladala, Ramanaidu
2025-03-12 20:06 ` Imre Deak [this message]
2025-03-12 16:48 ` ✗ i915.CI.BAT: failure for drm/i915/dmc: Add debugfs for dc6 counter (rev5) Patchwork
2025-03-12 20:30 ` [PATCH v6] drm/i915/dmc: Create debugfs entry for dc6 counter Mohammed Thasleem
2025-03-12 20:54 ` [PATCH v7] " Mohammed Thasleem
2025-03-13 10:51 ` Jani Nikula
2025-03-12 21:17 ` ✗ i915.CI.BAT: failure for drm/i915/dmc: Add debugfs for dc6 counter (rev6) Patchwork
2025-03-12 21:52 ` ✗ i915.CI.BAT: failure for drm/i915/dmc: Add debugfs for dc6 counter (rev7) Patchwork
2025-03-14 14:56 ` ✓ i915.CI.BAT: success " Patchwork
2025-03-14 15:24 ` Patchwork
2025-03-19 11:48 ` ✓ i915.CI.Full: " Patchwork
2025-03-19 15:14 ` 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=Z9HpQSrfoaRm0m30@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=Ramanaidu.naladala@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