From 30ac9092e934295f12775f03d73170fc480b7fc8 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue, 10 Jan 2017 10:46:25 +0000
Subject: [PATCH] dp-mst-register
---
drivers/gpu/drm/i915/intel_dp.c | 12 +++++++++++-
drivers/gpu/drm/i915/intel_dp_mst.c | 9 ++++++---
2 files changed, 17 insertions(+), 4 deletions(-)
@@ -4762,7 +4762,17 @@ intel_dp_connector_register(struct drm_connector *connector)
intel_dp->aux.name, connector->kdev->kobj.name);
intel_dp->aux.dev = connector->kdev;
- return drm_dp_aux_register(&intel_dp->aux);
+ ret = drm_dp_aux_register(&intel_dp->aux);
+ if (ret)
+ return ret;
+
+ if (intel_dp->mst_mgr.cbs) {
+ intel_dp->can_mst = true;
+ if (intel_dp->attached_connector)
+ intel_dp->attached_connector->base.status = intel_dp_long_pulse(intel_dp->attached_connector);
+ }
+
+ return 0;
}
static void
@@ -582,16 +582,19 @@ intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_ba
struct drm_device *dev = intel_dig_port->base.base.dev;
int ret;
- intel_dp->can_mst = true;
+ intel_dp->can_mst = false;
intel_dp->mst_mgr.cbs = &mst_cbs;
/* create encoders */
intel_dp_create_fake_mst_encoders(intel_dig_port);
- ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev, &intel_dp->aux, 16, 3, conn_base_id);
+ ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev,
+ &intel_dp->aux, 16, 3,
+ conn_base_id);
if (ret) {
- intel_dp->can_mst = false;
+ intel_dp->mst_mgr.cbs = NULL;
return ret;
}
+
return 0;
}
--
2.11.0