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 07/12] drm/i915/display: Move dss stuff in intel_dss files
Date: Mon, 26 Aug 2024 16:45:21 +0530 [thread overview]
Message-ID: <20240826111527.1113622-8-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20240826111527.1113622-1-ankit.k.nautiyal@intel.com>
Move helper to retrieve the compressed and uncompressed joiner pipes from
dss ctl to intel_dss files.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 34 +++-----------
drivers/gpu/drm/i915/display/intel_dss.c | 48 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dss.h | 9 ++++
3 files changed, 64 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 05ffd28cc16a..ab57c2f39cf5 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3545,35 +3545,15 @@ static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
joiner_pipes(dev_priv)) {
- enum intel_display_power_domain power_domain;
- enum pipe pipe = crtc->pipe;
- intel_wakeref_t wakeref;
-
- power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
- with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
- u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
-
- if (!(tmp & BIG_JOINER_ENABLE))
- continue;
+ struct intel_display *display = &dev_priv->display;
- if (tmp & PRIMARY_BIG_JOINER_ENABLE)
- *primary_pipes |= BIT(pipe);
- else
- *secondary_pipes |= BIT(pipe);
- }
-
- if (DISPLAY_VER(dev_priv) < 13)
- continue;
-
- power_domain = POWER_DOMAIN_PIPE(pipe);
- with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
- u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
+ intel_dss_get_compressed_joiner_pipes(display, crtc,
+ primary_pipes,
+ secondary_pipes);
- if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
- *primary_pipes |= BIT(pipe);
- if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
- *secondary_pipes |= BIT(pipe);
- }
+ intel_dss_get_uncompressed_joiner_pipes(display, crtc,
+ primary_pipes,
+ secondary_pipes);
}
/* Joiner pipes should always be consecutive primary and secondary */
diff --git a/drivers/gpu/drm/i915/display/intel_dss.c b/drivers/gpu/drm/i915/display/intel_dss.c
index 8b2841689bfb..fadaf1f2674c 100644
--- a/drivers/gpu/drm/i915/display/intel_dss.c
+++ b/drivers/gpu/drm/i915/display/intel_dss.c
@@ -214,3 +214,51 @@ void intel_dss_get_dsc_config(struct intel_crtc_state *crtc_state)
crtc_state->dsc.dsc_split = (dss_ctl2 & RIGHT_BRANCH_VDSC_ENABLE) &&
(dss_ctl1 & JOINER_ENABLE);
}
+
+void intel_dss_get_compressed_joiner_pipes(struct intel_display *display,
+ struct intel_crtc *crtc,
+ u8 *primary_pipes,
+ u8 *secondary_pipes)
+{
+ struct drm_i915_private *i915 = to_i915(display->drm);
+ enum intel_display_power_domain power_domain;
+ enum pipe pipe = crtc->pipe;
+ intel_wakeref_t wakeref;
+
+ power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
+ with_intel_display_power_if_enabled(i915, power_domain, wakeref) {
+ u32 tmp = intel_de_read(display, ICL_PIPE_DSS_CTL1(pipe));
+
+ if (!(tmp & BIG_JOINER_ENABLE))
+ continue;
+
+ if (tmp & PRIMARY_BIG_JOINER_ENABLE)
+ *primary_pipes |= BIT(pipe);
+ else
+ *secondary_pipes |= BIT(pipe);
+ }
+}
+
+void intel_dss_get_uncompressed_joiner_pipes(struct intel_display *display,
+ struct intel_crtc *crtc,
+ u8 *primary_pipes,
+ u8 *secondary_pipes)
+{
+ struct drm_i915_private *i915 = to_i915(display->drm);
+ enum intel_display_power_domain power_domain;
+ enum pipe pipe = crtc->pipe;
+ intel_wakeref_t wakeref;
+
+ if (DISPLAY_VER(display) < 13)
+ return;
+
+ power_domain = POWER_DOMAIN_PIPE(pipe);
+ with_intel_display_power_if_enabled(i915, power_domain, wakeref) {
+ u32 tmp = intel_de_read(display, ICL_PIPE_DSS_CTL1(pipe));
+
+ if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
+ *primary_pipes |= BIT(pipe);
+ if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
+ *secondary_pipes |= BIT(pipe);
+ }
+}
diff --git a/drivers/gpu/drm/i915/display/intel_dss.h b/drivers/gpu/drm/i915/display/intel_dss.h
index 2dadbe76cbf9..16d2bbc3add8 100644
--- a/drivers/gpu/drm/i915/display/intel_dss.h
+++ b/drivers/gpu/drm/i915/display/intel_dss.h
@@ -11,6 +11,7 @@
struct intel_crtc_state;
struct intel_display;
struct intel_encoder;
+struct intel_crtc;
u8 intel_dss_splitter_pipe_mask(struct intel_display *display);
void intel_dss_get_mso_config(struct intel_encoder *encoder,
@@ -24,6 +25,14 @@ void intel_dss_enable_uncompressed_joiner(const struct intel_crtc_state *crtc_st
void intel_dss_enable_compressed_joiner(const struct intel_crtc_state *crtc_state,
int vdsc_instances_per_pipe);
void intel_dss_get_dsc_config(struct intel_crtc_state *crtc_state);
+void intel_dss_get_compressed_joiner_pipes(struct intel_display *display,
+ struct intel_crtc *crtc,
+ u8 *primary_pipes,
+ u8 *secondary_pipes);
+void intel_dss_get_uncompressed_joiner_pipes(struct intel_display *display,
+ struct intel_crtc *crtc,
+ u8 *primary_pipes,
+ u8 *secondary_pipes);
#endif /* __INTEL_DSS_H__ */
--
2.45.2
next prev parent reply other threads:[~2024-08-26 11:14 UTC|newest]
Thread overview: 32+ 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 ` Ankit Nautiyal [this message]
2024-08-26 12:11 ` [PATCH 07/12] drm/i915/display: Move dss stuff in intel_dss files 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
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
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=20240826111527.1113622-8-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