All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915: Nuke intel_get_shared_dpll_id()
Date: Thu, 22 Sep 2022 18:42:15 +0300	[thread overview]
Message-ID: <87bkr75sbs.fsf@intel.com> (raw)
In-Reply-To: <20220921122343.13061-3-ville.syrjala@linux.intel.com>

On Wed, 21 Sep 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Each PLL knows its own ID so intel_get_shared_dpll_id() is
> pointless. Get rid of it.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  4 ++--
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 22 -------------------
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.h |  3 ---
>  3 files changed, 2 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 643832d55c28..5057ee3c93fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3536,7 +3536,7 @@ static void icl_ddi_tc_get_clock(struct intel_encoder *encoder,
>  	if (drm_WARN_ON(&i915->drm, !pll))
>  		return;
>  
> -	if (intel_get_shared_dpll_id(i915, pll) == DPLL_ID_ICL_TBTPLL)
> +	if (pll->info->id == DPLL_ID_ICL_TBTPLL)
>  		port_dpll_id = ICL_PORT_DPLL_DEFAULT;
>  	else
>  		port_dpll_id = ICL_PORT_DPLL_MG_PHY;
> @@ -3549,7 +3549,7 @@ static void icl_ddi_tc_get_clock(struct intel_encoder *encoder,
>  
>  	icl_set_active_port_dpll(crtc_state, port_dpll_id);
>  
> -	if (intel_get_shared_dpll_id(i915, crtc_state->shared_dpll) == DPLL_ID_ICL_TBTPLL)
> +	if (crtc_state->shared_dpll->info->id == DPLL_ID_ICL_TBTPLL)
>  		crtc_state->port_clock = icl_calc_tbt_pll_link(i915, encoder->port);
>  	else
>  		crtc_state->port_clock = intel_dpll_get_freq(i915, crtc_state->shared_dpll,
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> index 9c60cf69cde1..f900c4c73cc6 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> @@ -152,28 +152,6 @@ intel_get_shared_dpll_by_id(struct drm_i915_private *dev_priv,
>  	return &dev_priv->display.dpll.shared_dplls[id];
>  }
>  
> -/**
> - * intel_get_shared_dpll_id - get the id of a DPLL
> - * @dev_priv: i915 device instance
> - * @pll: the DPLL
> - *
> - * Returns:
> - * The id of @pll
> - */
> -enum intel_dpll_id
> -intel_get_shared_dpll_id(struct drm_i915_private *dev_priv,
> -			 struct intel_shared_dpll *pll)
> -{
> -	long pll_idx = pll - dev_priv->display.dpll.shared_dplls;
> -
> -	if (drm_WARN_ON(&dev_priv->drm,
> -			pll_idx < 0 ||
> -			pll_idx >= dev_priv->display.dpll.num_shared_dpll))
> -		return -1;
> -
> -	return pll_idx;
> -}
> -
>  /* For ILK+ */
>  void assert_shared_dpll(struct drm_i915_private *dev_priv,
>  			struct intel_shared_dpll *pll,
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> index 3247dc300ae4..3854f1b4299a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> @@ -328,9 +328,6 @@ struct intel_shared_dpll {
>  struct intel_shared_dpll *
>  intel_get_shared_dpll_by_id(struct drm_i915_private *dev_priv,
>  			    enum intel_dpll_id id);
> -enum intel_dpll_id
> -intel_get_shared_dpll_id(struct drm_i915_private *dev_priv,
> -			 struct intel_shared_dpll *pll);
>  void assert_shared_dpll(struct drm_i915_private *dev_priv,
>  			struct intel_shared_dpll *pll,
>  			bool state);

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-09-22 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 12:23 [Intel-gfx] [PATCH 0/4] drm/i915: Start cleaning up the DPLL ID mess Ville Syrjala
2022-09-21 12:23 ` [Intel-gfx] [PATCH 1/4] drm/i915: Always initialize dpll.lock Ville Syrjala
2022-09-22 15:41   ` Jani Nikula
2022-09-21 12:23 ` [Intel-gfx] [PATCH 2/4] drm/i915: Nuke intel_get_shared_dpll_id() Ville Syrjala
2022-09-22 15:42   ` Jani Nikula [this message]
2022-09-21 12:23 ` [Intel-gfx] [PATCH 3/4] drm/i915: Stop requiring PLL index == PLL ID Ville Syrjala
2022-09-22 15:46   ` Jani Nikula
2022-09-22 19:57     ` Ville Syrjälä
2022-09-21 12:23 ` [Intel-gfx] [PATCH 4/4] drm/i915: Decouple I915_NUM_PLLS from PLL IDs Ville Syrjala
2022-09-22 15:55   ` Jani Nikula
2022-09-22 16:06     ` Ville Syrjälä
2022-09-21 12:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Start cleaning up the DPLL ID mess Patchwork
2022-09-21 13:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-21 14:05 ` [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=87bkr75sbs.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.