drm/i915/dp: Add helper to compute num pipes required

Add a helper to compute the number of pipes required.
This will depend on whether the joiner is required or is forced through
the debugfs. If no joiner is required the helper returns 1.

v2:
-Return 1 if no joiner is required. (Ville)
-Change the suffix from joined_pipes to num_pipes. (Ville)
-Use number of pipes while calculating joined_pipe masks and
max_dotclk. (Ville)
v3: Simplify and rename the helper to intel_dp_num_joined_pipes(). Ville
v4: Remove redundant 'fallthrough' statement. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240926134322.3728021-5-ankit.k.nautiyal@intel.com
This commit is contained in:
Ankit Nautiyal
2024-09-26 19:13:22 +05:30
parent a47df3335a
commit 84b2b38451
4 changed files with 40 additions and 36 deletions

View File

@@ -1343,6 +1343,7 @@ static ssize_t i915_joiner_write(struct file *file,
switch (force_joined_pipes) {
case 0:
case 1:
case 2:
connector->force_joined_pipes = force_joined_pipes;
break;