public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dibin Moolakadan Subrahmanian
	<dibin.moolakadan.subrahmanian@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: animesh.manna@intel.com, uma.shankar@intel.com,
	suresh.kumar.kurmi@intel.com
Subject: Re: [PATCH 06/19] drm/i915/display: Fix HAS_DC3CO() and add DC3CO trigger enum
Date: Tue, 14 Apr 2026 10:11:26 +0300	[thread overview]
Message-ID: <e33134612d3185542c50bf82063227755355cefb@intel.com> (raw)
In-Reply-To: <20260326171557.2065632-7-dibin.moolakadan.subrahmanian@intel.com>

On Thu, 26 Mar 2026, Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> wrote:
> Fix HAS_DC3CO() based on display version and introduce an enum to
> track DC3CO enabling triggers.
>
> BSpec: 75253
> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
> ---
>  .../gpu/drm/i915/display/intel_display_device.h   |  2 +-
>  .../gpu/drm/i915/display/intel_display_power.h    | 15 +++++++++++++++
>  2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 35e06fcf794d..002fe0ce951a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -189,7 +189,7 @@ struct intel_display_platforms {
>  #define HAS_LRR(__display)		(DISPLAY_VER(__display) >= 12)
>  #define HAS_LSPCON(__display)		(IS_DISPLAY_VER(__display, 9, 10))
>  #define HAS_LT_PHY(__display)		((__display)->platform.novalake)
> -#define HAS_DC3CO(__display)		((__display)->platform.novalake)
> +#define HAS_DC3CO(__display)		(DISPLAY_VER(__display) >= 35)
>  #define HAS_MBUS_JOINING(__display)	((__display)->platform.alderlake_p || DISPLAY_VER(__display) >= 14)
>  #define HAS_MSO(__display)		(DISPLAY_VER(__display) >= 12)
>  #define HAS_OVERLAY(__display)		(DISPLAY_INFO(__display)->has_overlay)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
> index d616d5d09cbe..3fb45154864e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> @@ -131,6 +131,21 @@ struct intel_power_domain_mask {
>  	DECLARE_BITMAP(bits, POWER_DOMAIN_NUM);
>  };
>  
> +/*
> + * DC3CO enabling triggers (bitmask).
> + * DC3CO may be enabled when at least one of these triggers is active.
> + * Additional constraints may still apply.
> + */
> +enum intel_dc3co_trigger {
> +	DC3CO_TRIGGER_NONE	     = 0,
> +	DC3CO_TRIGGER_PSR2	     = BIT(0),
> +	DC3CO_TRIGGER_LOBF	     = BIT(1),
> +	DC3CO_TRIGGER_PANEL_REPLAY   = BIT(2),
> +	DC3CO_TRIGGER_ALL  = DC3CO_TRIGGER_PSR2 |
> +			     DC3CO_TRIGGER_LOBF |
> +			     DC3CO_TRIGGER_PANEL_REPLAY,
> +};

Enumerations are enumerations and bitmasks are bitmasks, and I don't
think they should be mixed like this.

Moreover, the enum as a type isn't even used anywhere.

BR,
Jani.


> +
>  struct i915_power_domains {
>  	/*
>  	 * Power wells needed for initialization at driver init and suspend

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2026-04-14  7:11 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 17:15 [PATCH 00/19] drm/i915/display: Add DC3CO support Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 01/19] drm/i915/display: Remove TGL " Dibin Moolakadan Subrahmanian
2026-04-13 20:40   ` Shankar, Uma
2026-04-20 12:01     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 02/19] drm/i915/display: Replace DC_STATE_EN_DC3CO with DC_STATE_EN_UPTO_DC3CO Dibin Moolakadan Subrahmanian
2026-04-13 20:51   ` Shankar, Uma
2026-04-20 12:04     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 03/19] drm/i915/display: Use FIELD_PREP() for DC state enable bits Dibin Moolakadan Subrahmanian
2026-04-13 20:54   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 04/19] drm/i915/display: Add DC3CO DC_STATE enable/disable support Dibin Moolakadan Subrahmanian
2026-04-13 21:03   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 05/19] drm/i915/display: Validate target DC state against allowed_dc_mask Dibin Moolakadan Subrahmanian
2026-04-13 21:04   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 06/19] drm/i915/display: Fix HAS_DC3CO() and add DC3CO trigger enum Dibin Moolakadan Subrahmanian
2026-04-13 21:16   ` Shankar, Uma
2026-04-20 12:12     ` Dibin Moolakadan Subrahmanian
2026-04-14  7:11   ` Jani Nikula [this message]
2026-04-20 12:17     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 07/19] drm/i915/display: Add helper to check DC3CO support Dibin Moolakadan Subrahmanian
2026-04-13 21:18   ` Shankar, Uma
2026-04-20 12:21     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 08/19] drm/i915/display: Add DC3CO eligibility computation Dibin Moolakadan Subrahmanian
2026-04-13 21:42   ` Shankar, Uma
2026-04-22 14:35     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 09/19] drm/i915/display: Remove unused PSR dc3co_exitline field Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 10/19] drm/i915/display: Remove unused dc3co_exitline from intel_crtc_state Dibin Moolakadan Subrahmanian
2026-04-13 21:44   ` Shankar, Uma
2026-04-20 12:26     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 11/19] drm/i915/display: Store DC3CO eligibility in PSR state Dibin Moolakadan Subrahmanian
2026-04-13 21:54   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 12/19] drm/i915/display: PSR2: Set idle_frames to 0 for DC3CO Dibin Moolakadan Subrahmanian
2026-04-13 21:56   ` Shankar, Uma
2026-04-22 14:37     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 13/19] drm/i915/display: Define DC3CO idle protocol bit in PR_ALPM_CTL Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 14/19] drm/i915/display: Enable DC3CO idle protocol in ALPM Dibin Moolakadan Subrahmanian
2026-04-13 21:58   ` Shankar, Uma
2026-04-22 14:43     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 15/19] drm/i915/display: PSR Add delayed work to exit DC3CO Dibin Moolakadan Subrahmanian
2026-04-13 22:11   ` Shankar, Uma
2026-04-22 14:53     ` Dibin Moolakadan Subrahmanian
2026-03-26 17:15 ` [PATCH 16/19] drm/i915/display: Add helper to enable DC counter Dibin Moolakadan Subrahmanian
2026-04-13 22:14   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 17/19] drm/i915/display: Remove DC3CO DMC debugfs Dibin Moolakadan Subrahmanian
2026-04-13 22:17   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 18/19] drm/i915/display: Add DC3CO count and residency in dmc debugfs Dibin Moolakadan Subrahmanian
2026-04-13 22:19   ` Shankar, Uma
2026-03-26 17:15 ` [PATCH 19/19] drm/i915/display: PSR set idle frames while exit from DC3CO Dibin Moolakadan Subrahmanian
2026-04-13 22:21   ` Shankar, Uma
2026-04-22 14:56     ` Dibin Moolakadan Subrahmanian

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=e33134612d3185542c50bf82063227755355cefb@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=animesh.manna@intel.com \
    --cc=dibin.moolakadan.subrahmanian@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suresh.kumar.kurmi@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox