summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_dp_mst_helper.h
AgeCommit message (Collapse)Author
2015-10-15drm/dp/mst: make mst i2c transfer code more robust.Dave Airlie
This zeroes the msg so no random stack data ends up getting sent, it also limits the function to not accepting > 4 i2c msgs. Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-10-02drm/dp/mst: split connector registration into two parts (v2)Dave Airlie
In order to cache the EDID properly for tiled displays, we need to retrieve it before we register the connector with userspace, otherwise userspace can call get resources and try and get the edid before we've even cached it. This fixes some problems when hotplugging mst monitors, with X/mutter running. As mutter seems to get 0 modes for one of the monitors in the tile. v2: fix warning in radeon handle tile setting in cached path rather than get edid path. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-25drm/dp/mst: close deadlock in connector destruction.Dave Airlie
I've only seen this once, and I failed to capture the lockdep backtrace, but I did some investigations. If we are calling into the MST layer from EDID probing, we have the mode_config mutex held, if during that EDID probing, the MST hub goes away, then we can get a deadlock where the connector destruction function in the driver tries to retake the mode config mutex. This offloads connector destruction to a workqueue, and avoid the subsequenct lock ordering issue. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-03-19drm/dp_mst: add a function to retrieve vcpi slotsDave Airlie
radeon requires this to get the slots for later filling out a table on every transition. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-09drm/mst: cached EDID for logical ports (v2)Dave Airlie
Logical ports are never going to have EDID changes, they are used for the internal ports on MST monitors. We cache the EDIDs from these to save time at MST probe. v2: drop misplace tile property line, meant for other patch. Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-15Merge tag 'drm/fixes/for-3.19-rc1' of ↵Dave Airlie
git://people.freedesktop.org/~tagr/linux into drm-next drm: Miscellaneous fixes for v3.19-rc1 This is a small collection of fixes that I've been carrying around for a while now. Many of these have been posted and reviewed or acked. The few that haven't I deemed too trivial to bother. * tag 'drm/fixes/for-3.19-rc1' of git://people.freedesktop.org/~tagr/linux: video/hdmi: Relicense header under MIT license drm/gma500: mdfld: Reuse video/mipi_display.h drm: Make drm_mode_create_tv_properties() signature consistent drm: Implement drm_get_pci_dev() dummy for !PCI drm/prime: Use unsigned type for number of pages drm/gem: Fix typo in kerneldoc drm: Use const data when creating blob properties drm: Use size_t for blob property sizes
2014-11-13drm: Use const data when creating blob propertiesThierry Reding
Creating a blob property will always copy the input data so the data that is passed in can be const. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-07Merge tag 'topic/core-stuff-2014-11-05' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next Just various stuff all over from a bunch of people. Shortlog gives a beter overview, it's really all misc drm patches. * tag 'topic/core-stuff-2014-11-05' of git://anongit.freedesktop.org/drm-intel: drm/edid: add #defines and helpers for ELD drm/dp: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs drm: Remove compiler BUG_ON() test drm: Fix DRM_FORCE_ON_DIGITAL use drm/gma500: Don't destroy DRM properties in the driver drm/i915: Don't destroy DRM properties in the driver drm: Add a note to drm_property_create() about property lifetime gpu: drm: Fix warning caused by a parameter description in drm_crtc.c drm/dp-helper: Move the legacy helpers to gma500 drm/crtc: Remove duplicated ioctl code drm/crtc: Fix two typos gpu:drm: Fix typo in Documentation/DocBook/drm.xml gpu: drm: drm_dp_mst_topology.c: Fix improper use of strncat drm: drm_err: Remove unnecessary __func__ argument drm: Implement O_NONBLOCK support on /dev/dri/cardN
2014-10-21gpu:drm: Fix typo in Documentation/DocBook/drm.xmlMasanari Iida
This patch fix spelling typos found in drm.xml. It is because the file is generated from comments in source codes, I have to fix the typos within source files. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-13drm/mst: rework payload table allocation to conform better.Dave Airlie
The old code has problems with the Dell MST monitors due to some assumptions I made that weren't true. I initially thought the Virtual Channel Payload IDs had to be in the DPCD table in ascending order, however it appears that assumption is bogus. The old code also assumed it was possible to insert a member into the table and it would move other members up, like it does when you remove table entries, however reality has shown this isn't true. So the new code allocates VCPIs separate from entries in the payload tracking table, and when we remove an entry from the DPCD table, I shuffle the tracking payload entries around in the struct. This appears to make VT switch more robust (still not perfect) with an MST enabled Dell monitor. Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-07-08drm/helper: add Displayport multi-stream helper (v0.6)Dave Airlie
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 <tprevite@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>