diff options
author | Imre Deak <imre.deak@intel.com> | 2025-04-04 18:03:08 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2025-04-07 16:25:22 +0300 |
commit | fa207d2b1d280053d7bbbdb972e57f3c8d959346 (patch) | |
tree | 46db816a4abdd09fc1ff6dd46f7d0c33dbddb173 /drivers/gpu/drm/i915/display/intel_tc.c | |
parent | 39abe4ad13958b480ced5770297889fbdbdf3695 (diff) |
drm/i915/dp_mst: Rename intel_dp_mst_encoder_active_links() to intel_dp_mst_active_streams()
It's not clear which encoder intel_dp_mst_encoder_active_links() refers
to (primary/stream), but there is also no reason to call the queried
property an encoder property; remove encoder from the name. Also it's
the number of MST streams being queried, vs. the number of MST links
(there is one MST link carrying one or more MST streams), so rename link
to stream as well.
While at it pass intel_dp to the function, which is more logical and
makes it easier to re-use the function later (without the need to get
the digital port pointer).
Also move the function earlier, next to the related ones.
Suggested-by: Jani Nikula <jani.nikula@intel.com>
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-5-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_tc.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_tc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index 2c6c18434a4c..c1014e74791f 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -1547,28 +1547,28 @@ void intel_tc_port_init_mode(struct intel_digital_port *dig_port) mutex_unlock(&tc->lock); } -static bool tc_port_has_active_links(struct intel_tc_port *tc, - const struct intel_crtc_state *crtc_state) +static bool tc_port_has_active_streams(struct intel_tc_port *tc, + const struct intel_crtc_state *crtc_state) { struct intel_display *display = to_intel_display(tc->dig_port); struct intel_digital_port *dig_port = tc->dig_port; enum icl_port_dpll_id pll_type = ICL_PORT_DPLL_DEFAULT; - int active_links = 0; + int active_streams = 0; if (dig_port->dp.is_mst) { /* TODO: get the PLL type for MST, once HW readout is done for it. */ - active_links = intel_dp_mst_encoder_active_links(dig_port); + active_streams = intel_dp_mst_active_streams(&dig_port->dp); } else if (crtc_state && crtc_state->hw.active) { pll_type = intel_ddi_port_pll_type(&dig_port->base, crtc_state); - active_links = 1; + active_streams = 1; } - if (active_links && !tc_phy_is_connected(tc, pll_type)) + if (active_streams && !tc_phy_is_connected(tc, pll_type)) drm_err(display->drm, - "Port %s: PHY disconnected with %d active link(s)\n", - tc->port_name, active_links); + "Port %s: PHY disconnected with %d active stream(s)\n", + tc->port_name, active_streams); - return active_links; + return active_streams; } /** @@ -1592,7 +1592,7 @@ void intel_tc_port_sanitize_mode(struct intel_digital_port *dig_port, mutex_lock(&tc->lock); drm_WARN_ON(display->drm, tc->link_refcount != 1); - if (!tc_port_has_active_links(tc, crtc_state)) { + if (!tc_port_has_active_streams(tc, crtc_state)) { /* * TBT-alt is the default mode in any case the PHY ownership is not * held (regardless of the sink's connected live state), so |