public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915/fdi: move intel_fdi_link_freq() to intel_fdi.[ch]
Date: Thu, 19 Aug 2021 19:25:00 +0300	[thread overview]
Message-ID: <YR6F3EclDR6Yq+l0@intel.com> (raw)
In-Reply-To: <8c9bb23d92878deb1ecc75427ec6648bd3505816.1629281426.git.jani.nikula@intel.com>

On Wed, Aug 18, 2021 at 01:11:09PM +0300, Jani Nikula wrote:
> There's no performance reason to have it as static inline; move it out
> of intel_display_types.h to reduce clutter and dependency on i915_drv.h.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 9 ---------
>  drivers/gpu/drm/i915/display/intel_fdi.c           | 9 +++++++++
>  drivers/gpu/drm/i915/display/intel_fdi.h           | 4 ++++
>  3 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 7b5d7b1ae501..c2725d07b930 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -2040,15 +2040,6 @@ static inline u32 i9xx_dpll_compute_fp(struct dpll *dpll)
>  	return dpll->n << 16 | dpll->m1 << 8 | dpll->m2;
>  }
>  
> -static inline u32 intel_fdi_link_freq(struct drm_i915_private *dev_priv,
> -				      const struct intel_crtc_state *pipe_config)
> -{
> -	if (HAS_DDI(dev_priv))
> -		return pipe_config->port_clock; /* SPLL */
> -	else
> -		return dev_priv->fdi_pll_freq;
> -}
> -
>  static inline bool is_ccs_modifier(u64 modifier)
>  {
>  	return modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ||
> diff --git a/drivers/gpu/drm/i915/display/intel_fdi.c b/drivers/gpu/drm/i915/display/intel_fdi.c
> index e10b9cd8e86e..970a57369b05 100644
> --- a/drivers/gpu/drm/i915/display/intel_fdi.c
> +++ b/drivers/gpu/drm/i915/display/intel_fdi.c
> @@ -95,6 +95,15 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
>  	}
>  }
>  
> +u32 intel_fdi_link_freq(struct drm_i915_private *i915,

Could just change it to 'int' while at it.

Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> +			const struct intel_crtc_state *pipe_config)
> +{
> +	if (HAS_DDI(i915))
> +		return pipe_config->port_clock; /* SPLL */
> +	else
> +		return i915->fdi_pll_freq;
> +}
> +
>  int ilk_fdi_compute_config(struct intel_crtc *crtc,
>  			   struct intel_crtc_state *pipe_config)
>  {
> diff --git a/drivers/gpu/drm/i915/display/intel_fdi.h b/drivers/gpu/drm/i915/display/intel_fdi.h
> index af01d2c173a8..fd63a6a53fca 100644
> --- a/drivers/gpu/drm/i915/display/intel_fdi.h
> +++ b/drivers/gpu/drm/i915/display/intel_fdi.h
> @@ -6,12 +6,16 @@
>  #ifndef _INTEL_FDI_H_
>  #define _INTEL_FDI_H_
>  
> +#include <linux/types.h>
> +
>  struct drm_i915_private;
>  struct intel_crtc;
>  struct intel_crtc_state;
>  struct intel_encoder;
>  
>  #define I915_DISPLAY_CONFIG_RETRY 1
> +u32 intel_fdi_link_freq(struct drm_i915_private *i915,
> +			const struct intel_crtc_state *pipe_config);
>  int ilk_fdi_compute_config(struct intel_crtc *intel_crtc,
>  			   struct intel_crtc_state *pipe_config);
>  void intel_fdi_normal_train(struct intel_crtc *crtc);
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-08-19 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 10:11 [Intel-gfx] [PATCH 0/5] drm/i915: header cleanups Jani Nikula
2021-08-18 10:11 ` [Intel-gfx] [PATCH 1/5] drm/i915/irq: reduce inlines to reduce header dependencies Jani Nikula
2021-08-18 10:11 ` [Intel-gfx] [PATCH 2/5] drm/i915: intel_runtime_pm.h does not actually need intel_display.h Jani Nikula
2021-08-18 10:11 ` [Intel-gfx] [PATCH 3/5] drm/i915/pm: use forward declaration to remove an include Jani Nikula
2021-08-18 10:11 ` [Intel-gfx] [PATCH 4/5] drm/i915/panel: move intel_panel_use_ssc() out of headers Jani Nikula
2021-08-18 10:11 ` [Intel-gfx] [PATCH 5/5] drm/i915/fdi: move intel_fdi_link_freq() to intel_fdi.[ch] Jani Nikula
2021-08-19 16:25   ` Ville Syrjälä [this message]
2021-08-20  7:45     ` Jani Nikula
2021-08-18 11:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: header cleanups Patchwork
2021-08-18 11:32 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-08-18 11:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-08-18 13:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=YR6F3EclDR6Yq+l0@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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