14 Jul, 2017
1 commit
-
Make the atomic private object stuff less special by introducing proper
base classes for the object and its state. Drivers can embed these in
their own appropriate objects, after which these things will work
exactly like the plane/crtc/connector states during atomic operations.v2: Reorder to not depend on drm_dynarray (Daniel)
Cc: Dhinakaran Pandiyan
Cc: Daniel Vetter
Reviewed-by: Daniel Vetter #v1
Signed-off-by: Ville Syrjälä
Link: http://patchwork.freedesktop.org/patch/msgid/20170712155102.26276-3-ville.syrjala@linux.intel.com
04 May, 2017
2 commits
-
drm_dp_atomic_find_vcpi_slots() should be called from ->atomic_check() to
check there are sufficient vcpi slots for a mode and to add that to the
state. This should be followed by a call to drm_dp_mst_allocate_vcpi()
in ->atomic_commit() to initialize a struct vcpi for the port.drm_dp_atomic_release_vcpi_slots() should be called from
->atomic_check() to release a port's vcpi slot allocation from the
state.Drivers that do not make use of this atomic helper are expected to call
drm_dp_find_vcpi_slots() instead before calling
drm_dp_mst_allocate_vcpi().v3: drm_dp_atomic_release_vcpi_slots() now needs to know how many slots
to release as we may not have a valid reference to port.
v2:
Added checks for verifying the port reference is valid
Moved get_mst_topology_state() into the helpers (Daniel)
Changed find_vcpi_slots() to not depend on current allocationCc: Daniel Vetter
Cc: Maarten Lankhorst
Cc: Archit Taneja
Cc: Chris Wilson
Cc: Harry Wentland
Reviewed-by: Harry Wentland
Reviewed-by: Maarten Lankhorst
Signed-off-by: Dhinakaran Pandiyan
Signed-off-by: Maarten Lankhorst
Link: http://patchwork.freedesktop.org/patch/msgid/1492753893-3748-4-git-send-email-dhinakaran.pandiyan@intel.com -
Link bandwidth is shared between multiple display streams in DP MST
configurations. The DP MST topology manager structure maintains the
shared link bandwidth for a primary link directly connected to the GPU. For
atomic modesetting drivers, checking if there is sufficient link bandwidth
for a mode needs to be done during the atomic_check phase to avoid failed
modesets. Let's encapsulate the available link bw information in a
private state structure so that bw can be allocated and released atomically
for each of the ports sharing the primary link.v3: WARN_ON() if connection_mutex is not held (Archit)
v2: Included kernel doc, moved state initialization and switched to
kmemdup() for allocation (Daniel)Cc: Daniel Vetter
Cc: Maarten Lankhorst
Cc: Archit Taneja
Cc: Chris Wilson
Cc: Harry Wentland
Reviewed-by: Maarten Lankhorst
Reviewed-by: Harry Wentland
Signed-off-by: Dhinakaran Pandiyan
Signed-off-by: Maarten Lankhorst
Link: http://patchwork.freedesktop.org/patch/msgid/1492753893-3748-3-git-send-email-dhinakaran.pandiyan@intel.com
23 Mar, 2017
3 commits
-
drm_dp_mst_allocate_vcpi() apart from setting up the vcpi structure,
also finds if there are enough slots available. This check is a duplicate
of that implemented in drm_dp_mst_find_vcpi_slots(). Let's move this check
out and reuse the existing drm_dp_mst_find_vcpi_slots() function to check
if there are enough vcpi slots before allocating them.This brings the check to one place. Additionally drivers that will use MST
state tracking for atomic modesets can use the atomic version of
find_vcpi_slots() and reuse drm_dp_mst_allocate_vcpi()Signed-off-by: Dhinakaran Pandiyan
Reviewed-by: Dave Airlie
Reviewed-by: Maarten Lankhorst
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-4-git-send-email-dhinakaran.pandiyan@intel.com -
The avail_slots member in the MST topology manager is never updated to
reflect the available vcpi slots. The check is effectively against
total slots, 63. So, let's make that check obvious and remove
avail_slots. While at it, make debug messages more descriptive.Cc: Daniel Vetter
Cc: Archit Taneja
Cc: Maarten Lankhorst
Cc: Chris Wilson
Cc: Harry Wentland
Signed-off-by: Dhinakaran Pandiyan
Reviewed-by: Maarten Lankhorst
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-3-git-send-email-dhinakaran.pandiyan@intel.com -
The total vcpi time slots is always 63 and does not depend on the link BW,
remove total_slots from MST topology manager struct. The next change is to
remove total_pbn which is hardcoded to 2560. The total PBN that the
topology manager allocates from depends on the link rate and is not a
constant. So, fix this by removing the total_pbn member itself.Cc: Daniel Vetter
Cc: Archit Taneja
Cc: Maarten Lankhorst
Cc: Chris Wilson
Cc: Harry Wentland
Signed-off-by: Dhinakaran Pandiyan
Reviewed-by: Maarten Lankhorst
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-2-git-send-email-dhinakaran.pandiyan@intel.com
25 Jan, 2017
2 commits
-
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).Also some minor drive-by polish where it makes sense, I read a lot
of docs ...v2: Comments from Gustavo.
Cc: Jani Nikula
Cc: Chris Wilson
Rewiewed-by: Gustavo Padovan
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-2-daniel.vetter@ffwll.ch -
struct drm_dp_mst_topology_mgr currently stores a pointer to struct dev.
Changing this to instead hold a pointer to drm_device is more useful as it
gives access to DRM structures. This also makes it consistent with other
DRM structures like drm_crtc, drm_connector etc.Signed-off-by: Dhinakaran Pandiyan
Reviewed-by: Dave Airlie
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1485301777-3465-2-git-send-email-dhinakaran.pandiyan@intel.com
19 Jul, 2016
2 commits
-
Cc: Dave Airlie
Acked-by: Chris Wilson
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-7-git-send-email-daniel.vetter@ffwll.ch -
Just replicates whether the list is empty or not. Nuke code
to avoid writing docs for it!Cc: Dave Airlie
Reviewed-by: Chris Wilson
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-6-git-send-email-daniel.vetter@ffwll.ch
05 Feb, 2016
1 commit
-
Previous implementation does not handle case below: boot up one MST branch
to DP connector of ASIC. After boot up, hot plug 2nd MST branch to DP output
of 1st MST, GUID is not created for 2nd MST branch. When downstream port of
2nd MST branch send upstream request, it fails because 2nd MST branch GUID
is not available.New Implementation: only create GUID for MST branch and save it within Branch.
Signed-off-by: Hersen Wu
Reviewed-by: Harry Wentland
Cc: stable@vger.kernel.org
Acked-by: Alex Deucher
Signed-off-by: Dave Airlie
18 Jan, 2016
1 commit
-
Since your main drm-next pull isn't out of the door yet I figured I might
as well flush out drm-misc instead of delaying for 4.6. It's really just
random stuff all over, biggest thing probably connector_mask tracking from
Maarten.* tag 'topic/drm-misc-2016-01-17' of git://anongit.freedesktop.org/drm-intel: (24 commits)
drm/fb_cma_helper: Remove implicit call to disable_unused_functions
drm/sysfs: use kobj_to_dev()
drm/i915: Init power domains early in driver load
drm: Do not set connector->encoder in drivers
apple-gmux: Add initial documentation
drm: move MODULE_PARM_DESC to other file
drm/edid: index CEA/HDMI mode tables using the VIC
drm/atomic: Remove drm_atomic_connectors_for_crtc.
drm/i915: Update connector_mask during readout, v2.
drm: Remove opencoded drm_gem_object_release_handle()
drm: Do not set outparam on error during GEM handle allocation
drm/docs: more leftovers from the big vtable documentation pile
drm/atomic-helper: Reject legacy flips on a disabled pipe
drm/atomic: add connector mask to drm_crtc_state.
drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing connector state, v2.
drm/atomic: Add __drm_atomic_helper_connector_reset, v2.
drm/i915: Set connector_state->connector using the helper.
drm: Use a normal idr allocation for the obj->name
drm: Only bump object-reference count when adding first handle
drm: Balance error path for GEM handle allocation
...
05 Jan, 2016
1 commit
-
We should always send reply for UP request in order
to make downstream device clean-up resources appropriately.Issue was that reply for UP request was sent only once.
Acked-by: Dave Airlie
Signed-off-by: Mykola Lysenko
Signed-off-by: Alex Deucher
Cc: stable@vger.kernel.org
04 Jan, 2016
1 commit
-
The drm_dp_mst_topology_cbs structures are never modified, so declare them
as const.Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Signed-off-by: Daniel Vetter
10 Dec, 2015
1 commit
-
This adds code to initialise the SDP streams
for a sink in the simplest ordering.I've no idea how you'd want to control the
ordering at this level, so don't bother
until someone comes up with a use case.Reviewed-by: Ander Conselvan de Oliveira
Signed-off-by: Libin Yang
Signed-off-by: Dave Airlie
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1449036584-105393-1-git-send-email-libin.yang@linux.intel.com
15 Oct, 2015
1 commit
-
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
Signed-off-by: Dave Airlie
02 Oct, 2015
1 commit
-
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
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie
25 Jun, 2015
1 commit
-
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
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie
20 Mar, 2015
1 commit
-
radeon requires this to get the slots for later filling
out a table on every transition.Signed-off-by: Dave Airlie
Signed-off-by: Alex Deucher
09 Dec, 2014
1 commit
-
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
15 Nov, 2014
1 commit
-
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
13 Nov, 2014
1 commit
-
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
07 Nov, 2014
1 commit
-
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
21 Oct, 2014
1 commit
-
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
Acked-by: Randy Dunlap
Signed-off-by: Daniel Vetter
13 Oct, 2014
1 commit
-
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
08 Jul, 2014
1 commit
-
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 dumperChanges since v0.4:
a) suspend/resume support
b) more debugging in debugfsChanges 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 destroyTODO:
misc featuresReviewed-by: Todd Previte
Signed-off-by: Dave Airlie