[PATCH 18/32] drm/i915/joiner: Use struct intel_display in intel_joiner_enabled_pipes
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Wed Sep 4 08:45:29 UTC 2024
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 at 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 44d920e4df91..8f57b8630d68 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3434,6 +3434,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);
@@ -3491,7 +3492,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 6ef960412c44..98b0b6c86a4e 100644
--- a/drivers/gpu/drm/i915/display/intel_joiner.c
+++ b/drivers/gpu/drm/i915/display/intel_joiner.c
@@ -87,16 +87,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);
@@ -107,7 +108,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);
}
@@ -145,12 +146,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 0373c0d3ad5b..f7ddf64d3ccf 100644
--- a/drivers/gpu/drm/i915/display/intel_joiner.h
+++ b/drivers/gpu/drm/i915/display/intel_joiner.h
@@ -14,6 +14,7 @@ struct drm_i915_private;
struct intel_atomic_state;
struct intel_crtc;
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);
@@ -22,7 +23,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
More information about the Intel-gfx-trybot
mailing list