[Intel-gfx] [PATCH 1/3] drm/i915/gen11+: First assume next platforms will inherit stuff

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 8 22:23:20 UTC 2019


Quoting Rodrigo Vivi (2019-03-08 21:42:58)
> This exactly same approach was already used from gen9
> to gen10 and from gen10 to gen11. Let's also use it
> for gen11+.
> 
> Let's first assume that we inherit a similar platform
> and than we apply the differences on top.
> 
> Different from the previous attempts this will be
> done this time with coccinelle. We obviously need to
> exclude some case that is really exclusive for gen11
> like  PCH, Firmware, and few others. Luckly this was
> easy to filter by selecting the files we are touching
> with coccinelle as exposed below:
> 
> spatch -sp_file gen11\+.cocci --in-place i915_perf.c \
>        intel_bios.c intel_cdclk.c intel_ddi.c \
>        intel_device_info.c intel_display.c intel_dpll_mgr.c \
>        intel_dsi_vbt.c intel_hdmi.c intel_mocs.c intel_color.c
> 
> @noticelake@ expression e; @@
> -!IS_ICELAKE(e)
> +INTEL_GEN(e) < 11
> @notgen11@ expression e; @@
> -!IS_GEN(e, 11)
> +INTEL_GEN(e) < 11
> @icelake@ expression e; @@
> -IS_ICELAKE(e)
> +INTEL_GEN(e) >= 11
> @gen11@ expression e; @@
> -IS_GEN(e, 11)
> +INTEL_GEN(e) >= 11
> 
> No functional change.
> 
> v2: Remove intel_lrc.c per Tvrtko request since those were w/a
>     for ICL hw issuea and media related configuration.
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_perf.c         |  2 +-
>  drivers/gpu/drm/i915/intel_bios.c        |  4 ++--
>  drivers/gpu/drm/i915/intel_cdclk.c       |  6 +++---
>  drivers/gpu/drm/i915/intel_color.c       |  2 +-
>  drivers/gpu/drm/i915/intel_ddi.c         | 18 +++++++++---------
>  drivers/gpu/drm/i915/intel_device_info.c |  2 +-
>  drivers/gpu/drm/i915/intel_display.c     | 18 +++++++++---------
>  drivers/gpu/drm/i915/intel_dpll_mgr.c    |  2 +-
>  drivers/gpu/drm/i915/intel_dsi_vbt.c     |  6 +++---
>  drivers/gpu/drm/i915/intel_hdmi.c        |  4 ++--
>  drivers/gpu/drm/i915/intel_mocs.c        |  2 +-
>  11 files changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index e19a89e4df64..9b0292a38865 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -2881,7 +2881,7 @@ void i915_perf_register(struct drm_i915_private *dev_priv)
>  
>         sysfs_attr_init(&dev_priv->perf.oa.test_config.sysfs_metric_id.attr);
>  
> -       if (IS_ICELAKE(dev_priv)) {
> +       if (INTEL_GEN(dev_priv) >= 11) {
>                 i915_perf_load_test_config_icl(dev_priv);
>         } else if (IS_CANNONLAKE(dev_priv)) {
>                 i915_perf_load_test_config_cnl(dev_priv);

Given that every platform so far has had different oa configurations,
that looks to be a hasty assumption that future platforms will be fixed.
-Chris


More information about the Intel-gfx mailing list