RE: [PATCH 07/19] drm/i915/display: Add helper to check DC3CO support

Shankar, Uma
2026-04-13T21:18:47Z

> -----Original Message-----
> From: Dibin Moolakadan Subrahmanian
> <dibin.moolakadan.subrahmanian@intel.com>
> Sent: Thursday, March 26, 2026 10:46 PM
> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> Cc: Manna, Animesh <animesh.manna@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>; Kurmi, Suresh Kumar
> <suresh.kumar.kurmi@intel.com>
> Subject: [PATCH 07/19] drm/i915/display: Add helper to check DC3CO support
>
> Add a helper to query DC3CO support from allowed_dc_mask.

Change looks good but I feel this can be squashed with some earlier patches.

> Signed-off-by: Dibin Moolakadan Subrahmanian
> <dibin.moolakadan.subrahmanian@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_power.c | 7 +++++++
> drivers/gpu/drm/i915/display/intel_display_power.h | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c
> b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 12967db27c8d..a3b0c8ad8bb5 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -365,6 +365,13 @@ u32 intel_display_power_get_current_dc_state(struct
> intel_display *display)
> return current_dc_state;
> }
>
> +bool intel_display_power_dc3co_supported(struct intel_display *display)
> +{
> + struct i915_power_domains *power_domains = &display->power.domains;
> +
> + return (power_domains->allowed_dc_mask &
> DC_STATE_EN_UPTO_DC3CO) ==
> +DC_STATE_EN_UPTO_DC3CO; }
> +
> static void __async_put_domains_mask(struct i915_power_domains
> *power_domains,
> struct intel_power_domain_mask *mask) { diff
> --git a/drivers/gpu/drm/i915/display/intel_display_power.h
> b/drivers/gpu/drm/i915/display/intel_display_power.h
> index 3fb45154864e..f57ce99a6039 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> @@ -201,6 +201,7 @@ void intel_display_power_resume(struct intel_display
> *display); void intel_display_power_set_target_dc_state(struct intel_display
> *display,
> u32 state);
> u32 intel_display_power_get_current_dc_state(struct intel_display *display);
> +bool intel_display_power_dc3co_supported(struct intel_display
> +*display);
>
> bool intel_display_power_is_enabled(struct intel_display *display,
> enum intel_display_power_domain domain);
> --
> 2.43.0