[PATCH 3/3] drm/i915: Always allocate VCPI during system resume

2019-01-29 Thread Lyude Paul
he new drm_atomic_state.suspend_or_resume hook in order to force us to retrieve a VCPI allocation when restoring a pipe's atomic state. This is safe, since drm_dp_atomic_find_vcpi_slots() will just return the VCPI allocation we had pre-suspend. Signed-off-by: Lyude Paul Cc: Daniel Vetter Fixes: eceae1472467 ("

[PATCH 1/3] drm/dp_mst: Fix unbalanced malloc ref in drm_dp_mst_deallocate_vcpi()

2019-01-29 Thread Lyude Paul
() is called on a port with no VCPI allocation. Additionally, clean up the surrounding kerneldoc while we're at it since the port is assumed to be kept around because the DRM driver is expected to hold a malloc reference to it, not just us. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/d

[PATCH 0/3] drm/dp_mst: Fix regressions from new atomic VCPI helpers

2019-01-29 Thread Lyude Paul
This fixes the extra issues I discovered upstream after the introduction of my rework of the atomic VCPI helpers that occur during suspend/resume. Lyude Paul (3): drm/dp_mst: Fix unbalanced malloc ref in drm_dp_mst_deallocate_vcpi() drm/atomic: Add drm_atomic_state->suspend_or_resume

[PATCH] drm/nouveau: Don't WARN_ON VCPI allocation failures

2019-01-28 Thread Lyude Paul
This is much louder then we want. VCPI allocation failures are quite normal, since they will happen if any part of the modesetting process is interrupted by removing the DP MST topology in question. So just print a debugging message on VCPI failures instead. Signed-off-by: Lyude Paul Fixes

[PATCH v2 1/3] drm/i915: Block fbdev HPD processing during suspend

2019-01-28 Thread Lyude Paul
-by: Lyude Paul Fixes: 0e32b39ceed6 ("drm/i915: add DP 1.2 MST support (v0.7)") Cc: Todd Previte Cc: Dave Airlie Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Imre Deak Cc: intel-...@lists.freedesktop.org Cc: # v3.17+ --- drivers/gpu/drm/i915/intel_drv.h | 10 ++ drive

[PATCH v2 3/3] drm/i915: Don't send hotplug in intel_dp_check_mst_status()

2019-01-28 Thread Lyude Paul
This hotplug also isn't needed: drm_dp_mst_topology_mgr_set_mst() already sends a hotplug on its own from drm_dp_destroy_connector_work() after destroying connectors in the MST topology. Signed-off-by: Lyude Paul Cc: Imre Deak Cc: Daniel Vetter --- drivers/gpu/drm/i915/intel_dp.c | 6

[PATCH v2 2/3] drm/i915: Don't send MST hotplugs during resume

2019-01-28 Thread Lyude Paul
hotplug events during resume if the MST topology fails to come up. Just rely on the DP MST helpers to send them for us. Signed-off-by: Lyude Paul Cc: Imre Deak Cc: Daniel Vetter --- drivers/gpu/drm/i915/intel_dp.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 0/3] drm/i915: MST and wakeref leak fixes

2019-01-28 Thread Lyude Paul
ch, "drm/i915: Don't send MST hotplugs during resume" Lyude Paul (3): drm/i915: Block fbdev HPD processing during suspend drm/i915: Don't send MST hotplugs during resume drm/i915: Don't send hotplug in intel_dp_check_mst_status() drivers/gpu/drm/i915/intel_dp.c| 13 +

[PATCH] drm/i915: Don't send MST hotplugs until after resume

2019-01-25 Thread Lyude Paul
rom there, drm_dp_destroy_connector_work() will eventually send the hotplug event. Signed-off-by: Lyude Paul Fixes: 0e32b39ceed6 ("drm/i915: add DP 1.2 MST support (v0.7)") Cc: Todd Previte Cc: Dave Airlie Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-...@lists.freedesktop.org

[PATCH 3/3] drm/dp_mst: Fix topology ref leak in drm_dp_mst_allocate_vcpi()

2019-01-16 Thread Lyude Paul
rom the system. So, fix this by making sure that we always drop the topology ref to port when returning from this function. Additionally: it looks like this bug exists pre-topology & malloc krefs, so let's also make sure this gets backported to stable. Signed-off-by: Lyude Paul Fixes: ad7f8a1f9ce

[PATCH 2/3] drm/dp_mst: Fix potential topology ref leak in drm_dp_atomic_find_vcpi_slots()

2019-01-16 Thread Lyude Paul
immediately. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Cc: Daniel Vetter Cc: David Airlie Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 1/3] drm/dp_mst: Remove lock check in drm_atomic_get_mst_topology_state()

2019-01-16 Thread Lyude Paul
the function. Additionally since all function is now is a simple wrapper around drm_atomic_get_private_obj_state(), it seems more reasonable to move this out of drm_dp_mst_topology.c and turn it into an inline function in drm_dp_mst_helper.h Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_to

[PATCH 0/3] drm/dp_mst: Misc drive-by fixes

2019-01-16 Thread Lyude Paul
Two not terribly important fixes, and one actually important fix. Should be pretty easy to review :) Lyude Paul (3): drm/dp_mst: Remove lock check in drm_atomic_get_mst_topology_state() drm/dp_mst: Fix potential topology ref leak in drm_dp_atomic_find_vcpi_slots() drm/dp_mst: Fix

[PATCH v2] drm/i915: Pass down rc in intel_encoder->compute_config()

2019-01-15 Thread Lyude Paul
hange all of the intel_dp_compute_link_config*() variants * Don't miss if (hdmi_port_clock_valid()) branch in intel_hdmi_compute_config() Signed-off-by: Lyude Paul Cc: Ville Syrjälä Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Bugzilla: https://bugs.freedesktop.org/sho

[PATCH] drm/i915: Pass down rc in intel_encoder->compute_config()

2019-01-14 Thread Lyude Paul
of a bool so that the atomic check can be restarted on modeset deadlocks. Thanks to Ville Syrjälä for pointing this out! Signed-off-by: Lyude Paul Cc: Ville Syrjälä Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Bugzilla: https://bugs.freedesktop.org/sho

Re: [PATCH v2 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Lyude Paul
On Tue, 2019-01-08 at 16:17 -0500, Alex Deucher wrote: > On Tue, Jan 8, 2019 at 4:11 PM Lyude Paul wrote: > > Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some > > compiler warnings for drivers ignoring the return code of > > drm_dp_mst_topology_mgr_resum

[PATCH v2 2/3] drm/amdgpu: Don't fail resume process if resuming atomic state fails

2019-01-08 Thread Lyude Paul
because of a potentially unavoidable atomic commit failure. Eventually, we'll have a real fix for this problem on the DRM level. But we've got some more important low-hanging fruit to deal with first. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Jerry Zuo Cc: # v4.15+ --- drivers/gpu

[PATCH v2 3/3] drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume()

2019-01-08 Thread Lyude Paul
Since I've had to fix two cases of drivers not checking the return code from this function, let's make the compiler complain so this doesn't come up again in the future. Changes since v1: * Remove unneeded __must_check in function declaration - danvet Signed-off-by: Lyude Paul Cc: Jerry Zuo

[PATCH v2 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-08 Thread Lyude Paul
Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some compiler warnings for drivers ignoring the return code of drm_dp_mst_topology_mgr_resume() to help ensure we don't need to fix this again in the future for someone else's driver. Cc: Jerry Zuo Lyude Paul (3): drm/amdgpu

[PATCH v2 1/3] drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()

2019-01-08 Thread Lyude Paul
this by actually checking the rc from drm_dp_mst_topology_mgr_resume(). Also, reformat the rest of the function while we're at it to fix the over-indenting. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Jerry Zuo Cc: # v4.15+ --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32

[PATCH 3/3] drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume()

2019-01-07 Thread Lyude Paul
Since I've had to fix two cases of drivers not checking the return code from this function, let's make the compiler complain so this doesn't come up again in the future. Signed-off-by: Lyude Paul Cc: Jerry Zuo Cc: Daniel Vetter --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- include/drm

[PATCH 2/3] drm/amdgpu: Don't fail resume process if resuming atomic state fails

2019-01-07 Thread Lyude Paul
because of a potentially unavoidable atomic commit failure. Eventually, we'll have a real fix for this problem on the DRM level. But we've got some more important low-hanging fruit to deal with first. Signed-off-by: Lyude Paul Cc: Jerry Zuo Cc: # v4.15+ --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH 1/3] drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()

2019-01-07 Thread Lyude Paul
this by actually checking the rc from drm_dp_mst_topology_mgr_resume(). Also, reformat the rest of the function while we're at it to fix the over-indenting. Signed-off-by: Lyude Paul Cc: Jerry Zuo Cc: # v4.15+ --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +-- 1 file changed, 23

[PATCH 0/3] drm/amdgpu: Fix suspend/resume issues with MST

2019-01-07 Thread Lyude Paul
Fix the suspend/issues that Jerry Zuo found in amdgpu, and add some compiler warnings for drivers ignoring the return code of drm_dp_mst_topology_mgr_resume() to help ensure we don't need to fix this again in the future for someone else's driver. Cc: Jerry Zuo Lyude Paul (3): drm/amdgpu

Re: [WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2018-12-19 Thread Lyude Paul
On Wed, 2018-12-19 at 13:48 +0100, Daniel Vetter wrote: > On Tue, Dec 18, 2018 at 04:27:58PM -0500, Lyude Paul wrote: > > On Fri, 2018-12-14 at 10:29 +0100, Daniel Vetter wrote: > > > On Thu, Dec 13, 2018 at 08:25:32PM -0500, Lyude Paul wrote: > > > > The curre

Re: [WIP PATCH 05/15] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2018-12-18 Thread Lyude Paul
On Fri, 2018-12-14 at 10:38 +0100, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 08:25:34PM -0500, Lyude Paul wrote: > > Up until now, freeing payloads on remote MST hubs that just had ports > > removed has almost never worked because we've been relying on port > > validatio

Re: [WIP PATCH 06/15] drm/i915: Keep malloc references to MST ports

2018-12-18 Thread Lyude Paul
On Fri, 2018-12-14 at 10:32 +0100, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 08:25:35PM -0500, Lyude Paul wrote: > > So that the ports stay around until we've destroyed the connectors, in > > order to ensure that we don't pass an invalid pointer to any MST helpers > &

Re: [WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2018-12-18 Thread Lyude Paul
On Fri, 2018-12-14 at 10:29 +0100, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 08:25:32PM -0500, Lyude Paul wrote: > > The current way of handling refcounting in the DP MST helpers is really > > confusing and probably just plain wrong because it's been hacked up many > >

[WIP PATCH 15/15] drm/nouveau: Use atomic VCPI helpers for MST

2018-12-13 Thread Lyude Paul
for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul Cc: Daniel Vetter --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 52 ++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b

[WIP PATCH 10/15] drm/nouveau: Stop unsetting mstc->port, use malloc refs

2018-12-13 Thread Lyude Paul
Same as we did for i915, but for nouveau this time. Additionally, we grab a malloc reference to the port that lasts for the entire lifetime of nv50_mstc, which gives us the guarantee that mstc->port will always point to valid memory for as long as the mstc stays around. Signed-off-by: Lyude P

[WIP PATCH 06/15] drm/i915: Keep malloc references to MST ports

2018-12-13 Thread Lyude Paul
So that the ports stay around until we've destroyed the connectors, in order to ensure that we don't pass an invalid pointer to any MST helpers once we introduce the new MST VCPI helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/intel_connector.c | 4 drivers/gpu/drm/i915

[WIP PATCH 08/15] drm/nouveau: Remove unnecessary VCPI checks in nv50_msto_cleanup()

2018-12-13 Thread Lyude Paul
future, use msto->disabled instead to check whether or not we need to deallocate VCPI instead. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/

[WIP PATCH 09/15] drm/nouveau: Fix potential use-after-frees for MSTCs

2018-12-13 Thread Lyude Paul
ort could technically be pointing at freed memory. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 0f7d72518604..982054bbcc

[WIP PATCH 13/15] drm/dp_mst: Start tracking per-port VCPI allocations

2018-12-13 Thread Lyude Paul
ns with __must_check - danvet Changes since v1: - Don't use the now-removed ->atomic_check() for private objects hook, just give drivers a function to call themselves Signed-off-by: Lyude Paul Cc: Daniel Vetter --- drivers/gpu/drm/drm_dp_mst_topology.c | 271 +++--- d

[WIP PATCH 14/15] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2018-12-13 Thread Lyude Paul
It occurred to me that we never actually check this! So let's start doing that. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_dp_mst_topology.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b

[WIP PATCH 07/15] drm/nouveau: Remove bogus cleanup in nv50_mstm_add_connector()

2018-12-13 Thread Lyude Paul
Trying to destroy the connector using mstc->connector.funcs->destroy() if connector initialization fails is wrong: there is no possible codepath in nv50_mstc_new where nv50_mstm_add_connector() would return <0 and mstc would be non-NULL. Signed-off-by: Lyude Paul --- drivers/gpu/dr

[WIP PATCH 01/15] drm/dp_mst: Remove bogus conditional in drm_dp_update_payload_part1()

2018-12-13 Thread Lyude Paul
There's no reason we need this, it's just confusing looking. Signed-off-by: Lyude Paul Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c

[WIP PATCH 12/15] drm/dp_mst: Add some atomic state iterator macros

2018-12-13 Thread Lyude Paul
Changes since v6: - Move EXPORT_SYMBOL() for drm_dp_mst_topology_state_funcs to this commit - Document __drm_dp_mst_state_iter_get() and note that it shouldn't be called directly Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_dp_mst_topology.c | 5

[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2018-12-13 Thread Lyude Paul
t;1) Since we now can guarantee memory safety for ports and branches as-needed, we also can make our main reference counting functions fix this problem by using kref_get_unless_zero() internally so that topology refcounts can only ever reach 0 once. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David

[WIP PATCH 04/15] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2018-12-13 Thread Lyude Paul
This has never actually worked, and isn't needed anyway: the driver's always going to try to deallocate VCPI when it tears down the display that the VCPI belongs to. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 1 file changed, 8 deletions(-) diff --git

[WIP PATCH 11/15] drm/nouveau: Grab payload lock in nv50_msto_payload()

2018-12-13 Thread Lyude Paul
Going through the currently programmed payloads isn't safe without holding mgr->payload_lock, so actually do that and warn if anyone tries calling nv50_msto_payload() in the future without grabbing the right locks. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c

[WIP PATCH 05/15] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2018-12-13 Thread Lyude Paul
are still valid and in the topology, any port which has an allocated payload will remain allocated in memory until it's payloads have been removed - finally allowing us to actually release said payloads correctly. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 54

[WIP PATCH 00/15] MST refcounting/atomic helpers cleanup

2018-12-13 Thread Lyude Paul
for the series this is based off of: drm/dp_mst: Improve VCPI helpers, use in nouveau https://patchwork.freedesktop.org/series/51414/ This is just getting put on the ML so I can get some feedback on this. Lyude Paul (15): drm/dp_mst: Remove bogus conditional in drm_dp_update_payload_part1() drm

[WIP PATCH 02/15] drm/dp_mst: Refactor drm_dp_update_payload_part1()

2018-12-13 Thread Lyude Paul
There should be no functional changes here Signed-off-by: Lyude Paul Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 71 --- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

[PATCH] drm/nouveau: Fix memory leak in nv50_mstm_del()

2018-12-11 Thread Lyude Paul
t;drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") Signed-off-by: Lyude Paul Cc: # v4.10+ --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index d1

[PATCH] drm/dp_mst: Fix memory leak in drm_dp_mst_topology_mgr_destroy()

2018-12-11 Thread Lyude Paul
We need to call drm_dp_mst_topology_mgr_set_mst(mgr, false) when destroying the topology manager in order to ensure that the root mstb and all of it's descendents are actually destroyed, and additionally to try to make sure that we leave the hub in a clean state. Signed-off-by: Lyude Paul Fixes

Re: next/master boot bisection: Oops in nouveau driver on jetson-tk1

2018-12-07 Thread Lyude Paul
Tree: next > URL:None > Branch: master > Target: jetson-tk1 > Lab:lab-baylibre > Config: multi_v7_defconfig > Plan: dmesg-nouveau > > Breaking commit found: > > > --- > commit cfea88a4d86632f28cf80be97079f131645b78

[PATCH] Revert "drm/dp_mst: Skip validating ports during destruction, just ref"

2018-11-28 Thread Lyude Paul
per fix here. Signed-off-by: Lyude Paul Fixes: c54c7374ff44 ("drm/dp_mst: Skip validating ports during destruction, just ref") Cc: Daniel Vetter Cc: Sean Paul Cc: Jerry Zuo Cc: Harry Wentland Cc: sta...@vger.kernel.org # v4.6+ --- drivers/gpu/drm/drm_dp_mst_topology.c | 15 ++

[PATCH] Revert "drm/dp_mst: Skip validating ports during destruction, just ref"

2018-11-28 Thread Lyude Paul
per fix here. Signed-off-by: Lyude Paul Fixes: c54c7374ff44 ("drm/dp_mst: Skip validating ports during destruction, just ref") Cc: Daniel Vetter Cc: Sean Paul Cc: Jerry Zuo Cc: Harry Wentland Cc: sta...@vger.kernel.org # v4.6+ --- drivers/gpu/drm/drm_dp_mst_topology.c | 15 ++

[PATCH] Input: synaptics - Add PNP ID for ThinkPad P50 to SMBus

2018-11-21 Thread Lyude Paul
Noticed the other day the trackpoint felt different on my P50, then realized it was because rmi4 wasn't loading for this machine automatically. Suspend/resume, hibernate, and everything else seem to work perfectly fine on here. Signed-off-by: Lyude Paul --- drivers/input/mouse/synaptics.c | 1

[PATCH] Input: synaptics - Add PNP ID for ThinkPad P50 to SMBus

2018-11-21 Thread Lyude Paul
Noticed the other day the trackpoint felt different on my P50, then realized it was because rmi4 wasn't loading for this machine automatically. Suspend/resume, hibernate, and everything else seem to work perfectly fine on here. Signed-off-by: Lyude Paul --- drivers/input/mouse/synaptics.c | 1

[PATCH v4 2/5] drm/i915: Fix NULL deref when re-enabling HPD IRQs on systems with MST

2018-11-05 Thread Lyude Paul
port instead of intel_connector->encoder Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_hotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c ind

[PATCH v4 2/5] drm/i915: Fix NULL deref when re-enabling HPD IRQs on systems with MST

2018-11-05 Thread Lyude Paul
port instead of intel_connector->encoder Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_hotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c ind

[PATCH v4 5/5] drm/i915: Add short HPD IRQ storm detection for non-MST systems

2018-11-05 Thread Lyude Paul
changes Signed-off-by: Lyude Paul Cc: Ville Syrjälä Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_debugfs.c | 74 drivers/gpu/drm/i915/i915_drv.h | 5 +- drivers/gpu/drm/i915/i915_irq.c | 7 +++ drivers/gpu/drm/i915/intel_hotplug.c | 49 ++-

[PATCH v4 5/5] drm/i915: Add short HPD IRQ storm detection for non-MST systems

2018-11-05 Thread Lyude Paul
changes Signed-off-by: Lyude Paul Cc: Ville Syrjälä Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_debugfs.c | 74 drivers/gpu/drm/i915/i915_drv.h | 5 +- drivers/gpu/drm/i915/i915_irq.c | 7 +++ drivers/gpu/drm/i915/intel_hotplug.c | 49 ++-

[PATCH v6 5/5] drm/nouveau: Fix deadlocks in nouveau_connector_detect()

2018-08-13 Thread Lyude Paul
at a hotplug occurs while the device is suspending or resuming, we can simply defer our response until the GPU is fully runtime resumed again. Changes since v5: - Use a new trick I came up with using pm_runtime_get() instead of the hackish junk we had before Signed-off-by: Lyude Paul Cc:

[PATCH v6 5/5] drm/nouveau: Fix deadlocks in nouveau_connector_detect()

2018-08-13 Thread Lyude Paul
at a hotplug occurs while the device is suspending or resuming, we can simply defer our response until the GPU is fully runtime resumed again. Changes since v5: - Use a new trick I came up with using pm_runtime_get() instead of the hackish junk we had before Signed-off-by: Lyude Paul Cc:

[PATCH] drm/nouveau: Set DRIVER_ATOMIC cap earlier to fix debugfs

2018-07-23 Thread Lyude Paul
to check the current display state even if clients aren't allowed to modify it through anything other than the legacy ioctls. Additionally, disable the DRIVER_ATOMIC cap in nv04's display core, as this was already disabled there previously. Signed-off-by: Lyude Paul Cc: sta...@vger.kernel.org

[PATCH] drm/nouveau: Set DRIVER_ATOMIC cap earlier to fix debugfs

2018-07-23 Thread Lyude Paul
to check the current display state even if clients aren't allowed to modify it through anything other than the legacy ioctls. Additionally, disable the DRIVER_ATOMIC cap in nv04's display core, as this was already disabled there previously. Signed-off-by: Lyude Paul Cc: sta...@vger.kernel.org

[PATCH 0/2] drm/nouveau: Fix runtime PM leaks

2018-07-03 Thread Lyude Paul
One very easy to trigger runtime PM leak, along with a rare never before seen runtime PM leak! Lyude Paul (2): drm/nouveau: Fix runtime PM leak in drm_open() drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit() drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/nouveau

[PATCH 0/2] drm/nouveau: Fix runtime PM leaks

2018-07-03 Thread Lyude Paul
One very easy to trigger runtime PM leak, along with a rare never before seen runtime PM leak! Lyude Paul (2): drm/nouveau: Fix runtime PM leak in drm_open() drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit() drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/nouveau

[PATCH 2/4] drm/amdgpu: s/disp_detetion_ports/disp_detection_ports/

2018-06-25 Thread Lyude Paul
Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 1ae5ae8c45a4..717cc5a90313 100644

[PATCH 4/4] drm/amdgpu: Dynamically probe for ATIF handle

2018-06-25 Thread Lyude Paul
to use for ATIF and using that instead of the device's handle. This fixes HPD detection while in runtime suspend for this ZBook! Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 80 +--- 1 file changed, 59 insertions(+), 21 deletions(-) diff --git

[PATCH 2/4] drm/amdgpu: s/disp_detetion_ports/disp_detection_ports/

2018-06-25 Thread Lyude Paul
Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 1ae5ae8c45a4..717cc5a90313 100644

[PATCH 4/4] drm/amdgpu: Dynamically probe for ATIF handle

2018-06-25 Thread Lyude Paul
to use for ATIF and using that instead of the device's handle. This fixes HPD detection while in runtime suspend for this ZBook! Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 80 +--- 1 file changed, 59 insertions(+), 21 deletions(-) diff --git

[PATCH 1/4] drm/amdgpu: Make struct amdgpu_atif private to amdgpu_acpi.c

2018-06-25 Thread Lyude Paul
, the type definition for acpi_handle and all of the other acpi headers) doesn't need to be included within the amdgpu_drv struct itself. This follows the example set by amdgpu_atpx_handler.c. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 40 +- drivers/gpu/drm

[PATCH 1/4] drm/amdgpu: Make struct amdgpu_atif private to amdgpu_acpi.c

2018-06-25 Thread Lyude Paul
, the type definition for acpi_handle and all of the other acpi headers) doesn't need to be included within the amdgpu_drv struct itself. This follows the example set by amdgpu_atpx_handler.c. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 40 +- drivers/gpu/drm

[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()

2018-05-02 Thread Lyude Paul
mple from i915, the only time we need to hold any modesetting locks is when changing the port on the mstc, and in that case we only need to hold the connection mutex. Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Karol Herbst <kher...@redhat.com> Cc: sta...@vger.kernel.org Signed-off-b

[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()

2018-05-02 Thread Lyude Paul
mple from i915, the only time we need to hold any modesetting locks is when changing the port on the mstc, and in that case we only need to hold the connection mutex. Signed-off-by: Lyude Paul Cc: Karol Herbst Cc: sta...@vger.kernel.org Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nv50_di

[PATCH] drm/nouveau: Add missing fb SLCG registers for kepler2

2018-04-13 Thread Lyude Paul
Somehow I didn't manage to notice this the last time I looked at my mmiotraces, these seem to be all valid registers. Forwarding this to stable, as there's a small chance that not having these could cause clockgating to be unstable. Signed-off-by: Lyude Paul <ly...@redhat.com>

[PATCH] drm/nouveau: Add missing fb SLCG registers for kepler2

2018-04-13 Thread Lyude Paul
Somehow I didn't manage to notice this the last time I looked at my mmiotraces, these seem to be all valid registers. Forwarding this to stable, as there's a small chance that not having these could cause clockgating to be unstable. Signed-off-by: Lyude Paul Fixes: a0f79082bd174 ("drm/no

[PATCH v8 00/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
Next version of https://patchwork.freedesktop.org/series/41576/ Only changes are removing duplicate SoBs that git send-email annoyingly added. Sorry about that :( Lyude Paul (10): drm/atomic: Print debug message on atomic check failure drm/i915: Move DP modeset retry work into intel_dp drm

[PATCH v8 00/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
Next version of https://patchwork.freedesktop.org/series/41576/ Only changes are removing duplicate SoBs that git send-email annoyingly added. Sorry about that :( Lyude Paul (10): drm/atomic: Print debug message on atomic check failure drm/i915: Move DP modeset retry work into intel_dp drm

[PATCH v8 02/10] drm/i915: Move DP modeset retry work into intel_dp

2018-04-11 Thread Lyude Paul
dealing with an MST device, along with being able to easily trace the intel_dp struct back to it's respective connector (if there is any). So, move the modeset_retry_work function out of the intel_connector struct and into intel_dp. Signed-off-by: Lyude Paul <ly...@redhat.com> Reviewed-by:

[PATCH v8 02/10] drm/i915: Move DP modeset retry work into intel_dp

2018-04-11 Thread Lyude Paul
dealing with an MST device, along with being able to easily trace the intel_dp struct back to it's respective connector (if there is any). So, move the modeset_retry_work function out of the intel_connector struct and into intel_dp. Signed-off-by: Lyude Paul Reviewed-by: Manasi Navare Cc: Manasi

[PATCH v8 07/10] drm/i915: Only use one link bw config for MST topologies

2018-04-11 Thread Lyude Paul
to change when the entire topology has been disconnected. V4: - Track link rate/lane count in the atomic topology state instead of in intel_dp. V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä

[PATCH v8 07/10] drm/i915: Only use one link bw config for MST topologies

2018-04-11 Thread Lyude Paul
to change when the entire topology has been disconnected. V4: - Track link rate/lane count in the atomic topology state instead of in intel_dp. V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul Cc: Manasi Navare Cc: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dp_mst.c | 79

[PATCH v8 05/10] drm/dp_mst: Make drm_dp_mst_topology_state subclassable

2018-04-11 Thread Lyude Paul
. Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++- .../amd/display/amdgpu_dm/amdgpu_dm_m

[PATCH v8 04/10] drm/dp_mst: Remove all evil duplicate state pointers

2018-04-11 Thread Lyude Paul
>state. This confused me for over 4 hours until I realized there was no magic behind these pointers. So, let's save everyone else from the trouble. Signed-off-by: Lyude Paul <ly...@redhat.com>. Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.int

[PATCH v8 05/10] drm/dp_mst: Make drm_dp_mst_topology_state subclassable

2018-04-11 Thread Lyude Paul
. Signed-off-by: Lyude Paul Cc: Manasi Navare Cc: Ville Syrjälä V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c| 46 --- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h| 4 +- drivers/gpu

[PATCH v8 04/10] drm/dp_mst: Remove all evil duplicate state pointers

2018-04-11 Thread Lyude Paul
>state. This confused me for over 4 hours until I realized there was no magic behind these pointers. So, let's save everyone else from the trouble. Signed-off-by: Lyude Paul . Cc: Manasi Navare Cc: Ville Syrjälä --- include/drm/drm_dp_mst_helper.h | 6 -- 1 file changed, 6 deletions(-) d

[PATCH v8 08/10] drm/i915: Make intel_dp_mst_atomic_check() idempotent

2018-04-11 Thread Lyude Paul
will never have compute_config() ran on them, move vcpi freeing out of the atomic check and into compute_config(). Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Lyude Paul <ly...@redhat.com> V7: - Fix CHECKPATCH errors --

[PATCH v8 03/10] drm/dp_mst: Fix naming on drm_atomic_get_mst_topology_state()

2018-04-11 Thread Lyude Paul
in drm_atomic.c/drm_atomic_helper.c. Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++-- include/drm/d

[PATCH v8 08/10] drm/i915: Make intel_dp_mst_atomic_check() idempotent

2018-04-11 Thread Lyude Paul
will never have compute_config() ran on them, move vcpi freeing out of the atomic check and into compute_config(). Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Lyude Paul V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/i915/intel_dp_mst.c | 84 +++-- 1 file

[PATCH v8 03/10] drm/dp_mst: Fix naming on drm_atomic_get_mst_topology_state()

2018-04-11 Thread Lyude Paul
in drm_atomic.c/drm_atomic_helper.c. Signed-off-by: Lyude Paul Cc: Manasi Navare Cc: Ville Syrjälä V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++-- include/drm/drm_dp_mst_helper.h | 6 -- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git

[PATCH v8 10/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
retraining work into hotplug_work - Grab the correct power wells when retraining. - Loop through MST encoders in intel_dp_get_crtc_mask(), quicker/easier than connectors V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com&g

[PATCH v8 10/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
retraining work into hotplug_work - Grab the correct power wells when retraining. - Loop through MST encoders in intel_dp_get_crtc_mask(), quicker/easier than connectors V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul Cc: Manasi Navare Cc: Ville Syrjälä --- drivers/gpu/drm/i915

[PATCH v8 06/10] drm/dp_mst: Add reset_state callback to topology mgr

2018-04-11 Thread Lyude Paul
in i915 from the topology's atomic state. Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Lyude Paul <ly...@redhat.com> V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/drm_dp_mst_topology.c | 10 ++ include/drm/d

[PATCH v8 09/10] drm/dp_mst: Add MST fallback retraining helpers

2018-04-11 Thread Lyude Paul
docs on the retraining procedure. V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> --- drivers/gpu/drm/drm_dp_mst_topology.c | 440 +

[PATCH v8 06/10] drm/dp_mst: Add reset_state callback to topology mgr

2018-04-11 Thread Lyude Paul
in i915 from the topology's atomic state. Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Lyude Paul V7: - Fix CHECKPATCH errors --- drivers/gpu/drm/drm_dp_mst_topology.c | 10 ++ include/drm/drm_dp_mst_helper.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git

[PATCH v8 09/10] drm/dp_mst: Add MST fallback retraining helpers

2018-04-11 Thread Lyude Paul
docs on the retraining procedure. V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul Cc: Manasi Navare Cc: Ville Syrjälä --- drivers/gpu/drm/drm_dp_mst_topology.c | 440 +- include/drm/drm_dp_mst_helper.h | 20 ++ 2 files changed, 455 insertions(+), 5

[PATCH v8 01/10] drm/atomic: Print debug message on atomic check failure

2018-04-11 Thread Lyude Paul
Does what it says on the label, it's a little confusing debugging atomic check failures otherwise. Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Lyude Paul <ly...@redhat.com> --- drivers/gpu/drm/drm_atomic.c

[PATCH v8 01/10] drm/atomic: Print debug message on atomic check failure

2018-04-11 Thread Lyude Paul
Does what it says on the label, it's a little confusing debugging atomic check failures otherwise. Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_atomic.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v7 02/10] drm/i915: Move DP modeset retry work into intel_dp

2018-04-11 Thread Lyude Paul
dealing with an MST device, along with being able to easily trace the intel_dp struct back to it's respective connector (if there is any). So, move the modeset_retry_work function out of the intel_connector struct and into intel_dp. Signed-off-by: Lyude Paul <ly...@redhat.com> Reviewed-by:

[PATCH v7 01/10] drm/atomic: Print debug message on atomic check failure

2018-04-11 Thread Lyude Paul
Does what it says on the label, it's a little confusing debugging atomic check failures otherwise. Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Lyude Paul <ly...@redhat.com> --- drivers/gpu/drm/drm_atomic.c

[PATCH v7 02/10] drm/i915: Move DP modeset retry work into intel_dp

2018-04-11 Thread Lyude Paul
dealing with an MST device, along with being able to easily trace the intel_dp struct back to it's respective connector (if there is any). So, move the modeset_retry_work function out of the intel_connector struct and into intel_dp. Signed-off-by: Lyude Paul Reviewed-by: Manasi Navare Cc: Manasi

[PATCH v7 01/10] drm/atomic: Print debug message on atomic check failure

2018-04-11 Thread Lyude Paul
Does what it says on the label, it's a little confusing debugging atomic check failures otherwise. Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_atomic.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v7 00/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
Next version of https://patchwork.freedesktop.org/series/41576/ All changes in this patch series are just to make checkpatch a little happier, no functional changes. Lyude Paul (10): drm/atomic: Print debug message on atomic check failure drm/i915: Move DP modeset retry work into intel_dp

[PATCH v7 00/10] drm/i915: Implement proper fallback training for MST

2018-04-11 Thread Lyude Paul
Next version of https://patchwork.freedesktop.org/series/41576/ All changes in this patch series are just to make checkpatch a little happier, no functional changes. Lyude Paul (10): drm/atomic: Print debug message on atomic check failure drm/i915: Move DP modeset retry work into intel_dp

[PATCH v7 07/10] drm/i915: Only use one link bw config for MST topologies

2018-04-11 Thread Lyude Paul
to change when the entire topology has been disconnected. V4: - Track link rate/lane count in the atomic topology state instead of in intel_dp. V7: - Fix CHECKPATCH errors Signed-off-by: Lyude Paul <ly...@redhat.com> Cc: Manasi Navare <manasi.d.nav...@intel.com> Cc: Ville Syrjälä

<    1   2   3   4   5   6   7   8   9   10   >