mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 09:28:44 -04:00
drm/i915/dp_mst: Use intel_dp_mst_active_streams() instead of open-coding it
Use intel_dp_mst_active_streams() everywhere, instead of open-coding it. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/20250404150310.1156696-6-imre.deak@intel.com
This commit is contained in:
@@ -5018,7 +5018,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
|
||||
|
||||
drm_dbg_kms(display->drm, "DPRX ESI: %4ph\n", esi);
|
||||
|
||||
if (intel_dp->mst.active_links > 0 && link_ok &&
|
||||
if (intel_dp_mst_active_streams(intel_dp) > 0 && link_ok &&
|
||||
esi[3] & LINK_STATUS_CHANGED) {
|
||||
if (!intel_dp_mst_link_status(intel_dp))
|
||||
link_ok = false;
|
||||
|
||||
@@ -1028,7 +1028,7 @@ static void mst_stream_disable(struct intel_atomic_state *state,
|
||||
to_intel_connector(old_conn_state->connector);
|
||||
enum transcoder trans = old_crtc_state->cpu_transcoder;
|
||||
|
||||
if (intel_dp->mst.active_links == 1)
|
||||
if (intel_dp_mst_active_streams(intel_dp) == 1)
|
||||
intel_dp->link.active = false;
|
||||
|
||||
intel_hdcp_disable(intel_mst->connector);
|
||||
@@ -1144,7 +1144,7 @@ static void mst_stream_post_pll_disable(struct intel_atomic_state *state,
|
||||
struct intel_encoder *primary_encoder = to_primary_encoder(encoder);
|
||||
struct intel_dp *intel_dp = to_primary_dp(encoder);
|
||||
|
||||
if (intel_dp->mst.active_links == 0 &&
|
||||
if (intel_dp_mst_active_streams(intel_dp) == 0 &&
|
||||
primary_encoder->post_pll_disable)
|
||||
primary_encoder->post_pll_disable(state, primary_encoder, old_crtc_state, old_conn_state);
|
||||
}
|
||||
@@ -1157,7 +1157,7 @@ static void mst_stream_pre_pll_enable(struct intel_atomic_state *state,
|
||||
struct intel_encoder *primary_encoder = to_primary_encoder(encoder);
|
||||
struct intel_dp *intel_dp = to_primary_dp(encoder);
|
||||
|
||||
if (intel_dp->mst.active_links == 0)
|
||||
if (intel_dp_mst_active_streams(intel_dp) == 0)
|
||||
primary_encoder->pre_pll_enable(state, primary_encoder,
|
||||
pipe_config, NULL);
|
||||
else
|
||||
@@ -1303,7 +1303,7 @@ static void mst_stream_enable(struct intel_atomic_state *state,
|
||||
struct drm_dp_mst_topology_state *mst_state =
|
||||
drm_atomic_get_new_mst_topology_state(&state->base, &intel_dp->mst.mgr);
|
||||
enum transcoder trans = pipe_config->cpu_transcoder;
|
||||
bool first_mst_stream = intel_dp->mst.active_links == 1;
|
||||
bool first_mst_stream = intel_dp_mst_active_streams(intel_dp) == 1;
|
||||
struct intel_crtc *pipe_crtc;
|
||||
int ret, i, min_hblank;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "intel_display_power_well.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_dp_mst.h"
|
||||
#include "intel_hdcp.h"
|
||||
#include "intel_hdcp_gsc.h"
|
||||
#include "intel_hdcp_regs.h"
|
||||
@@ -137,7 +138,7 @@ intel_hdcp_required_content_stream(struct intel_atomic_state *state,
|
||||
data->k++;
|
||||
|
||||
/* if there is only one active stream */
|
||||
if (dig_port->dp.mst.active_links <= 1)
|
||||
if (intel_dp_mst_active_streams(&dig_port->dp) <= 1)
|
||||
break;
|
||||
}
|
||||
drm_connector_list_iter_end(&conn_iter);
|
||||
|
||||
Reference in New Issue
Block a user