Skip to content

Commit ad7f8a1

Browse files
committed
drm/helper: add Displayport multi-stream helper (v0.6)
This is the initial import of the helper for displayport multistream. It consists of a topology manager, init/destroy/set mst state It supports DP 1.2 MST sideband msg protocol handler - via hpd irqs connector detect and edid retrieval interface. It supports i2c device over DP 1.2 sideband msg protocol (EDID reads only) bandwidth manager API via vcpi allocation and payload updating, along with a helper to check the ACT status. Objects: MST topology manager - one per toplevel MST capable GPU port - not sure if this should be higher level again MST branch unit - one instance per plugged branching unit - one at top of hierarchy - others hanging from ports MST port - one port per port reported by branching units, can have MST units hanging from them as well. Changes since initial posting: a) add a mutex responsbile for the queues, it locks the sideband and msg slots, and msgs to transmit state b) add worker to handle connection state change events, for MST device chaining and hotplug c) add a payload spinlock d) add path sideband msg support e) fixup enum path resources transmit f) reduce max dpcd msg to 16, as per DP1.2 spec. g) separate tx queue kicking from irq processing and move irq acking back to drivers. Changes since v0.2: a) reorganise code, b) drop ACT forcing code c) add connector naming interface using path property d) add topology dumper helper e) proper reference counting and lookup for ports and mstbs. f) move tx kicking into a workq g) add aux locking - this should be redone h) split teardown into two parts i) start working on documentation on interface. Changes since v0.3: a) vc payload locking and tracking fixes b) add hotplug callback into driver - replaces crazy return 1 scheme c) txmsg + mst branch device refcount fixes d) don't bail on mst shutdown if device is gone e) change irq handler to take all 4 bytes of SINK_COUNT + ESI vectors f) make DP payload updates timeout longer - observed on docking station redock g) add more info to debugfs dumper Changes since v0.4: a) suspend/resume support b) more debugging in debugfs Changes since v0.5: a) use byte * to avoid unnecessary stack usage b) fix num_sdp_streams interpretation. c) init payload state for unplug events d) remove lenovo dock sink count hack e) drop aux lock - post rebase f) call hotplug on port destroy TODO: misc features Reviewed-by: Todd Previte <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 43aba7e commit ad7f8a1

File tree

4 files changed

+3228
-1
lines changed

4 files changed

+3228
-1
lines changed

Documentation/DocBook/drm.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,12 @@ void intel_crt_init(struct drm_device *dev)
23362336
!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
23372337
!Iinclude/drm/drm_dp_helper.h
23382338
!Edrivers/gpu/drm/drm_dp_helper.c
2339+
</sect2>
2340+
<sect2>
2341+
<title>Display Port MST Helper Functions Reference</title>
2342+
!Pdrivers/gpu/drm/drm_dp_mst_topology.c dp mst helper
2343+
!Iinclude/drm/drm_dp_mst_helper.h
2344+
!Edrivers/gpu/drm/drm_dp_mst_topology.c
23392345
</sect2>
23402346
<sect2>
23412347
<title>EDID Helper Functions Reference</title>

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o
2424
drm-usb-y := drm_usb.o
2525

2626
drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \
27-
drm_plane_helper.o
27+
drm_plane_helper.o drm_dp_mst_topology.o
2828
drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
2929
drm_kms_helper-$(CONFIG_DRM_KMS_FB_HELPER) += drm_fb_helper.o
3030
drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o

0 commit comments

Comments
 (0)