@@ -250,14 +250,6 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
is_trans_port_sync_slave(crtc_state);
}
-u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state)
-{
- if (crtc_state->joiner_pipes)
- return crtc_state->joiner_pipes & ~BIT(intel_joiner_get_primary_pipe(crtc_state));
- else
- return 0;
-}
-
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);
@@ -5806,7 +5798,7 @@ static int intel_atomic_check_joiner(struct intel_atomic_state *state,
}
for_each_intel_crtc_in_pipe_mask(&i915->drm, secondary_crtc,
- intel_crtc_joiner_secondary_pipes(primary_crtc_state)) {
+ intel_joiner_crtc_joiner_secondary_pipes(primary_crtc_state)) {
struct intel_crtc_state *secondary_crtc_state;
int ret;
@@ -5860,7 +5852,7 @@ void intel_crtc_kill_joiner_secondaries(struct intel_atomic_state *state,
struct intel_crtc *secondary_crtc;
for_each_intel_crtc_in_pipe_mask(&i915->drm, secondary_crtc,
- intel_crtc_joiner_secondary_pipes(primary_crtc_state)) {
+ intel_joiner_crtc_joiner_secondary_pipes(primary_crtc_state)) {
struct intel_crtc_state *secondary_crtc_state =
intel_atomic_get_new_crtc_state(state, secondary_crtc);
@@ -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_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state);
struct intel_crtc *intel_primary_crtc(const struct intel_crtc_state *crtc_state);
bool intel_crtc_get_pipe_config(struct intel_crtc_state *crtc_state);
bool intel_pipe_config_compare(const struct intel_crtc_state *current_config,
@@ -254,3 +254,11 @@ bool intel_joiner_crtc_is_joiner_secondary(const struct intel_crtc_state *crtc_s
return crtc_state->joiner_pipes &&
crtc->pipe != intel_joiner_get_primary_pipe(crtc_state);
}
+
+u8 intel_joiner_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state)
+{
+ if (crtc_state->joiner_pipes)
+ return crtc_state->joiner_pipes & ~BIT(intel_joiner_get_primary_pipe(crtc_state));
+ else
+ return 0;
+}
@@ -31,5 +31,6 @@ int intel_joiner_add_affected_crtcs(struct intel_atomic_state *state);
u8 intel_joiner_crtc_joined_pipe_mask(const struct intel_crtc_state *crtc_state);
bool intel_joiner_crtc_is_joiner_primary(const struct intel_crtc_state *crtc_state);
bool intel_joiner_crtc_is_joiner_secondary(const struct intel_crtc_state *crtc_state);
+u8 intel_joiner_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state);
#endif/* __INTEL_JOINER_H__ */
@@ -69,7 +69,7 @@ static void intel_crtc_disable_noatomic_begin(struct intel_crtc *crtc,
/* Everything's already locked, -EDEADLK can't happen. */
for_each_intel_crtc_in_pipe_mask(&i915->drm, temp_crtc,
BIT(pipe) |
- intel_crtc_joiner_secondary_pipes(crtc_state)) {
+ intel_joiner_crtc_joiner_secondary_pipes(crtc_state)) {
struct intel_crtc_state *temp_crtc_state =
intel_atomic_get_crtc_state(state, temp_crtc);
int ret;
@@ -258,7 +258,7 @@ static u8 get_joiner_secondary_pipes(struct drm_i915_private *i915, u8 primary_p
struct intel_crtc_state *primary_crtc_state =
to_intel_crtc_state(primary_crtc->base.state);
- pipes |= intel_crtc_joiner_secondary_pipes(primary_crtc_state);
+ pipes |= intel_joiner_crtc_joiner_secondary_pipes(primary_crtc_state);
}
return pipes;
@@ -737,7 +737,7 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
WARN_ON(intel_joiner_crtc_is_joiner_secondary(crtc_state));
for_each_intel_crtc_in_pipe_mask(&i915->drm, secondary_crtc,
- intel_crtc_joiner_secondary_pipes(crtc_state)) {
+ intel_joiner_crtc_joiner_secondary_pipes(crtc_state)) {
struct intel_crtc_state *secondary_crtc_state;
secondary_crtc_state = to_intel_crtc_state(secondary_crtc->base.state);
Move the helper to get secondary joiner pipes to intel_joiner. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 12 ++---------- drivers/gpu/drm/i915/display/intel_display.h | 1 - drivers/gpu/drm/i915/display/intel_joiner.c | 8 ++++++++ drivers/gpu/drm/i915/display/intel_joiner.h | 1 + drivers/gpu/drm/i915/display/intel_modeset_setup.c | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-)