[PATCH] dp-mst-register

From: Chris Wilson
Date: Tue Jan 10 2017 - 05:46:25 EST


---
drivers/gpu/drm/i915/intel_dp.c | 12 +++++++++++-
drivers/gpu/drm/i915/intel_dp_mst.c | 9 ++++++---
2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f0f44cdbe4b4..fc10eb2c8563 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index c93c1999a494..f0a664041dbc 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -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


--TB36FDmn/VVEgNH/--