Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: jani.nikula@linux.intel.com, suraj.kandpal@intel.com,
	ville.syrjala@linux.intel.com
Subject: [PATCH 18/19] drm/i915/joiner: Use struct intel_display in intel_joiner_enabled_pipes
Date: Thu, 29 Aug 2024 18:48:26 +0530	[thread overview]
Message-ID: <20240829131828.2350930-19-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20240829131828.2350930-1-ankit.k.nautiyal@intel.com>

Replace struct drm_i915_private with struct intel_display in the helper
intel_joiner_enabled_pipes and its callers.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c |  3 ++-
 drivers/gpu/drm/i915/display/intel_joiner.c  | 13 +++++++------
 drivers/gpu/drm/i915/display/intel_joiner.h  |  3 ++-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 894ca4abe187..abcb45d492b1 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3444,6 +3444,7 @@ static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
 
 static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
 {
+	struct intel_display *display = to_intel_display(crtc);
 	struct drm_device *dev = crtc->base.dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	u8 panel_transcoder_mask = hsw_panel_transcoders(dev_priv);
@@ -3501,7 +3502,7 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
 		enabled_transcoders |= BIT(cpu_transcoder);
 
 	/* joiner secondary -> consider the primary pipe's transcoder as well */
-	intel_joiner_enabled_pipes(dev_priv, &primary_pipes, &secondary_pipes);
+	intel_joiner_enabled_pipes(display, &primary_pipes, &secondary_pipes);
 	if (secondary_pipes & BIT(crtc->pipe)) {
 		cpu_transcoder = (enum transcoder)
 			intel_joiner_find_primary_pipe(crtc->pipe, primary_pipes, secondary_pipes);
diff --git a/drivers/gpu/drm/i915/display/intel_joiner.c b/drivers/gpu/drm/i915/display/intel_joiner.c
index 0899cf51a825..2c7477914f74 100644
--- a/drivers/gpu/drm/i915/display/intel_joiner.c
+++ b/drivers/gpu/drm/i915/display/intel_joiner.c
@@ -86,16 +86,17 @@ u8 intel_joiner_supported_pipes(struct drm_i915_private *i915)
 	return pipes & DISPLAY_RUNTIME_INFO(i915)->pipe_mask;
 }
 
-void intel_joiner_enabled_pipes(struct drm_i915_private *dev_priv,
+void intel_joiner_enabled_pipes(struct intel_display *display,
 				u8 *primary_pipes, u8 *secondary_pipes)
 {
+	struct drm_i915_private *i915 = to_i915(display->drm);
 	struct intel_crtc *crtc;
 
 	*primary_pipes = 0;
 	*secondary_pipes = 0;
 
-	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
-					 intel_joiner_supported_pipes(dev_priv)) {
+	for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc,
+					 intel_joiner_supported_pipes(i915)) {
 		intel_dss_get_compressed_joiner_pipes(crtc,
 						      primary_pipes,
 						      secondary_pipes);
@@ -106,7 +107,7 @@ void intel_joiner_enabled_pipes(struct drm_i915_private *dev_priv,
 	}
 
 	/* Joiner pipes should always be consecutive primary and secondary */
-	drm_WARN(&dev_priv->drm, *secondary_pipes != *primary_pipes << 1,
+	drm_WARN(display->drm, *secondary_pipes != *primary_pipes << 1,
 		 "Joiner misconfigured (primary pipes 0x%x, secondary pipes 0x%x)\n",
 		 *primary_pipes, *secondary_pipes);
 }
@@ -144,12 +145,12 @@ u8 intel_joiner_find_secondary_pipes(enum pipe pipe, u8 primary_pipes, u8 second
 
 void intel_joiner_get_config(struct intel_crtc_state *crtc_state)
 {
+	struct intel_display *display = to_intel_display(crtc_state);
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
-	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
 	u8 primary_pipes, secondary_pipes;
 	enum pipe pipe = crtc->pipe;
 
-	intel_joiner_enabled_pipes(i915, &primary_pipes, &secondary_pipes);
+	intel_joiner_enabled_pipes(display, &primary_pipes, &secondary_pipes);
 
 	if (((primary_pipes | secondary_pipes) & BIT(pipe)) == 0)
 		return;
diff --git a/drivers/gpu/drm/i915/display/intel_joiner.h b/drivers/gpu/drm/i915/display/intel_joiner.h
index cae9971c44f6..49cb2d78f4c8 100644
--- a/drivers/gpu/drm/i915/display/intel_joiner.h
+++ b/drivers/gpu/drm/i915/display/intel_joiner.h
@@ -13,6 +13,7 @@ struct drm_display_mode;
 struct drm_i915_private;
 struct intel_atomic_state;
 struct intel_crtc_state;
+struct intel_display;
 
 enum pipe intel_joiner_get_primary_pipe(const struct intel_crtc_state *crtc_state);
 int intel_joiner_get_num_pipes(const struct intel_crtc_state *crtc_state);
@@ -21,7 +22,7 @@ void intel_joiner_adjust_timings(const struct intel_crtc_state *crtc_state,
 void intel_joiner_compute_pipe_src(struct intel_crtc_state *crtc_state);
 void intel_joiner_adjust_pipe_src(struct intel_crtc_state *crtc_state);
 u8 intel_joiner_supported_pipes(struct drm_i915_private *i915);
-void intel_joiner_enabled_pipes(struct drm_i915_private *dev_priv,
+void intel_joiner_enabled_pipes(struct intel_display *display,
 				u8 *primary_pipes, u8 *secondary_pipes);
 enum pipe intel_joiner_find_primary_pipe(enum pipe pipe, u8 primary_pipes, u8 secondary_pipes);
 u8 intel_joiner_find_secondary_pipes(enum pipe pipe, u8 primary_pipes, u8 secondary_pipes);
-- 
2.45.2


  parent reply	other threads:[~2024-08-29 13:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 13:18 [PATCH 00/19] Consolidation of DSS Control in Separate Files Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 01/19] drm/i915/display: Move all DSS control registers to a new file Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 02/19] drm/i915/dss_regs: Use REG_* macros for the DSS ctl bits Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 03/19] drm/i915/ddi: Move all mso related helpers to a new file Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 04/19] drm/i915/dss: Move to struct intel_display Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 05/19] drm/i915/icl_dsi: Avoid using intel_dsi in configure_dual_link_mode Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 06/19] drm/i915/icl_dsi: Use intel_display " Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 07/19] drm/i915/icl_dsi: Move helpers to configure dsi dual link to intel_dss Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 08/19] drm/i915/vdsc: Rename helper to check if the pipe supports dsc Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 09/19] drm/i915/vdsc: Move all dss stuff in dss files Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 10/19] drm/i915/dss: Use struct intel_display in dss dsc helpers Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 11/19] drm/i915/display: Move dss stuff in intel_dss files Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 12/19] drm/i915/display: Rename static functions that use joiner Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 13/19] drm/i915/display: Separate out joiner stuff in a new file Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 14/19] drm/i915/display: Move intel_crtc_joined_pipe_mask to intel_joiner Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 15/19] drm/i915/display: Move helpers for primary joiner " Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 16/19] drm/i915/display: Move intel_crtc_is_joiner_secondary " Ankit Nautiyal
2024-08-29 13:18 ` [PATCH 17/19] drm/i915/display: Move intel_crtc_joiner_secondary_pipes " Ankit Nautiyal
2024-08-29 13:18 ` Ankit Nautiyal [this message]
2024-08-29 13:18 ` [PATCH 19/19] drm/i915/joiner: Use struct intel_display in intel_joiner_supported_pipes Ankit Nautiyal
2024-08-29 13:38 ` ✗ CI.Patch_applied: failure for Consolidation of DSS Control in Separate Files (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-08-30  5:09 [PATCH 00/19] Consolidation of DSS Control in Separate Files Ankit Nautiyal
2024-08-30  5:09 ` [PATCH 18/19] drm/i915/joiner: Use struct intel_display in intel_joiner_enabled_pipes Ankit Nautiyal

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=20240829131828.2350930-19-ankit.k.nautiyal@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox