[PATCH] drm/nouveau: Enable i2c pads & busses during preinit

2019-06-26 Thread Lyude Paul
us any issues before! So, fix this by initializing our i2c pad and busses during subdev pre-init. We skip initializing aux busses during pre-init, as those are guaranteed to only ever be used by nouveau for DP aux transactions. Signed-off-by: Lyude Paul Tested-by: Marc Meledandri Fixes: 34240

[PATCH] drm/amdgpu: Don't skip display settings in hwmgr_resume()

2019-06-20 Thread Lyude Paul
ems to fix it. Hopefully if there is a better fix for this, this patch will spark discussion around it. Fixes: 921935dc6404 ("drm/amd/powerplay: enforce display related settings only on needed") Cc: Evan Quan Cc: Alex Deucher Cc: Huang Rui Cc: Rex Zhu Cc: Likun Gao Cc: # v5.1+ Signe

Re: [RESEND PATCH v2 1/2] drm/dp/mst: Reprobe EDID for MST ports on resume

2019-06-14 Thread Lyude Paul
rror: implicit > declaration of function ‘drm_dp_put_port’; did you mean ‘drm_dp_get_port’? > [-Werror=implicit-function-declaration] > > v4.19.50: Build OK! > v4.14.125: Build OK! > v4.9.181: Build OK! > v4.4.181: Build OK! > > How s

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-06 Thread Lyude Paul
On Thu, 2019-06-06 at 19:41 +, Li, Sun peng (Leo) wrote: > > On 2019-06-03 3:28 p.m., Lyude Paul wrote: > > > I'm reproducing this just by reloading i915 on a machine with some MST > > > displays connected. I uploaded a copy of the script that I use to

Re: [PATCH] drm/nouveau/bios: downgrade absence of tmds table to info from an error

2019-06-04 Thread Lyude Paul
Reviewed-by: Lyude Paul On Sun, 2019-06-02 at 22:07 +1000, Rhys Kidd wrote: > Absence of a TMDS Info Table is common on Optimus setups where the NVIDIA > gpu is not connected directly to any outputs. > > Reporting an error in this scenario is too harsh. Accordingly, change the >

Re: [PATCH 0/2] drm/nouveau/bios/init: Improve pre-PMU devinit opcode coverage

2019-06-04 Thread Lyude Paul
For the whole series: Reviewed-by: Lyude Paul Tested on a GK104 and GK110 (same ones as my vbios traces in our vbios repo) On Mon, 2019-06-03 at 00:13 +1000, Rhys Kidd wrote: > NVIDIA GPUs include a common scripting language (devinit) that can be > interpreted by a number of "en

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-03 Thread Lyude Paul
On Mon, 2019-06-03 at 15:25 -0400, Lyude Paul wrote: > On Thu, 2019-05-30 at 18:20 +, Li, Sun peng (Leo) wrote: > > Hey, sorry for my late response! > > > > On 2019-05-16 5:40 p.m., Lyude Paul wrote: > > > > > >if (old_pdt != port->pdt &am

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-03 Thread Lyude Paul
On Thu, 2019-05-30 at 18:20 +, Li, Sun peng (Leo) wrote: > Hey, sorry for my late response! > > On 2019-05-16 5:40 p.m., Lyude Paul wrote: > > > >if (old_pdt != port->pdt && !port->input) { > > > @@ -1220,6 +1268,8 @@ static void dr

Re: [PATCH] drm/mst: Fix MST sideband up-reply failure handling

2019-05-23 Thread Lyude Paul
On Fri, 2019-05-24 at 01:28 +0300, Imre Deak wrote: > On Thu, May 23, 2019 at 06:09:56PM -0400, Lyude Paul wrote: > > Patch mostly looks good to me, one comment below > > > > On Fri, 2019-05-24 at 00:24 +0300, Imre Deak wrote: > > > Fix the breakage resulting in t

Re: [PATCH] drm/mst: Fix MST sideband up-reply failure handling

2019-05-23 Thread Lyude Paul
005018] intel_dp_hpd_pulse+0x205/0x370 [i915] > [ +0,004836] i915_digport_work_func+0xbb/0x140 [i915] > [ +0,005108] process_one_work+0x245/0x610 > [ +0,004027] worker_thread+0x37/0x380 > [ +0,003684] ? process_one_work+0x610/0x610 > [ +0,004184] kthread+0x119/0

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-05-16 Thread Lyude Paul
ereas 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. > > Cc: Lyude Paul > Signed-off-by: Ville Syrjälä > Signed-off-by: Leo Li >

Re: [PATCH 7/7] drm/nouveau: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
Reviewed-by: Lyude Paul On Thu, 2019-05-16 at 11:18 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > Set the connector's kernel device as the parent for the aux kernel > device. This allows udev rules to access connector attributes when > creating symlinks to aux device

Re: [PATCH 3/7] drm/dp-mst: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
connector gives udev the > ability to access the connector device's attributes. This will come in > handy when writing udev rules to create more descriptive symlinks to the > MST aux devices. > > Cc: Ville Syrjälä > Cc: Lyude Paul > Signed-off-by: Leo Li > --- > drive

Re: [PATCH 3/7] drm/dp-mst: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
iptive symlinks to the > MST aux devices. > > Cc: Ville Syrjälä > Cc: Lyude Paul > Signed-off-by: Leo Li > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c > b/drivers/gpu/dr

Re: [PATCH 0/7] Add DP MST AUX devices

2019-05-16 Thread Lyude Paul
Whoops-one more thing I forgot to mention. This is just personal preference for me, but if you're ccing me on any of the patches in the series feel free to just do it for all of them. Makes my inbox a little less confusing to look at On Thu, 2019-05-16 at 15:54 -0400, Lyude Paul wrote: >

Re: [PATCH 0/7] Add DP MST AUX devices

2019-05-16 Thread Lyude Paul
st_topology.c | 106 > ++--- > drivers/gpu/drm/drm_sysfs.c| 23 + > drivers/gpu/drm/nouveau/nouveau_connector.c| 2 +- > include/drm/drm_dp_helper.h| 4 + > include/drm/drm_dp_mst_helper.h

Re: [PATCH v7 09/11] drm: uevent for connector status change

2019-05-13 Thread Lyude Paul
e *dev) > > { > > kfree(dev); > > diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h > > index 4f311e836cdc..d454ef617b2c 100644 > > --- a/include/drm/drm_sysfs.h > > +++ b/include/drm/drm_sysfs.h > > @@ -4,10 +4,13 @@ > > > > struct drm_device; > > struct device; > > +struct drm_connector; > > +struct drm_property; > > > > int drm_class_device_register(struct device *dev); > > void drm_class_device_unregister(struct device *dev); > > > > void drm_sysfs_hotplug_event(struct drm_device *dev); > > - > > +void drm_sysfs_connector_status_event(struct drm_connector *connector, > > + struct drm_property *property); > > #endif -- Cheers, Lyude Paul ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-04-24 Thread Lyude Paul
On Wed, 2019-04-24 at 17:36 -0500, Bjorn Helgaas wrote: > On Wed, Apr 24, 2019 at 03:16:37PM -0400, Lyude Paul wrote: > > On Wed, 2019-04-24 at 13:59 -0500, Bjorn Helgaas wrote: > > > Not being a scheduled work expert, I was unsure if this experiment was > > > eq

Re: [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path()

2019-04-24 Thread Lyude Paul
On Wed, 2019-04-24 at 23:52 +0300, Ville Syrjälä wrote: > On Wed, Apr 24, 2019 at 08:40:30PM +, Li, Sun peng (Leo) wrote: > > > > > > On 2019-04-24 1:26 p.m., Lyude Paul wrote: > > > Closer, but are we sure we want to use the MST prop path for this? Why > &g

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-04-24 Thread Lyude Paul
ng a system reboot, is that correct? > > > Do we want to have this discussion on the bz btw, or is this email > > thread fine? > > Email is fine. -- Cheers, Lyude Paul ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-04-24 Thread Lyude Paul
Any update on this? This has been waiting for a while now On Thu, 2019-04-04 at 09:17 -0500, Bjorn Helgaas wrote: > [+cc Hans, author of 0b2fe6594fa2 ("drm/nouveau: Queue hpd_work on (runtime) > resume")] -- Cheers, Lyude Paul _

Re: [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path()

2019-04-24 Thread Lyude Paul
topology_mgr *mgr, > int pbn); > > +void drm_dp_build_mst_prop_path(const struct drm_dp_mst_branch *mstb, > +int pnum, > + char *proppath, > +size_t proppath_

Re: [PATCH 1/3] drm/dp: Use non-cyclic idr

2019-04-24 Thread Lyude Paul
lgtm Reviewed-by: Lyude Paul On Mon, 2019-04-22 at 19:56 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > In preparation for adding aux devices for DP MST, make the IDR > non-cyclic. That way, hotplug cycling MST devices won't needlessly > increment the minor version index.

Re: [PATCH 1/2] drm/dp_aux: Use non-cyclic idr, add suffix option for aux device

2019-04-22 Thread Lyude Paul
On Wed, 2019-04-17 at 23:10 +, Li, Sun peng (Leo) wrote: > > > On 2019-04-16 6:16 p.m., Lyude Paul wrote: > > Sorry for the slow response, I've been really busy ;_; > > No worries :) > > > On Fri, 2019-04-12 at 12:05 -0400, sunpeng...@amd

Re: [PATCH 2/2] drm/dp_mst: Register aux-dev nodes for MST ports

2019-04-16 Thread Lyude Paul
265,10 @@ struct drm_dp_aux { >* @cec: struct containing fields used for CEC-Tunneling-over-AUX. >*/ > struct drm_dp_aux_cec cec; > + /** > + * @is_remote: Is this "AUX CH" actually using sideband messaging. > + */ > + bool is_remote; > }; > > ssize_t drm_dp_dpcd_read(struct drm_

Re: [PATCH 1/2] drm/dp_aux: Use non-cyclic idr, add suffix option for aux device

2019-04-16 Thread Lyude Paul
t; index e2266ac..13f1005 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -1143,7 +1143,7 @@ int drm_dp_aux_register(struct drm_dp_aux *aux) > strlcpy(aux->ddc.name, aux->name ? aux->name : dev_name(aux->dev), > sizeof(au

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-04-15 Thread Lyude Paul
Helgaas wrote: > > > On Wed, Mar 13, 2019 at 06:25:02PM -0400, Lyude Paul wrote: > > > > On Fri, 2019-02-15 at 16:17 -0500, Lyude Paul wrote: > > > > > On Thu, 2019-02-14 at 18:43 -0600, Bjorn Helgaas wrote: > > > > > > On Tue, Feb 12, 2019 at 05:02

Re: [PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()

2019-04-11 Thread Lyude Paul
On Thu, 2019-04-11 at 08:48 +1000, Ben Skeggs wrote: > On Wed, 10 Apr 2019 at 06:23, Lyude Paul wrote: > > For a while, we've had the problem of i2c bus access not grabbing > > a runtime PM ref when it's being used in userspace by i2c-dev, resulting > > in nouveau sp

[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()

2019-04-09 Thread Lyude Paul
t seem, mostly due to the fact that we have to use the i2c bus during runtime resume of the GPU, we instead opt for the easiest solution: don't let userspace access i2c busses on the GPU at all while it's in runtime suspend. Changes since v1: * Also disable i2c busses that run over DP AUX Signed-off-by:

[PATCH] drm/nouveau/i2c: Disable i2c bus access after ->fini()

2019-04-03 Thread Lyude Paul
t seem, mostly due to the fact that we have to use the i2c bus during runtime resume of the GPU, we instead opt for the easiest solution: don't let userspace access i2c busses on the GPU at all while it's in runtime suspend. Signed-off-by: Lyude Paul Cc: sta...@vger.kernel.org --- .../gpu/drm/nouveau/i

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-04-03 Thread Lyude Paul
Hi, any update on this/do you guys need any more information here? Would very much like to get this upstream On Fri, 2019-03-22 at 06:30 -0500, Bjorn Helgaas wrote: > On Thu, Mar 21, 2019 at 05:48:19PM -0500, Bjorn Helgaas wrote: > > On Wed, Mar 13, 2019 at 06:25:02PM -0400, Lyude P

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-03-22 Thread Lyude Paul
Note: I did read your response lower down in the thread, but I wanted to make sure I addressed one of the comments here (see below) On Thu, 2019-03-21 at 17:48 -0500, Bjorn Helgaas wrote: > [+cc Rafael] > > On Wed, Mar 13, 2019 at 06:25:02PM -0400, Lyude Paul wrote: > > On Fri, 2

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-03-19 Thread Lyude Paul
Bump, sorry to bug you but is there any update on this or any information you still need from me which would help get this upstream? On Wed, 2019-03-13 at 18:25 -0400, Lyude Paul wrote: > [note to David Ober: you -should- be able to reply to this, hopefully, but I > haven't actually

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-03-13 Thread Lyude Paul
-0500, Lyude Paul wrote: > On Thu, 2019-02-14 at 18:43 -0600, Bjorn Helgaas wrote: > > Hi Lyude, > > > > On Tue, Feb 12, 2019 at 05:02:30PM -0500, Lyude Paul wrote: > > > On a very specific subset of ThinkPad P50 SKUs, particularly ones that > > >

Re: [PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-02-16 Thread Lyude Paul via dri-devel
On Thu, 2019-02-14 at 18:43 -0600, Bjorn Helgaas wrote: > Hi Lyude, > > On Tue, Feb 12, 2019 at 05:02:30PM -0500, Lyude Paul wrote: > > On a very specific subset of ThinkPad P50 SKUs, particularly ones that > > come with a Quadro M1000M chip instead of the M2000M varian

[PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50

2019-02-12 Thread Lyude Paul via dri-devel
during a previous boot. Once we've confirmed all of this, we reset the PCI device and re-disable it - bringing the GPU back into a healthy state. Signed-off-by: Lyude Paul Cc: nouv...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: Karol Herbst Cc: Ben Skeggs Cc: sta...@vger.kerne

[PATCH] drm/dp_mst: Remove rebase-detritus in VCPI helper kernel-docs

2019-02-06 Thread Lyude Paul
aving removed the state->duplicated checks from each function. This also introduced an error while building the docs with sphinx: ./drivers/gpu/drm/drm_dp_mst_topology.c:3100: WARNING: Inline literal start-string without end-string. So, fix that by just removing the kerneldoc comments. Signed-of

[PATCH v3 4/4] drm/nouveau: Move PBN and VCPI allocation into nv50_head_atom

2019-02-01 Thread Lyude Paul
're at it as well. With this, removing a topology in suspend while using nouveau no longer causes the new atomic VCPI helpers to complain. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Cc: Daniel Vetter --- drivers/gpu/drm/nouveau/dispnv5

[PATCH v3 2/4] drm/dp_mst: Remove port validation in drm_dp_atomic_find_vcpi_slots()

2019-02-01 Thread Lyude Paul
displays on unregistered connectors in update_connector_routing() in drm_atomic_check_modeset(). All it does is cause us to have to make weird special exceptions in our atomic modesetting code. So, get rid of it entirely. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tra

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

2019-02-01 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. This time around, we use a slightly different but much less complicated approach for fixing said issues. Cc: Daniel Vetter Lyude Paul (4): drm

[PATCH v3 3/4] drm/atomic: Add drm_atomic_state->duplicated

2019-02-01 Thread Lyude Paul
accident. These don't need to be here, that was the supposed to be the purpose of the last revision Changes since v2: * Remove the changes in this patch to the VCPI helpers, they aren't needed anymore Changes since v1: * Rename suspend_or_resume to duplicated Signed-off-by: Lyude Paul Fixes: ecea

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

2019-02-01 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. Changes since v1: * Doc changes - danvet Signed-off-by: Lyude

Re: [PATCH v2 3/4] drm/atomic: Add drm_atomic_state->duplicated

2019-02-01 Thread Lyude Paul
Important! below On Fri, 2019-02-01 at 18:57 +0100, Daniel Vetter wrote: > On Thu, Jan 31, 2019 at 08:14:50PM -0500, Lyude Paul wrote: > > Since > > > > commit 39b50c603878 ("drm/atomic_helper: Stop modesets on unregistered > > connectors harder") >

[PATCH v2 4/4] drm/nouveau: Move PBN and VCPI allocation into nv50_head_atom

2019-01-31 Thread Lyude Paul
're at it as well. With this, removing a topology in suspend while using nouveau no longer causes the new atomic VCPI helpers to complain. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Cc: Daniel Vetter --- drivers/gpu/drm/nouveau/dispnv5

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

2019-01-31 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. This time around, we use a slightly different but much less complicated approach for fixing said issues. Cc: Daniel Vetter Lyude Paul (4): drm

[PATCH v2 3/4] drm/atomic: Add drm_atomic_state->duplicated

2019-01-31 Thread Lyude Paul
ded anymore Changes since v1: * Rename suspend_or_resume to duplicated Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Cc: Daniel Vetter --- drivers/gpu/drm/drm_atomic_helper.c | 10 +- drivers

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

2019-01-31 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. Changes since v1: * Doc changes - danvet Signed-off-by: Lyude

[PATCH v2 2/4] drm/dp_mst: Remove port validation in drm_dp_atomic_find_vcpi_slots()

2019-01-31 Thread Lyude Paul
displays on unregistered connectors in update_connector_routing() in drm_atomic_check_modeset(). All it does is cause us to have to make weird special exceptions in our atomic modesetting code. So, get rid of it entirely. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tra

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

2019-01-29 Thread Lyude Paul
: * Don't call drm_fb_helper_hotplug_event() under lock, do it after lock (Chris Wilson) * Don't call drm_fb_helper_hotplug_event() in intel_fbdev_output_poll_changed() under lock (Chris Wilson) * Always set ifbdev->hpd_waiting (Chris Wilson) Signed-off-by: Lyude Paul Fixes: 0e32b39ceed6 (&

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

2019-01-29 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 v3 0/3] drm/i915: MST and wakeref leak fixes

2019-01-29 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 v3 3/3] drm/i915: Don't send hotplug in intel_dp_check_mst_status()

2019-01-29 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 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 2/3] drm/atomic: Add drm_atomic_state->suspend_or_resume

2019-01-29 Thread Lyude Paul
fixes the warnings during suspend/resume when a topology is removed from the system, and allows us to once again restore the atomic state on resume without any issues. Signed-off-by: Lyude Paul Fixes: eceae1472467 ("drm/dp_mst: Start tracking per-port VCPI allocations") Cc:

[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 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 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 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] drm/i915: Don't send MST hotplugs until after resume

2019-01-25 Thread Lyude Paul
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 Cc

[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 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 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

[PATCH v7 18/20] drm/dp_mst: Start tracking per-port VCPI allocations

2019-01-10 Thread Lyude Paul
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 Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/

[PATCH v7 17/20] drm/dp_mst: Add some atomic state iterator macros

2019-01-10 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 Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc

[PATCH v7 14/20] drm/nouveau: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
ort could technically be pointing at freed memory. Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/driver

[PATCH v7 12/20] drm/nouveau: Remove bogus cleanup in nv50_mstm_add_connector()

2019-01-10 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 Reviewed-By: Ben S

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

2019-01-10 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

[PATCH v7 11/20] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-10 Thread Lyude Paul
ent that I can see anyway. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH v7 16/20] drm/nouveau: Grab payload lock in nv50_msto_payload()

2019-01-10 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 Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: Da

[PATCH v7 20/20] drm/nouveau: Use atomic VCPI helpers for MST

2019-01-10 Thread Lyude Paul
: * Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the new requirements for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston

[PATCH v7 19/20] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2019-01-10 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 Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH v7 06/20] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2019-01-10 Thread Lyude Paul
Move kdocs for mstb/port structs inline - danvet * Split drm_dp_get_last_connected_port_and_mstb() changes into their own commit - danvet Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../gpu/dp-mst/topology-

[PATCH v7 09/20] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2019-01-10 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 Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Cc

[PATCH v7 13/20] drm/nouveau: Remove unnecessary VCPI checks in nv50_msto_cleanup()

2019-01-10 Thread Lyude Paul
future, use msto->disabled instead to check whether or not we need to deallocate VCPI instead. Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 15

[PATCH v7 10/20] drm/i915: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
vet Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/i915/intel_connector.c | 4 drivers/gpu/drm/i915/intel_dp_mst.c| 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i

[PATCH v7 05/20] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends

2019-01-10 Thread Lyude Paul
, and will make even more sense once we redesign how the current refcounting scheme here works. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 114

[PATCH v7 07/20] drm/dp_mst: Restart last_connected_port_and_mstb() if topology ref fails

2019-01-10 Thread Lyude Paul
allocations in the rest of the DP MST helpers. Changes since v1: * Convert kerneldoc for drm_dp_get_last_connected_port_and_mstb to normal comment - danvet Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers

[PATCH v7 08/20] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2019-01-10 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 Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li

[PATCH v7 02/20] drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()

2019-01-10 Thread Lyude Paul
Split some stuff across multiple lines, remove some unnecessary braces Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 -- 1 file changed, 8 insertions

[PATCH v7 01/20] drm/dp_mst: Fix some formatting in drm_dp_add_port()

2019-01-10 Thread Lyude Paul
Reindent some stuff, and split some stuff across multiple lines so we aren't going over the text width limit. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 18

[PATCH v7 00/20] MST refcounting/atomic helpers cleanup

2019-01-10 Thread Lyude Paul
off for now :). Not available on gitlab, as this is the final version of the series before I push! hooray~ Lyude Paul (20): drm/dp_mst: Fix some formatting in drm_dp_add_port() drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg() drm/dp_mst: Fix some formatting

[PATCH v7 04/20] drm/dp_mst: Fix some formatting in drm_dp_mst_deallocate_vcpi()

2019-01-10 Thread Lyude Paul
Split some stuff across multiple lines Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v7 03/20] drm/dp_mst: Fix some formatting in drm_dp_mst_allocate_vcpi()

2019-01-10 Thread Lyude Paul
Fix some indenting, split some stuff across multiple lines. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v6 14/20] drm/nouveau: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
ort could technically be pointing at freed memory. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/

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

2019-01-10 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

[PATCH v6 20/20] drm/nouveau: Use atomic VCPI helpers for MST

2019-01-10 Thread Lyude Paul
: * Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the new requirements for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm

[PATCH v6 09/20] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2019-01-10 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 Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Cc

[PATCH v6 17/20] drm/dp_mst: Add some atomic state iterator macros

2019-01-10 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 Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc

[PATCH v6 11/20] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-10 Thread Lyude Paul
ent that I can see anyway. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH v6 19/20] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2019-01-10 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 Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH v6 18/20] drm/dp_mst: Start tracking per-port VCPI allocations

2019-01-10 Thread Lyude Paul
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 Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/

[PATCH v6 02/20] drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()

2019-01-10 Thread Lyude Paul
Split some stuff across multiple lines, remove some unnecessary braces Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 -- 1 file changed, 8 insertions

[PATCH v6 06/20] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2019-01-10 Thread Lyude Paul
Move kdocs for mstb/port structs inline - danvet * Split drm_dp_get_last_connected_port_and_mstb() changes into their own commit - danvet Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../gpu/dp-mst/topology-

[PATCH v6 05/20] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends

2019-01-10 Thread Lyude Paul
, and will make even more sense once we redesign how the current refcounting scheme here works. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 114

  1   2   3   4   5   6   7   8   >