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 02/13] drm/i915/display: Switch DC3CO enable from standalone bit to DC level encoding
Date: Mon, 1 Jun 2026 17:48:16 +0530 [thread overview]
Message-ID: <3bfd06ff-d868-419b-b0a7-b6f47511aac3@intel.com> (raw)
In-Reply-To: <DS0PR11MB8049279A2DCA01D74EA8A11FF9152@DS0PR11MB8049.namprd11.prod.outlook.com>
On 01-06-2026 10:55, 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 02/13] drm/i915/display: Switch DC3CO enable from
>> standalone bit to DC level encoding
>>
>> On platforms prior to xe3, DC3CO was controlled via a standalone enable bit.
>> Starting with xe3, DC3CO is encoded as part of the existing
>> DC_STATE_EN_UPTO_DC* field.
>>
>> No functional change, as DC3CO is not enabled on platforms prior to xe3.
>>
>> Changes in v2:
>> - Update commit header (Uma Shankar)
>>
>> 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.c | 6 +++---
>> drivers/gpu/drm/i915/display/intel_display_power_well.c | 4 ++--
>> drivers/gpu/drm/i915/display/intel_display_regs.h | 2 +-
>> drivers/gpu/drm/i915/display/intel_dmc_wl.c | 2 +-
>> 4 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c
>> b/drivers/gpu/drm/i915/display/intel_display_power.c
>> index 751e6b7d4a29..c70971ffd9f0 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
>> @@ -267,7 +267,7 @@ sanitize_target_dc_state(struct intel_display *display,
>> static const u32 states[] = {
>> DC_STATE_EN_UPTO_DC6,
>> DC_STATE_EN_UPTO_DC5,
>> - DC_STATE_EN_DC3CO,
>> + DC_STATE_EN_UPTO_DC3CO,
>> DC_STATE_DISABLE,
>> };
>> int i;
>> @@ -999,10 +999,10 @@ static u32 get_allowed_dc_mask(struct
>> intel_display *display, int enable_dc)
>>
>> switch (requested_dc) {
>> case 4:
>> - mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC6;
>> + mask |= DC_STATE_EN_UPTO_DC3CO |
>> DC_STATE_EN_UPTO_DC6;
>> break;
>> case 3:
>> - mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC5;
>> + mask |= DC_STATE_EN_UPTO_DC3CO |
>> DC_STATE_EN_UPTO_DC5;
>> break;
>> case 2:
>> mask |= DC_STATE_EN_UPTO_DC6;
>> 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 2f0d0a77c1a2..611f784d8a7a 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
>> @@ -772,7 +772,7 @@ static u32 gen9_dc_mask(struct intel_display
>> *display)
>> mask = DC_STATE_EN_UPTO_DC5;
>>
>> if (DISPLAY_VER(display) >= 12)
>> - mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC6
>> + mask |= DC_STATE_EN_UPTO_DC3CO |
>> DC_STATE_EN_UPTO_DC6
>> | DC_STATE_EN_DC9;
>> else if (DISPLAY_VER(display) == 11)
>> mask |= DC_STATE_EN_UPTO_DC6 | DC_STATE_EN_DC9;
>> @@ -1022,7 +1022,7 @@ static void
>> bxt_verify_dpio_phy_power_wells(struct intel_display *display) static bool
>> gen9_dc_off_power_well_enabled(struct intel_display *display,
>> struct i915_power_well
>> *power_well) {
>> - return ((intel_de_read(display, DC_STATE_EN) &
>> DC_STATE_EN_DC3CO) == 0 &&
>> + return ((intel_de_read(display, DC_STATE_EN) &
>> DC_STATE_EN_UPTO_DC3CO)
>> +== 0 &&
>> (intel_de_read(display, DC_STATE_EN) &
>> DC_STATE_EN_UPTO_DC5_DC6_MASK) == 0); }
> Both DC_STATE_EN_UPTO_DC5_DC6_MASK and DC_STATE_EN_UPTO_DC3CO value is matching which will impact fine granularity to control DC3co.
> Only enabling Dc3co or enabling with DC5/DC6 may be an issue.
Thanks for the review.
Since the DC3CO enable value is 0x3,
DC_STATE_EN_UPTO_DC3CO and DC_STATE_EN_UPTO_DC5_DC6_MASK evaluate to the same value.
That said, DC_STATE_EN_UPTO_DC5_DC6_MASK can be renamed
to DC_STATE_EN_UPTO_DC3CO_DC5_DC6_MASK to better reflect the bits covered by the mask.
I assumed DC3CO-only enablement would be mainly for validation purposes.
Would it be okay to handle that in a follow-up?
>
> Regards,
> Animesh
>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_regs.h
>> b/drivers/gpu/drm/i915/display/intel_display_regs.h
>> index 4321f8b529da..680e7dfdcf1b 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_regs.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_regs.h
>> @@ -3070,13 +3070,13 @@ enum skl_power_gate {
>> /* GEN9 DC */
>> #define DC_STATE_EN _MMIO(0x45504)
>> #define DC_STATE_DISABLE 0
>> -#define DC_STATE_EN_DC3CO REG_BIT(30)
>> #define DC_STATE_DC3CO_STATUS REG_BIT(29)
>> #define HOLD_PHY_CLKREQ_PG1_LATCH REG_BIT(21)
>> #define HOLD_PHY_PG1_LATCH REG_BIT(20)
>> #define DC_STATE_EN_UPTO_DC5 (1 << 0)
>> #define DC_STATE_EN_DC9 (1 << 3)
>> #define DC_STATE_EN_UPTO_DC6 (2 << 0)
>> +#define DC_STATE_EN_UPTO_DC3CO (3 << 0)
>> #define DC_STATE_EN_UPTO_DC5_DC6_MASK 0x3
>>
>> #define DC_STATE_DEBUG _MMIO(0x45520)
>> diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> index b007343721e1..ab4e0e9573df 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> @@ -267,7 +267,7 @@ static bool intel_dmc_wl_check_range(struct
>> intel_display *display,
>> * the DMC and requires a DC exit for proper access.
>> */
>> switch (dc_state) {
>> - case DC_STATE_EN_DC3CO:
>> + case DC_STATE_EN_UPTO_DC3CO:
>> ranges = xe3lpd_dc3co_dmc_ranges;
>> break;
>> case DC_STATE_EN_UPTO_DC5:
>> --
>> 2.43.0
next prev parent reply other threads:[~2026-06-01 12:18 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 [this message]
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
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=3bfd06ff-d868-419b-b0a7-b6f47511aac3@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.