[PATCH v3 2/2] drm/i915/mst: filter out the display mode exceed sink's capability

2020-07-10 Thread Lyude Paul
T helpers so we can estimate the full_pbn value as best we can. Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Cc: Cooper Chiou Co-developed-by: Lyude Paul Signed-off-by: Lee Shawn C Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 55 ++--- 1

[PATCH v3 1/2] drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx

2020-07-10 Thread Lyude Paul
n't accidentally assign ret to mode->status on success, or we'll squash legitimate mode validation results * Don't forget to assign MODE_OK to status in drm_connector_mode_valid() if we have no callbacks * Drop leftover hunk in drm_modes.h around enum drm_mode_status Signed-off-by: Lyude Paul Cc: Lee

[PATCH v2 1/2] drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx

2020-07-08 Thread Lyude Paul
irregardless of the display configuration. Changes since v1: * Use new drm logging functions * Make some corrections in the mode_valid_ctx kdoc * Return error codes or 0 from ->mode_valid_ctx() on fail, and store the drm_mode_status in an additional function parameter Signed-off-by: Lyude Paul Cc:

[PATCH v2 2/2] drm/i915/mst: filter out the display mode exceed sink's capability

2020-07-08 Thread Lyude Paul
T helpers so we can estimate the full_pbn value as best we can. Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Cc: Cooper Chiou Co-developed-by: Lyude Paul Signed-off-by: Lee Shawn C Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 55 ++--- 1

Re: [PATCH 1/2] drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx

2020-07-08 Thread Lyude Paul
On Wed, 2020-07-08 at 21:45 +0300, Imre Deak wrote: > On Wed, Jul 08, 2020 at 01:25:14PM -0400, Lyude Paul wrote: > > JFYI - found an issue with this patch that wouldn't have shown up on i915, > > info > > down below: > > > > On Wed, 2020-07-08 at 01:40 +0

Re: [PATCH 1/2] drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx

2020-07-08 Thread Lyude Paul
JFYI - found an issue with this patch that wouldn't have shown up on i915, info down below: On Wed, 2020-07-08 at 01:40 +0300, Imre Deak wrote: > Sorry for the delay, the review as I promised: > > On Tue, May 26, 2020 at 02:23:09PM -0400, Lyude Paul wrote: > > This is just an

Re: [PATCH] input/synaptics: enable InterTouch for ThinkPad X1E 1st gen

2020-07-06 Thread Lyude Paul
this for the second generation X1 extreme): Reviewed-by: Lyude Paul On Fri, 2020-07-03 at 17:34 +0300, K900 wrote: > From: Ilya Katsnelson > > Tested on my own laptop, touchpad feels slightly more responsive with > this on, though it might just be placebo. > > Signed-off-b

[PATCH] drm/nouveau/kms/nvd9-: Fix disabling CRCs alongside OR reprogramming

2020-06-29 Thread Lyude Paul
state, and sets nv50_atom->flush_disable if needed Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/crc.c | 107 drivers/gpu/drm/nouveau/dispnv50/crc.h | 18 ++-- drivers/gpu/drm/nouveau/dispnv50/disp.c | 13 ++- drivers/gpu/drm/nouveau/dispn

[RFC v8 9/9] drm/nouveau/kms/nvd9-: Add CRC support

2020-06-27 Thread Lyude Paul
50_head_flush_clr/set * Rebase Changes since v5: * Remove set but unused variable (outp) in nv50_crc_atomic_check() - Kbuild bot Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 + drivers/gpu/drm/nouveau/dispnv

[RFC v8 8/9] drm/nouveau/kms/nv50-: Move hard-coded object handles into header

2020-06-27 Thread Lyude Paul
(checkpatch) Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c| 7 +-- drivers/gpu/drm/nouveau/dispnv50/handles.h | 15 +++ drivers/gpu/drm/nouveau/dispnv50/wndw.c| 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu

[RFC v8 4/9] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit

2020-06-27 Thread Lyude Paul
as to avoid changing the depth unexpectedly. So, fix this by simply not writing the reduced depth value we come up with to the atomic state. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 11 +++ drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 11 +++ 2 files

[RFC v8 7/9] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h

2020-06-27 Thread Lyude Paul
In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[RFC v8 6/9] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom

2020-06-27 Thread Lyude Paul
med. To fix this, we introduce another bitmask into nv50_head_atom.wndw to keep track of ownership separately from visibility. We then introduce a nv50_head callback to handle populating the wndw ownership map, and call it during the atomic check phase when core->assign_windows is set to true. Si

[RFC v8 3/9] drm/vblank: Add vblank works

2020-06-27 Thread Lyude Paul
org Reviewed-by: Daniel Vetter Co-developed-by: Ville Syrjälä Signed-off-by: Lyude Paul --- Documentation/gpu/drm-kms.rst | 15 ++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_internal.h| 27 +++ drivers/gpu/drm/drm_vblank.c | 44 +++-- drivers/gpu/drm/drm_vblank_

[RFC v8 5/9] drm/nouveau/kms/nv50-: Fix disabling dithering

2020-06-27 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index 8f6455697ba72..ed6819519f6d8 100644 --- a/drivers/gpu

[RFC v8 2/9] drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off()

2020-06-27 Thread Lyude Paul
ust to make things a little less confusing to others in the future, let's switch over to spin_lock_irq()/spin_unlock_irq() to make that fact a little more obvious. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c | 5 ++--- 1 file changed

[RFC v8 1/9] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc

2020-06-27 Thread Lyude Paul
to initialize one of them. Changes since v3: * Use drmm_add_action_or_reset() - Daniel Vetter Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_vblank.c | 23

[RFC v7 11/11] drm/nouveau/kms/nvd9-: Add CRC support

2020-06-24 Thread Lyude Paul
50_head_flush_clr/set * Rebase Changes since v5: * Remove set but unused variable (outp) in nv50_crc_atomic_check() - Kbuild bot Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 + drivers/gpu/drm/nouveau/dispnv

[RFC v7 10/11] drm/nouveau/kms/nv50-: Move hard-coded object handles into header

2020-06-24 Thread Lyude Paul
(checkpatch) Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c| 7 +-- drivers/gpu/drm/nouveau/dispnv50/handles.h | 15 +++ drivers/gpu/drm/nouveau/dispnv50/wndw.c| 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu

[RFC v7 09/11] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h

2020-06-24 Thread Lyude Paul
In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[RFC v7 02/11] drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off()

2020-06-24 Thread Lyude Paul
ust to make things a little less confusing to others in the future, let's switch over to spin_lock_irq()/spin_unlock_irq() to make that fact a little more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c | 5 ++--- 1 file changed, 2 insertions(+)

[RFC v7 05/11] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit

2020-06-24 Thread Lyude Paul
as to avoid changing the depth unexpectedly. So, fix this by simply not writing the reduced depth value we come up with to the atomic state. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 11 +++ drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 11 +++ 2 files

[RFC v7 07/11] drm/nouveau/kms/nv50-: s/harm/armh/g

2020-06-24 Thread Lyude Paul
We refer to the armed hardware assembly as armh elsewhere in nouveau, so fix the naming here to make it consistent. This patch contains no functional changes. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[RFC v7 08/11] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom

2020-06-24 Thread Lyude Paul
med. To fix this, we introduce another bitmask into nv50_head_atom.wndw to keep track of ownership separately from visibility. We then introduce a nv50_head callback to handle populating the wndw ownership map, and call it during the atomic check phase when core->assign_windows is set to true. Si

[RFC v7 06/11] drm/nouveau/kms/nv50-: Fix disabling dithering

2020-06-24 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index e29ea40e7c334..72bc3bce396a7 100644 --- a/drivers/gpu

[RFC v7 03/11] drm/vblank: Add vblank works

2020-06-24 Thread Lyude Paul
: nouv...@lists.freedesktop.org Co-developed-by: Ville Syrjälä Signed-off-by: Lyude Paul --- Documentation/gpu/drm-kms.rst | 15 ++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_vblank.c | 55 +++-- drivers/gpu/drm/drm_vblank_internal.h | 19 ++ drivers/g

[RFC v7 01/11] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc

2020-06-24 Thread Lyude Paul
to initialize one of them. Changes since v3: * Use drmm_add_action_or_reset() - Daniel Vetter Cc: Daniel Vetter Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_vblank.c | 23 ++- 1 file

[RFC v7 04/11] drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()

2020-06-24 Thread Lyude Paul
We'll be rolling back more things in this function, and the way it's structured is a bit confusing. So, let's clean this up a bit and just unroll in the event of failure. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 33 + 1 file changed, 23

[RFC v6] drm/nouveau/kms/nvd9-: Add CRC support

2020-06-23 Thread Lyude Paul
50_head_flush_clr/set * Rebase Changes since v5: * Remove set but unused variable (outp) in nv50_crc_atomic_check() - Kbuild bot Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 + drivers/gpu/drm/nouveau/dispnv

[RFC v5 08/10] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h

2020-06-22 Thread Lyude Paul
In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[RFC v5 09/10] drm/nouveau/kms/nv50-: Move hard-coded object handles into header

2020-06-22 Thread Lyude Paul
(checkpatch) Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c| 7 +-- drivers/gpu/drm/nouveau/dispnv50/handles.h | 15 +++ drivers/gpu/drm/nouveau/dispnv50/wndw.c| 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu

[RFC v5 10/10] drm/nouveau/kms/nvd9-: Add CRC support

2020-06-22 Thread Lyude Paul
50_head_flush_clr/set * Rebase Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 25 +- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 4 + drivers/gpu/drm/nouveau/dispnv50/atom.h | 20 + drivers/gpu/drm/nouveau/dispnv50/core.h | 4 + drivers/gpu/drm/nou

[RFC v5 03/10] drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()

2020-06-22 Thread Lyude Paul
We'll be rolling back more things in this function, and the way it's structured is a bit confusing. So, let's clean this up a bit and just unroll in the event of failure. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 33 + 1 file changed, 23

[RFC v5 07/10] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom

2020-06-22 Thread Lyude Paul
med. To fix this, we introduce another bitmask into nv50_head_atom.wndw to keep track of ownership separately from visibility. We then introduce a nv50_head callback to handle populating the wndw ownership map, and call it during the atomic check phase when core->assign_windows is set to true. Si

[RFC v5 06/10] drm/nouveau/kms/nv50-: s/harm/armh/g

2020-06-22 Thread Lyude Paul
We refer to the armed hardware assembly as armh elsewhere in nouveau, so fix the naming here to make it consistent. This patch contains no functional changes. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[RFC v5 01/10] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc

2020-06-22 Thread Lyude Paul
to initialize one of them. Changes since v3: * Use drmm_add_action_or_reset() - Daniel Vetter Cc: Daniel Vetter Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_vblank.c | 23 ++- 1 file

[RFC v5 02/10] drm/vblank: Add vblank works

2020-06-22 Thread Lyude Paul
: * Use our own spinlocks, don't integrate so tightly with kthread_works Changes since v2: * Use kthread_workers instead of reinventing the wheel. Cc: Daniel Vetter Cc: Tejun Heo Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul

[RFC v5 05/10] drm/nouveau/kms/nv50-: Fix disabling dithering

2020-06-22 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index e29ea40e7c334..72bc3bce396a7 100644 --- a/drivers/gpu

[RFC v5 04/10] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit

2020-06-22 Thread Lyude Paul
as to avoid changing the depth unexpectedly. So, fix this by simply not writing the reduced depth value we come up with to the atomic state. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 11 +++ drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 11 +++ 2 files

Re: [PATCH] drm/noveau: fix reference count leak in nv50_disp_atomic_commit

2020-06-18 Thread Lyude Paul
&& ret != -EACCES) { > + pm_runtime_put_autosuspend(dev->dev); s/noveau/nouveau/ in the commit title, but other than that: Reviewed-by: Lyude Paul > return ret; > + } > > ret = drm_atomic_helper_setup_commit(state, nonblock); > if (ret)

Re: [PATCH] drm/nouveau/dispnv50: fix runtime pm imbalance on error

2020-06-03 Thread Lyude Paul
Hi! Was going through my email and found this from last month, it's a bit late and someone might have reviewed/pushed this already but just in case: Reviewed-by: Lyude Paul On Wed, 2020-05-20 at 18:47 +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter e

[PATCH 0/2] drm/probe_helper, i915: Validate MST modes against PBN limits

2020-05-26 Thread Lyude Paul
validating modes. Lee Shawn C (1): drm/i915/mst: filter out the display mode exceed sink's capability Lyude Paul (1): drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx drivers/gpu/drm/drm_crtc_helper_internal.h | 6 +- drivers/gpu/drm/drm_probe_helper.c | 65

[PATCH 2/2] drm/i915/mst: filter out the display mode exceed sink's capability

2020-05-26 Thread Lyude Paul
n safely grab >base.lock without deadlocking Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Cc: Cooper Chiou Co-developed-by: Lyude Paul Signed-off-by: Lee Shawn C Tested-by: Lee Shawn C Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 39 +

[PATCH 1/2] drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx

2020-05-26 Thread Lyude Paul
irregardless of the display configuration. Signed-off-by: Lyude Paul Cc: Lee Shawn C Tested-by: Lee Shawn C --- drivers/gpu/drm/drm_crtc_helper_internal.h | 6 +- drivers/gpu/drm/drm_probe_helper.c | 65 ++ include/drm/drm_modeset_helper_vtables.h | 41 ++ 3

Re: [PATCH] drm/vblank: Fix -Wformat compile warnings on some arches

2020-05-22 Thread Lyude Paul
On Thu, 2020-05-21 at 23:09 +0200, Sam Ravnborg wrote: > On Thu, May 21, 2020 at 04:46:47PM -0400, Lyude Paul wrote: > > On some architectures like ppc64le and aarch64, compiling with > > -Wformat=1 will throw the following warnings: > > > > In file included from driv

[PATCH] drm/vblank: Fix -Wformat compile warnings on some arches

2020-05-21 Thread Lyude Paul
ypecast. Signed-off-by: Lyude Paul Co-developed-by: Dave Airlie --- drivers/gpu/drm/drm_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index acb3c3f65b579..1a96db2dd16fa 100644 --- a/drivers/gpu/drm/drm_vblank.c +

[PATCH v3 2/5] drm/nouveau/kms/nv50-: Probe SOR and PIOR caps for DP interlacing support

2020-05-11 Thread Lyude Paul
, the get_caps() function for PIORs just sets interlacing support to true. Changes since v1: * Actually probe caps correctly this time, both on EVO and NVDisplay. Changes since v2: * Fix probing for < GF119 * Use vfunc table, in prep for adding more caps in the future. Signed-off-by: Lyude P

[PATCH v3 0/5] drm/nouveau: DP interlace fixes

2020-05-11 Thread Lyude Paul
, let's teach nouveau to reject interlaced modes on hardware that can't actually handle it. Additionally for MST, since we accomplish this by simply reusing more of the SST mode validation we also get (some) basic bw validation for modes we detect on MST connectors completely for free. Lyude Paul (5

[PATCH v3 1/5] drm/nouveau/kms/nv50-: Initialize core channel in nouveau_display_create()

2020-05-11 Thread Lyude Paul
within nouveau_display_create(). Everywhere else, we initialize the core channel during resume. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm

[PATCH v3 3/5] drm/nouveau/kms/gv100-: Add support for interlaced modes

2020-05-11 Thread Lyude Paul
We advertise being able to set interlaced modes, so let's actually make sure to do that. Otherwise, we'll end up hanging the display engine due to trying to set a mode with timings adjusted for interlacing without telling the hardware it's actually an interlaced mode. Signed-off-by: Lyude Paul

[PATCH v3 5/5] drm/nouveau/kms/nv50-: Share DP SST mode_valid() handling with MST

2020-05-11 Thread Lyude Paul
that from both nv50_mstc_mode_valid() and nouveau_connector_mode_valid(). Note that we allow for returning the calculated clock that nv50_dp_mode_valid() came up with, since we'll eventually want to use that for PBN calculation in nv50_mstc_mode_valid(). Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH v3 4/5] drm/nouveau/kms/nv50-: Move 8BPC limit for MST into nv50_mstc_get_modes()

2020-05-11 Thread Lyude Paul
). But, we'll need this in a moment so that we can share mode validation between SST and MST which will fix some real world issues. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers

[RFC v4 12/12] drm/nouveau/kms/nvd9-: Add CRC support

2020-05-08 Thread Lyude Paul
* Don't check return code from debugfs_create_dir() or debugfs_create_file() - Greg K-H Changes since v3: (no functional changes) * Fix SPDX license identifiers (checkpatch) * s/uint32_t/u32/ (checkpatch) * Fix indenting in switch cases (checkpatch) Signed-off-by: Lyude Paul --- drivers/gpu/drm/nou

[RFC v4 04/12] drm/vblank: Add vblank works

2020-05-08 Thread Lyude Paul
the wheel. Cc: Daniel Vetter Cc: Tejun Heo Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_vblank.c | 259 +++ include/drm/drm_vblank.h | 35 + 2 files changed

[RFC v4 02/12] kthread: Add kthread_(un)block_work_queuing() and kthread_work_queuable()

2020-05-08 Thread Lyude Paul
: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- include/linux/kthread.h | 19 + kernel/kthread.c| 46 + 2 files changed, 65 insertions(+) diff --git a/include/linux

[RFC v4 11/12] drm/nouveau/kms/nv50-: Move hard-coded object handles into header

2020-05-08 Thread Lyude Paul
(checkpatch) Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c| 7 +-- drivers/gpu/drm/nouveau/dispnv50/handles.h | 15 +++ drivers/gpu/drm/nouveau/dispnv50/wndw.c| 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu

[RFC v4 10/12] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h

2020-05-08 Thread Lyude Paul
In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul --- drivers/gpu/drm

[RFC v4 07/12] drm/nouveau/kms/nv50-: Fix disabling dithering

2020-05-08 Thread Lyude Paul
-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index e29ea40e7c33..72bc3bce396a 100644 --- a/drivers/gpu/drm

[RFC v4 09/12] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom

2020-05-08 Thread Lyude Paul
med. To fix this, we introduce another bitmask into nv50_head_atom.wndw to keep track of ownership separately from visibility. We then introduce a nv50_head callback to handle populating the wndw ownership map, and call it during the atomic check phase when core->assign_windows is set to true. Si

[RFC v4 00/12] drm/nouveau: Introduce CRC support for gf119+

2020-05-08 Thread Lyude Paul
looks a lot more acceptable then what I was previously trying. * Apply some changes requested by danvet Major changes since v2: * Use kthread_worker instead of kthreadd for vblank workers * Don't check debugfs return values Lyude Paul (12): kthread: Add kthread_queue_flush_work() kthread: Add

[RFC v4 08/12] drm/nouveau/kms/nv50-: s/harm/armh/g

2020-05-08 Thread Lyude Paul
We refer to the armed hardware assembly as armh elsewhere in nouveau, so fix the naming here to make it consistent. This patch contains no functional changes. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[RFC v4 03/12] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc

2020-05-08 Thread Lyude Paul
to initialize one of them. Changes since v3: * Use drmm_add_action_or_reset() - Daniel Vetter Cc: Daniel Vetter Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_vblank.c | 23 ++- 1 file

[RFC v4 01/12] kthread: Add kthread_queue_flush_work()

2020-05-08 Thread Lyude Paul
). Cc: Daniel Vetter Cc: Tejun Heo Cc: Ville Syrjälä Cc: dri-de...@lists.freedesktop.org Cc: nouv...@lists.freedesktop.org Signed-off-by: Lyude Paul --- include/linux/kthread.h | 16 kernel/kthread.c| 87 ++--- 2 files changed, 71 insertions

[RFC v4 05/12] drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()

2020-05-08 Thread Lyude Paul
We'll be rolling back more things in this function, and the way it's structured is a bit confusing. So, let's clean this up a bit and just unroll in the event of failure. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 33 + 1 file changed, 23

[RFC v4 06/12] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit

2020-05-08 Thread Lyude Paul
as to avoid changing the depth unexpectedly. So, fix this by simply not writing the reduced depth value we come up with to the atomic state. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 11 +++ drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 11 +++ 2 files

Re: [PATCH 1/9] drm/vblank: Add vblank works

2020-05-07 Thread Lyude Paul
Mar 17, 2020 at 08:40:58PM -0400, Lyude Paul wrote: > > From: Ville Syrjälä > > > > Add some kind of vblank workers. The interface is similar to regular > > delayed works, and also allows for re-scheduling. > > > > Whatever hardware programming we do in t

Re: [RFC] kasan: include the hashed pointer for an object's location

2019-10-22 Thread Lyude Paul
On Tue, 2019-10-22 at 04:27 +0200, Dmitry Vyukov wrote: > On Tue, Oct 22, 2019 at 4:19 AM Lyude Paul wrote: > > The vast majority of the kernel that needs to print out pointers as a > > way to keep track of a specific object in the kernel for debugging > > purposes does so

[RFC] kasan: include the hashed pointer for an object's location

2019-10-21 Thread Lyude Paul
eful usage of %px. Signed-off-by: Lyude Paul Cc: Sean Paul Cc: Daniel Vetter Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-...@googlegroups.com --- mm/kasan/report.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/kasan/report.c b/mm/kasa

[PATCH 2/6] drm/amdgpu/dm/mst: Remove unnecessary NULL check

2019-09-26 Thread Lyude Paul
kfree() checks this automatically. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display

[PATCH 1/6] drm/amdgpu/dm/mst: Don't create MST topology managers for eDP ports

2019-09-26 Thread Lyude Paul
Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 5ec14efd4d8c

[PATCH v4] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-09-25 Thread Lyude Paul
Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Acked-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b

[PATCH 2/3] drm/encoder: Fix possible_crtcs documentation

2019-09-13 Thread Lyude Paul
Similar to possible_clones, we don't actually use possible_crtcs until the driver is registered with userspace. So, fix the documentation to indicate this. Signed-off-by: Lyude Paul --- include/drm/drm_encoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm

[PATCH] igb/igc: Don't warn on fatal read failures when the device is removed

2019-08-22 Thread Lyude Paul
/0x24c ? process_scheduled_works+0x2c/0x2c kthread+0xe9/0xee ? kthread_destroy_worker+0x41/0x41 ret_from_fork+0x35/0x40 ---[ end trace 252bf10352c63d22 ]--- Signed-off-by: Lyude Paul Fixes: 47e16692b26b ("igb/igc: warn when fatal read failure happens") Cc: Feng Tang Cc:

[RFC] drm: Bump encoder limit from 32 to 64

2019-08-15 Thread Lyude Paul
is allows us to avoid breaking UAPI, while still being able to bump up the encoder limit. This also fixes driver probing for nouveau on the ThinkPad P71. Signed-off-by: Lyude Paul Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_encoder.c | 10 --

[PATCH 1/2] drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off

2019-08-07 Thread Lyude Paul
e_disp_power_ref. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index f22f01020625..08ad8e3b9cd2 100644 -

[PATCH 0/2] drm/nouveau: CRTC Runtime PM ref tracking fixes

2019-08-07 Thread Lyude Paul
Just some runtime PM fixes for some much less noticeable runtime PM ref tracking issues that I got reminded of when fixing some unrelated issues with nouveau. Lyude Paul (2): drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off drm/nouveau/dispnv50: Fix runtime PM ref tracking

[PATCH 14/26] drm/dp_mst: Cleanup drm_dp_send_link_address() a bit

2019-07-17 Thread Lyude Paul
ble declarations a bit. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 42 +++ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH 15/26] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-07-17 Thread Lyude Paul
nction: drm_dp_port_set_pdt(). This function also handles actually ensuring that we grab the correct locks when we need to modify port->mstb. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topolog

[PATCH v2] Input: i8042 - disable KBD port on Razer Blade Stealth V2 (2017 model)

2019-04-07 Thread Lyude Paul
on to off causes the entire system to hang. So, introduce a quirk table for disabling keyboard probing by default, i8042_dmi_nokbd_table, and add this specific model of Razer laptop to that table. Changes since v1: - Correct model (should be V2, 2017) Signed-off-by: Lyude Paul Cc: sta

Re: [PATCH] Input: i8042 - disable KBD port on Late-2016 Razer Blade Stealth

2019-04-07 Thread Lyude Paul
On Sun, 2019-04-07 at 15:10 -0700, Dmitry Torokhov wrote: > Hi Lyude, > > On Sun, Apr 07, 2019 at 05:37:34PM -0400, Lyude Paul wrote: > > The late 2016 model of the Razer Blade Stealth has a built-in USB > > keyboard, but for some reason the BIOS exposes an i8042 controller

[PATCH] Input: i8042 - disable KBD port on Late-2016 Razer Blade Stealth

2019-04-07 Thread Lyude Paul
on to off causes the entire system to hang. So, introduce a quirk table for disabling keyboard probing by default, i8042_dmi_nokbd_table, and add this specific model of Razer laptop to that table. Signed-off-by: Lyude Paul Cc: sta...@vger.kernel.org --- drivers/input/serio/i8042-x86ia64io.h | 19

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

2019-02-15 Thread Lyude Paul
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
ed 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-de...@lists.freedesktop.org Cc: Karol Herbst Cc: Ben Skeggs Cc: sta...@vger.ke

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

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