[PATCH 03/19] drm/i915/display_debugfs: Allow force joiner only if supported
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Thu Sep 12 08:01:56 UTC 2024
Currently joiner is only supported for DP encoder.
Allow force joiner only for DP for supported platforms.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
.../drm/i915/display/intel_display_debugfs.c | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 4a3ec48b9c91..e8df53c774dd 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1520,6 +1520,9 @@ static ssize_t i915_joiner_write(struct file *file,
struct seq_file *m = file->private_data;
struct intel_connector *connector = m->private;
struct intel_display *display = to_intel_display(connector);
+ struct intel_encoder *intel_encoder = intel_attached_encoder(connector);
+ struct intel_dp *intel_dp;
+ int connector_type = connector->base.connector_type;
int force_join_pipes = 0;
int ret;
@@ -1530,16 +1533,27 @@ static ssize_t i915_joiner_write(struct file *file,
if (ret < 0)
return ret;
+ /* Currently joiner is only supported for eDP/DP */
+ if (connector_type != DRM_MODE_CONNECTOR_DisplayPort &&
+ connector_type != DRM_MODE_CONNECTOR_eDP)
+ return 0;
+
+ intel_dp = enc_to_intel_dp(intel_encoder);
+
+ connector->force_joined_pipes = 0;
+
switch (force_join_pipes) {
case 0:
- fallthrough;
+ break;
case 2:
- connector->force_joined_pipes = force_join_pipes;
+ if (intel_dp_has_joiner(intel_dp))
+ connector->force_joined_pipes = force_join_pipes;
+ else
+ drm_dbg(display->drm, "Force joiner not supported for the config\n");
break;
default:
drm_dbg(display->drm, "Ignoring Invalid num of pipes %d for force joining\n",
force_join_pipes);
- connector->force_joined_pipes = 0;
}
*offp += len;
--
2.45.2
More information about the Intel-gfx-trybot
mailing list