aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-07-23 19:28:01 -0400
committerHarry Wentland <harry.wentland@amd.com>2019-07-25 16:39:35 -0400
commit562836a269e363cdb74b551e3be7021c9d228378 (patch)
tree6106ece2ae26c3512f3d8a5a6509059e9e8b30b5 /include/drm
parent3935ec4a1184a32696251d19d87849981f4d189d (diff)
drm/dp_mst: Enable registration of AUX devices for MST ports
All available downstream ports - physical and logical - are exposed for each MST device. They are listed in /dev/, following the same naming scheme as SST devices by appending an incremental ID. Although all downstream ports are exposed, only some will work as expected. Consider the following topology: +---------+ | ASIC | +---------+ Conn-0| | +----v----+ +----| MST HUB |----+ | +---------+ | | | |Port-1 Port-2| +-----v-----+ +-----v-----+ | MST | | SST | | Display | | Display | +-----------+ +-----------+ |Port-1 x MST Path | MST Device ----------+---------------------------------- sst:0 | MST Hub mst:0-1 | MST Display mst:0-1-1 | MST Display's disconnected DP out mst:0-1-8 | MST Display's internal sink mst:0-2 | SST Display On certain MST displays, the upstream physical port will ACK DPCD reads. However, reads on the local logical port to the internal sink will *NAK*. i.e. reading mst:0-1 ACKs, but mst:0-1-8 NAKs. There may also be duplicates. Some displays will return the same GUID when reading DPCD from both mst:0-1 and mst:0-1-8. There are some device-dependent behavior as well. The MST hub used during testing will actually *ACK* read requests on a disconnected physical port, whereas the MST displays will NAK. In light of these discrepancies, it's simpler to expose all downstream ports - both physical and logical - and let the user decide what to use. v3 changes: * Change WARN_ON_ONCE -> DRM_ERROR on dpcd read errors * Docstring and cosmetic fixes v2 changes: Moved remote aux device (un)registration to new mst connector late register and early unregister helpers. Drivers should call these from their own mst connector function hooks. This is to solve an issue during driver unload, where mst connector devices are unregistered before the remote aux devices are. In a setup where aux devices are created as children of connector devices, the aux device would be removed too early, and uncleanly. Doing so in early_unregister solves this issue, as that is called before connector unregistration. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190723232808.28128-3-sunpeng.li@amd.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_dp_helper.h4
-rw-r--r--include/drm/drm_dp_mst_helper.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 397896b5b21a..8364502f92cf 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1309,6 +1309,10 @@ struct drm_dp_aux {
1309 * @cec: struct containing fields used for CEC-Tunneling-over-AUX. 1309 * @cec: struct containing fields used for CEC-Tunneling-over-AUX.
1310 */ 1310 */
1311 struct drm_dp_aux_cec cec; 1311 struct drm_dp_aux_cec cec;
1312 /**
1313 * @is_remote: Is this AUX CH actually using sideband messaging.
1314 */
1315 bool is_remote;
1312}; 1316};
1313 1317
1314ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset, 1318ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset,
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 8c97a5f92c47..2ba6253ea6d3 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -643,6 +643,17 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
643void drm_dp_mst_topology_mgr_suspend(struct drm_dp_mst_topology_mgr *mgr); 643void drm_dp_mst_topology_mgr_suspend(struct drm_dp_mst_topology_mgr *mgr);
644int __must_check 644int __must_check
645drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr); 645drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr);
646
647ssize_t drm_dp_mst_dpcd_read(struct drm_dp_aux *aux,
648 unsigned int offset, void *buffer, size_t size);
649ssize_t drm_dp_mst_dpcd_write(struct drm_dp_aux *aux,
650 unsigned int offset, void *buffer, size_t size);
651
652int drm_dp_mst_connector_late_register(struct drm_connector *connector,
653 struct drm_dp_mst_port *port);
654void drm_dp_mst_connector_early_unregister(struct drm_connector *connector,
655 struct drm_dp_mst_port *port);
656
646struct drm_dp_mst_topology_state *drm_atomic_get_mst_topology_state(struct drm_atomic_state *state, 657struct drm_dp_mst_topology_state *drm_atomic_get_mst_topology_state(struct drm_atomic_state *state,
647 struct drm_dp_mst_topology_mgr *mgr); 658 struct drm_dp_mst_topology_mgr *mgr);
648int __must_check 659int __must_check