All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: suraj.kandpal@intel.com, ville.syrjala@linux.intel.com
Subject: Re: [PATCH 08/12] drm/i915/display: Move helper to get joined pipe mask to intel_dss
Date: Mon, 26 Aug 2024 15:20:01 +0300	[thread overview]
Message-ID: <87le0j1nny.fsf@intel.com> (raw)
In-Reply-To: <20240826111527.1113622-9-ankit.k.nautiyal@intel.com>

On Mon, 26 Aug 2024, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
> Rename intel_crtc_joined_pipe_mask with
> intel_dss_get_joined_pipe_mask and move it to intel_dss files.
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c     |  8 ++---
>  drivers/gpu/drm/i915/display/intel_display.c | 35 ++++++++------------
>  drivers/gpu/drm/i915/display/intel_display.h |  1 -
>  drivers/gpu/drm/i915/display/intel_dp_mst.c  |  7 ++--
>  drivers/gpu/drm/i915/display/intel_dss.c     |  7 ++++
>  drivers/gpu/drm/i915/display/intel_dss.h     |  1 +
>  6 files changed, 30 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index de7db5a028db..9421f0c4d25e 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3043,7 +3043,7 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
>  	struct intel_crtc *pipe_crtc;
>  
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {

In this patch, and subsequent patches, I think I'd avoid changing the
function naming *besides* adding dss/crtc:

intel_crtc_joined_pipe_mask -> intel_dss_crtc_joined_pipe_mask
intel_crtc_is_joiner_primary -> intel_dss_crtc_is_joiner_primary
joiner_primary_pipe -> intel_dss_crtc_joiner_primary_pipe

etc.

>  		const struct intel_crtc_state *old_pipe_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, pipe_crtc);
>  
> @@ -3055,7 +3055,7 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
>  	intel_ddi_disable_transcoder_func(old_crtc_state);
>  
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {
>  		const struct intel_crtc_state *old_pipe_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, pipe_crtc);
>  
> @@ -3319,7 +3319,7 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
>  	intel_ddi_wait_for_fec_status(encoder, crtc_state, true);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&i915->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -3429,7 +3429,7 @@ void intel_ddi_update_active_dpll(struct intel_atomic_state *state,
>  		return;
>  
>  	for_each_intel_crtc_in_pipe_mask(&i915->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(crtc_state))
> +					 intel_dss_get_joined_pipe_mask(crtc_state))
>  		intel_update_active_dpll(state, pipe_crtc, encoder);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index ab57c2f39cf5..1c0d297c250b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -283,13 +283,6 @@ static int intel_joiner_num_pipes(const struct intel_crtc_state *crtc_state)
>  	return hweight8(crtc_state->joiner_pipes);
>  }
>  
> -u8 intel_crtc_joined_pipe_mask(const struct intel_crtc_state *crtc_state)
> -{
> -	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> -
> -	return BIT(crtc->pipe) | crtc_state->joiner_pipes;
> -}
> -
>  struct intel_crtc *intel_primary_crtc(const struct intel_crtc_state *crtc_state)
>  {
>  	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> @@ -1688,13 +1681,13 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  		return;
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state))
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state))
>  		intel_dmc_enable_pipe(dev_priv, pipe_crtc->pipe);
>  
>  	intel_encoders_pre_pll_enable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -1705,7 +1698,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  	intel_encoders_pre_enable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -1724,7 +1717,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  		hsw_configure_cpu_transcoder(new_crtc_state);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -1760,7 +1753,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  	intel_encoders_enable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  		enum pipe hsw_workaround_pipe;
> @@ -1855,7 +1848,7 @@ static void hsw_crtc_disable(struct intel_atomic_state *state,
>  	intel_encoders_post_disable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask(&i915->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {
>  		const struct intel_crtc_state *old_pipe_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, pipe_crtc);
>  
> @@ -1865,7 +1858,7 @@ static void hsw_crtc_disable(struct intel_atomic_state *state,
>  	intel_encoders_post_pll_disable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask(&i915->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state))
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state))
>  		intel_dmc_disable_pipe(i915, pipe_crtc->pipe);
>  }
>  
> @@ -6852,7 +6845,7 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
>  		return;
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(new_crtc_state)) {
> +						 intel_dss_get_joined_pipe_mask(new_crtc_state)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -6965,13 +6958,13 @@ static void intel_old_crtc_state_disables(struct intel_atomic_state *state,
>  	 * or we race against vblank off.
>  	 */
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state))
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state))
>  		intel_crtc_disable_pipe_crc(pipe_crtc);
>  
>  	dev_priv->display.funcs.display->crtc_disable(state, crtc);
>  
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {
>  		const struct intel_crtc_state *new_pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> @@ -7036,7 +7029,7 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
>  
>  		intel_old_crtc_state_disables(state, crtc);
>  
> -		disable_pipes &= ~intel_crtc_joined_pipe_mask(old_crtc_state);
> +		disable_pipes &= ~intel_dss_get_joined_pipe_mask(old_crtc_state);
>  	}
>  
>  	/* Disable everything else left on */
> @@ -7049,7 +7042,7 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
>  
>  		intel_old_crtc_state_disables(state, crtc);
>  
> -		disable_pipes &= ~intel_crtc_joined_pipe_mask(old_crtc_state);
> +		disable_pipes &= ~intel_dss_get_joined_pipe_mask(old_crtc_state);
>  	}
>  
>  	drm_WARN_ON(&i915->drm, disable_pipes);
> @@ -7176,7 +7169,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>  		    is_trans_port_sync_master(new_crtc_state))
>  			continue;
>  
> -		modeset_pipes &= ~intel_crtc_joined_pipe_mask(new_crtc_state);
> +		modeset_pipes &= ~intel_dss_get_joined_pipe_mask(new_crtc_state);
>  
>  		intel_enable_crtc(state, crtc);
>  	}
> @@ -7194,7 +7187,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>  		if (intel_crtc_is_joiner_secondary(new_crtc_state))
>  			continue;
>  
> -		modeset_pipes &= ~intel_crtc_joined_pipe_mask(new_crtc_state);
> +		modeset_pipes &= ~intel_dss_get_joined_pipe_mask(new_crtc_state);
>  
>  		intel_enable_crtc(state, crtc);
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index b0cf6ca70952..b9316373dad3 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -422,7 +422,6 @@ intel_cpu_transcoder_mode_valid(struct drm_i915_private *i915,
>  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
>  bool is_trans_port_sync_master(const struct intel_crtc_state *state);
> -u8 intel_crtc_joined_pipe_mask(const struct intel_crtc_state *crtc_state);
>  bool intel_crtc_is_joiner_secondary(const struct intel_crtc_state *crtc_state);
>  bool intel_crtc_is_joiner_primary(const struct intel_crtc_state *crtc_state);
>  u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 45d2230d1801..59da0712b0eb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -45,6 +45,7 @@
>  #include "intel_dp_tunnel.h"
>  #include "intel_dp_link_training.h"
>  #include "intel_dpio_phy.h"
> +#include "intel_dss.h"
>  #include "intel_hdcp.h"
>  #include "intel_hotplug.h"
>  #include "intel_link_bw.h"
> @@ -1009,7 +1010,7 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
>  		    !intel_dp_mst_is_master_trans(old_crtc_state));
>  
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {
>  		const struct intel_crtc_state *old_pipe_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, pipe_crtc);
>  
> @@ -1034,7 +1035,7 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
>  	intel_ddi_disable_transcoder_func(old_crtc_state);
>  
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
> -					 intel_crtc_joined_pipe_mask(old_crtc_state)) {
> +					 intel_dss_get_joined_pipe_mask(old_crtc_state)) {
>  		const struct intel_crtc_state *old_pipe_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, pipe_crtc);
>  
> @@ -1301,7 +1302,7 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state,
>  	intel_enable_transcoder(pipe_config);
>  
>  	for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
> -						 intel_crtc_joined_pipe_mask(pipe_config)) {
> +						 intel_dss_get_joined_pipe_mask(pipe_config)) {
>  		const struct intel_crtc_state *pipe_crtc_state =
>  			intel_atomic_get_new_crtc_state(state, pipe_crtc);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_dss.c b/drivers/gpu/drm/i915/display/intel_dss.c
> index fadaf1f2674c..89a8c9205a3f 100644
> --- a/drivers/gpu/drm/i915/display/intel_dss.c
> +++ b/drivers/gpu/drm/i915/display/intel_dss.c
> @@ -262,3 +262,10 @@ void intel_dss_get_uncompressed_joiner_pipes(struct intel_display *display,
>  			*secondary_pipes |= BIT(pipe);
>  	}
>  }
> +
> +u8 intel_dss_get_joined_pipe_mask(const struct intel_crtc_state *crtc_state)
> +{
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +
> +	return BIT(crtc->pipe) | crtc_state->joiner_pipes;
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_dss.h b/drivers/gpu/drm/i915/display/intel_dss.h
> index 16d2bbc3add8..cf2ee3f028bb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dss.h
> +++ b/drivers/gpu/drm/i915/display/intel_dss.h
> @@ -33,6 +33,7 @@ void intel_dss_get_uncompressed_joiner_pipes(struct intel_display *display,
>  					     struct intel_crtc *crtc,
>  					     u8 *primary_pipes,
>  					     u8 *secondary_pipes);
> +u8 intel_dss_get_joined_pipe_mask(const struct intel_crtc_state *crtc_state);
>  
>  #endif /* __INTEL_DSS_H__ */

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-08-26 12:20 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 11:15 [PATCH 00/12] Consolidation of DSS Control in Separate Files Ankit Nautiyal
2024-08-26 11:15 ` [PATCH 01/12] drm/i915/display: Move all DSS control registers to a new file Ankit Nautiyal
2024-08-26 11:46   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 02/12] drm/i915/ddi: Move all mso related helpers " Ankit Nautiyal
2024-08-26 11:52   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 03/12] drm/i915/dss: Move to struct intel_display Ankit Nautiyal
2024-08-26 11:55   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 04/12] drm/i915/icl_dsi: Move helpers to configure dsi dual link to intel_dss Ankit Nautiyal
2024-08-26 11:58   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 05/12] drm/i915/vdsc: Rename helper to check if the pipe supports dsc Ankit Nautiyal
2024-08-26 12:41   ` Jani Nikula
2024-08-29 14:19     ` Nautiyal, Ankit K
2024-08-26 11:15 ` [PATCH 06/12] drm/i915/vdsc: Move all dss stuff in dss files Ankit Nautiyal
2024-08-26 12:09   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 07/12] drm/i915/display: Move dss stuff in intel_dss files Ankit Nautiyal
2024-08-26 12:11   ` Jani Nikula
2024-08-26 11:15 ` [PATCH 08/12] drm/i915/display: Move helper to get joined pipe mask to intel_dss Ankit Nautiyal
2024-08-26 12:20   ` Jani Nikula [this message]
2024-08-26 11:15 ` [PATCH 09/12] drm/i915/display: Move helpers for primary joiner " Ankit Nautiyal
2024-08-26 11:15 ` [PATCH 10/12] drm/i915/display: Move helper to check for secondary joiner pipe Ankit Nautiyal
2024-08-26 11:15 ` [PATCH 11/12] drm/i915/display: Move helper to get all secondary pipes Ankit Nautiyal
2024-08-26 11:15 ` [PATCH 12/12] drm/i915/display: Move intel_joiner_num_pipes to intel dss Ankit Nautiyal
2024-08-26 11:20 ` ✓ CI.Patch_applied: success for Consolidation of DSS Control in Separate Files Patchwork
2024-08-26 11:21 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-26 11:22 ` ✓ CI.KUnit: success " Patchwork
2024-08-26 11:34 ` ✓ CI.Build: " Patchwork
2024-08-26 11:36 ` ✓ CI.Hooks: " Patchwork
2024-08-26 11:37 ` ✗ CI.checksparse: warning " Patchwork
2024-08-26 11:56 ` ✓ CI.BAT: success " Patchwork
2024-08-26 12:34 ` [PATCH 00/12] " Jani Nikula
2024-08-27 12:20   ` Nautiyal, Ankit K
2024-08-26 15:20 ` ✓ CI.FULL: success for " Patchwork
2024-08-26 16:11 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2024-08-26 16:11 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-26 16:19 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-27 11:00 ` ✗ Fi.CI.IGT: failure " 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=87le0j1nny.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@intel.com \
    --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.