Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"Thasleem, Mohammed" <mohammed.thasleem@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/dmc: Add debugfs for dc6 counter
Date: Tue, 4 Feb 2025 20:10:03 +0200	[thread overview]
Message-ID: <Z6JX-0o18jtIubQ_@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <173861750965.77773.16119113504082709088@intel.com>

On Mon, Feb 03, 2025 at 06:18:29PM -0300, Gustavo Sousa wrote:
> Quoting Vivi, Rodrigo (2025-02-03 17:59:19-03:00)
> [...]
> Perhaps Imre can explain this better, but I believe the point is that we
> want to track increments to DC5 counter when we have DC6 enabled. That
> driver-managed counter would be in dc6_allowed.
> 
> Repeating Imre's suggestions with a minor tweak:
> 
> 1. Before we tell the hardware that we are allowing DC6 (disable ->
>    DC6), we store the value of the current DC5 counter.
>
> 2. After we disable DC states from DC6 (DC6 -> disable), we read the DC5
>    counter again and subtract the value from (1). The result would then be
>    added to the current value of dc6_allowed.

Yes, with the actual delta being: DC5 counter read here - DC5 counter read
at (1).

> In (1) I think we should read the DC5 counter before we update
> DC_STATE_EN, just to be sure we avoid some sort of race (although that
> appears to be unlikely to happen).

Yes, the orders you described in both (1) and (2) are correct (since a
DC5 -> DC6 or DC6 -> DC5 transition is not possible).

The dc6_allowed counter should be also updated before returning it to
userspace via the debugfs entry, as I mentioned earlier (to account
for the case where DC6 is enabled when the read happens).

> During DC6 validation, if the test sees that dc6_allowed was
> incremented, that means that the display engine reached a state where
> the SOC would be able to put the display in DC6.

Yes, that's my understanding.

--Imre

  reply	other threads:[~2025-02-04 18:09 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 [this message]
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
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=Z6JX-0o18jtIubQ_@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mohammed.thasleem@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox