summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_dp_mst.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2025-04-04 18:03:08 +0300
committerImre Deak <imre.deak@intel.com>2025-04-07 16:25:22 +0300
commitfa207d2b1d280053d7bbbdb972e57f3c8d959346 (patch)
tree46db816a4abdd09fc1ff6dd46f7d0c33dbddb173 /drivers/gpu/drm/i915/display/intel_dp_mst.c
parent39abe4ad13958b480ced5770297889fbdbdf3695 (diff)
downloadlinux-fa207d2b1d280053d7bbbdb972e57f3c8d959346.tar.xz
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_dp_mst.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_mst.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 8084e7e8cf11..2a4bbe692558 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -105,6 +105,11 @@ static struct intel_dp *to_primary_dp(struct intel_encoder *encoder)
return &dig_port->dp;
}
+int intel_dp_mst_active_streams(struct intel_dp *intel_dp)
+{
+ return intel_dp->mst.active_links;
+}
+
static bool intel_dp_mst_dec_active_streams(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
@@ -1888,12 +1893,6 @@ mst_stream_encoders_create(struct intel_digital_port *dig_port)
}
int
-intel_dp_mst_encoder_active_links(struct intel_digital_port *dig_port)
-{
- return dig_port->dp.mst.active_links;
-}
-
-int
intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id)
{
struct intel_display *display = to_intel_display(dig_port);