All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
To: "Manna, Animesh" <animesh.manna@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Shankar, Uma" <uma.shankar@intel.com>
Subject: Re: [PATCH v4 12/13] drm/i915/display: Add helper to enable DC counter
Date: Mon, 1 Jun 2026 18:05:06 +0530	[thread overview]
Message-ID: <c8499b18-8bd4-482f-8d7a-62531f23459b@intel.com> (raw)
In-Reply-To: <DS0PR11MB80491B7B05DFB75A53755C7CF9152@DS0PR11MB8049.namprd11.prod.outlook.com>


On 01-06-2026 11:17, Manna, Animesh wrote:
>
>> -----Original Message-----
>> From: Dibin Moolakadan Subrahmanian
>> <dibin.moolakadan.subrahmanian@intel.com>
>> Sent: Wednesday, May 27, 2026 12:48 AM
>> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
>> Cc: Manna, Animesh <animesh.manna@intel.com>; Shankar, Uma
>> <uma.shankar@intel.com>
>> Subject: [PATCH v4 12/13] drm/i915/display: Add helper to enable DC
>> counter
>>
>> Add xe3lpd_enable_dc_count() to enable the DC_COUNT_EN register.
>> Also define DC_STATE_DC3CO_RESIDENCY to read DC3CO residency.
>> Needed to retrieve DC residency for DC3CO.
>>
>> Signed-off-by: Dibin Moolakadan Subrahmanian
>> <dibin.moolakadan.subrahmanian@intel.com>
>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_display_power_well.c | 5 +++++
>> drivers/gpu/drm/i915/display/intel_display_power_well.h | 1 +
>>   drivers/gpu/drm/i915/display/intel_display_regs.h       | 5 +++++
>>   drivers/gpu/drm/i915/display/intel_dmc.c                | 3 +++
>>   4 files changed, 14 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> b/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> index 3ea080d0e21e..0e7e6a2b1547 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> @@ -866,6 +866,11 @@ void gen9_set_dc_state(struct intel_display *display,
>> u32 state)
>>   	power_domains->dc_state = val & mask;
>>   }
>>
>> +void xe3lpd_enable_dc_count(struct intel_display *display) {
>> +	intel_de_write(display, DC_COUNT_EN,
>> DC_COUNT_EN_COUNTER_ENABLE); }
>> +
>>   static void xe3lpd_enable_dc3co(struct intel_display *display)  {
>>   	drm_dbg_kms(display->drm, "Enabling DC3CO\n"); diff --git
>> a/drivers/gpu/drm/i915/display/intel_display_power_well.h
>> b/drivers/gpu/drm/i915/display/intel_display_power_well.h
>> index 8f5524da2d06..0ce64b894436 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power_well.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.h
>> @@ -159,6 +159,7 @@ void gen9_set_dc_state(struct intel_display *display,
>> u32 state);  void gen9_disable_dc_states(struct intel_display *display);  void
>> bxt_enable_dc9(struct intel_display *display);  void bxt_disable_dc9(struct
>> intel_display *display);
>> +void xe3lpd_enable_dc_count(struct intel_display *display);
>>
>>   extern const struct i915_power_well_ops i9xx_always_on_power_well_ops;
>> extern const struct i915_power_well_ops chv_pipe_power_well_ops; diff --
>> git a/drivers/gpu/drm/i915/display/intel_display_regs.h
>> b/drivers/gpu/drm/i915/display/intel_display_regs.h
>> index efd1a3e56f76..875cd06f2566 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_regs.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_regs.h
>> @@ -3084,6 +3084,11 @@ enum skl_power_gate {
>>   #define  DC_STATE_DEBUG_MASK_CORES	(1 << 0)
>>   #define  DC_STATE_DEBUG_MASK_MEMORY_UP	(1 << 1)
>>
>> +#define DC_COUNT_EN			_MMIO(0x457B4)
>> +#define DC_COUNT_EN_COUNTER_ENABLE	REG_BIT(31)
>> +
>> +#define DC_STATE_DC3CO_RESIDENCY	_MMIO(0x457B8)
>> +
>>   #define D_COMP_BDW			_MMIO(0x138144)
>>
>>   /* Pipe WM_LINETIME - watermark line time */ diff --git
>> a/drivers/gpu/drm/i915/display/intel_dmc.c
>> b/drivers/gpu/drm/i915/display/intel_dmc.c
>> index 4785001644f5..a133785c815b 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>> @@ -941,6 +941,9 @@ void intel_dmc_load_program(struct intel_display
>> *display)
>>
>>   	gen9_set_dc_state_debugmask(display);
>>
>> +	if (DISPLAY_VER(display) >= 35)
> HAS_DC3CO() check instead of display ver?

The check is intentional.DC count is not tied only to DC3CO support,
so I used the display version check here.

>
> Regards,
> Animesh
>> +		xe3lpd_enable_dc_count(display);
>> +
>>   	pipedmc_clock_gating_wa(display, false);  }
>>
>> --
>> 2.43.0

  reply	other threads:[~2026-06-01 12:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 19:18 [PATCH v4 00/13] drm/i915/display: Add DC3CO support Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 01/13] drm/i915/display: Remove TGL " Dibin Moolakadan Subrahmanian
2026-05-27  9:30   ` Manna, Animesh
2026-05-26 19:18 ` [PATCH v4 02/13] drm/i915/display: Switch DC3CO enable from standalone bit to DC level encoding Dibin Moolakadan Subrahmanian
2026-06-01  5:25   ` Manna, Animesh
2026-06-01 12:18     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 03/13] drm/i915/display: Use FIELD_PREP() for DC state enable bits Dibin Moolakadan Subrahmanian
2026-06-01  5:30   ` Manna, Animesh
2026-06-01 12:22     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 04/13] drm/i915/display: Add DC3CO DC_STATE enable/disable support Dibin Moolakadan Subrahmanian
2026-06-01  5:42   ` Manna, Animesh
2026-06-01 12:30     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 05/13] drm/i915/display: Add DC3CO support check Dibin Moolakadan Subrahmanian
2026-05-27 12:26   ` Jani Nikula
2026-05-28  9:18     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 06/13] drm/i915/display: Add HAS_DC3CO() macro Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 07/13] drm/i915/display: Add DC3CO eligibility computation Dibin Moolakadan Subrahmanian
2026-05-27 12:24   ` Jani Nikula
2026-05-28 11:29     ` Dibin Moolakadan Subrahmanian
2026-05-27 12:28   ` Jani Nikula
2026-05-28  9:46     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 08/13] drm/i915/display: Store DC3CO eligibility in PSR state Dibin Moolakadan Subrahmanian
2026-05-27 12:30   ` Jani Nikula
2026-05-28 11:37     ` Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 09/13] drm/i915/display: PSR2: Set idle_frames to 0 for DC3CO Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 10/13] drm/i915/display: Enable DC3CO idle protocol in ALPM Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 11/13] drm/i915/display: PSR Add delayed work to exit DC3CO Dibin Moolakadan Subrahmanian
2026-05-26 19:18 ` [PATCH v4 12/13] drm/i915/display: Add helper to enable DC counter Dibin Moolakadan Subrahmanian
2026-06-01  5:47   ` Manna, Animesh
2026-06-01 12:35     ` Dibin Moolakadan Subrahmanian [this message]
2026-05-26 19:18 ` [PATCH v4 13/13] drm/i915/display: Add DC3CO count and residency in dmc debugfs Dibin Moolakadan Subrahmanian
2026-06-01  5:50   ` Manna, Animesh
2026-06-01 12:38     ` Dibin Moolakadan Subrahmanian
2026-05-26 20:14 ` ✓ CI.KUnit: success for drm/i915/display: Add DC3CO support (rev4) Patchwork
2026-05-26 20:14 ` ✓ i915.CI.BAT: " Patchwork
2026-05-26 20:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-27  1:20 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-27  4:27 ` ✗ i915.CI.Full: " Patchwork
2026-05-27 10:16 ` ✓ i915.CI.Full: success " 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=c8499b18-8bd4-482f-8d7a-62531f23459b@intel.com \
    --to=dibin.moolakadan.subrahmanian@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=uma.shankar@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.