Re: [PATCH] drm/i915/adl_p: CDCLK crawl support for ADL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Jun 2021, Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx> wrote:
> CDCLK crawl feature allows to change CDCLK frequency
> without disabling the actual PLL and doesn't require
> a full modeset.

I've pushed this to din because supposedly this is urgent.

However, there are some issues, comments inline, please fix them
afterwards.

BR,
Jani.

>
> v2: - Added has_cdclk_crawl as a feature flag to
>       intel_device_info(Matt Roper)
>     - s/gen13_cdclk_pll_crawl/adlp_cdclk_pll_crawl/
>       (Matt Roper)
>
> Cc: Mika Kahola <mika.kahola@xxxxxxxxx>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@xxxxxxxxx>
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c | 72 +++++++++++++++++++---
>  drivers/gpu/drm/i915/i915_pci.c            |  1 +
>  drivers/gpu/drm/i915/i915_reg.h            |  2 +
>  drivers/gpu/drm/i915/intel_device_info.h   |  2 +
>  4 files changed, 68 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 4656a6edc3be..f24bd9cf1318 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1547,6 +1547,35 @@ static void cnl_cdclk_pll_enable(struct drm_i915_private *dev_priv, int vco)
>  	dev_priv->cdclk.hw.vco = vco;
>  }
>  
> +static bool has_cdclk_crawl(struct drm_i915_private *i915)
> +{
> +	return INTEL_INFO(i915)->has_cdclk_crawl;
> +}

For everything else we use HAS_SOMETHING() in i915_drv.h, not local
functions.

[...]

> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> index 1390fad5ec06..b326aff65cd6 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.h
> +++ b/drivers/gpu/drm/i915/intel_device_info.h
> @@ -185,6 +185,8 @@ struct intel_device_info {
>  
>  	u8 abox_mask;
>  
> +	u8 has_cdclk_crawl;  /* does support CDCLK crawling */
> +

Flags are supposed to be added to DEV_INFO_FOR_EACH_FLAG() in
intel_device_info.h. Or, actually, this one's about display, so
DEV_INFO_DISPLAY_FOR_EACH_FLAG().

This makes them 1-bit bitfields instead of 8 bits, and automatically
adds them to debug printouts.

>  #define DEFINE_FLAG(name) u8 name:1
>  	DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
>  #undef DEFINE_FLAG

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux