Re: [PATCH v2 1/2] drm/nouveau/disp: add backlight for ada lovelace

2024-04-15 Thread Lyude Paul
_backlight_init(bl, > nouveau_connector(connector), >     nv_encoder, , ); >   break; > + case NV_DEVICE_INFO_V0_ADA: > + ret = nv19x_backlight_init(bl, > nouveau_connector(connector), > +    nv_encoder, , > ); > + break; >   default: >   ret = 0; >   goto fail_alloc; -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

Re: [PATCH 4/5] drm/nouveau: Use drm_crtc_vblank_crtc()

2024-04-08 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2024-04-08 at 22:06 +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Replace the open coded drm_crtc_vblank_crtc() with the real > thing. > > Cc: Karol Herbst > Cc: Lyude Paul > Cc: Danilo Krummrich > Cc: nouv...@lists.f

Re: [PATCH] drm: nv04: Add check to avoid out of bounds access

2024-04-05 Thread Lyude Paul
gt; > 'dcb->or' is assigned value '0' in call to > > 'fabricate_dcb_output()'). > > I don't really know much about the semantics of this code. > > Looking at fabricate_dcb_output() though I wonder if the intention > was to assign > BIT(or) to entry->or. > >

Re: [PATCH v0 13/14] drm/nouveau: Make I2C terminology more inclusive

2024-04-05 Thread Lyude Paul
I'm in support of this as well! As long as we make sure it gets renamed everywhere :) > > Thanks, > Easwar > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

[PATCH 2/2] drm/nouveau/dp: Don't probe eDP ports twice harder

2024-04-04 Thread Lyude Paul
to ACPI hotplug probe events. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_dp.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 8b1be7dd64ebe..8b27d372e86da 100644

[PATCH 1/2] drm/nouveau/kms/nv50-: Disable AUX bus for disconnected DP ports

2024-04-04 Thread Lyude Paul
is actually on the connector. Otherwise, we just shut it off. This should fix some people's runtime PM issues (like myself), and also get rid of quite of a lot of GSP error spam in dmesg. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_dp.c | 10 ++ 1 file changed, 10 insertions

[PATCH 0/2] nouveau: GSP DP aux fixes

2024-04-04 Thread Lyude Paul
Slimbook Executive 16! Lyude Paul (2): drm/nouveau/kms/nv50-: Disable AUX bus for disconnected DP ports drm/nouveau/dp: Don't probe eDP ports twice harder drivers/gpu/drm/nouveau/nouveau_dp.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) -- 2.44.0

[PATCH 4/4] WIP: rust/drm/kms: Add ShadowPlaneState

2024-03-22 Thread Lyude Paul
Signed-off-by: Lyude Paul --- drivers/gpu/drm/rvkms/plane.rs | 7 +++- rust/bindings/bindings_helper.h | 2 + rust/kernel/drm/kms.rs | 1 + rust/kernel/drm/kms/gem_atomic_helper.rs | 48 4 files changed, 56 insertions(+), 2

[PATCH 3/4] rust/drm/kms: Extract PlaneState into IntoPlaneState

2024-03-22 Thread Lyude Paul
will implement. This is basically the same idea as the GEM ops - but for plane states. Signed-off-by: Lyude Paul --- drivers/gpu/drm/rvkms/plane.rs | 2 +- rust/kernel/drm/kms/plane.rs | 165 - 2 files changed, 103 insertions(+), 64 deletions(-) diff --git

[PATCH 2/4] WIP: drm: Introduce rvkms

2024-03-22 Thread Lyude Paul
into rvkms introduction Signed-off-by: Lyude Paul --- drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/rvkms/Kconfig | 3 + drivers/gpu/drm/rvkms/Makefile | 1 + drivers/gpu/drm/rvkms/connector.rs | 55 +++ drivers/gpu/drm

[PATCH 1/4] WIP: rust: Add basic KMS bindings

2024-03-22 Thread Lyude Paul
Signed-off-by: Lyude Paul --- rust/bindings/bindings_helper.h | 4 + rust/helpers.c | 17 ++ rust/kernel/drm/device.rs| 2 + rust/kernel/drm/drv.rs | 115 +++-- rust/kernel/drm/kms.rs | 146 +++ rust/kernel/drm/kms/connector.rs

[RFC WIP 0/4] Rust bindings for KMS + RVKMS

2024-03-22 Thread Lyude Paul
acks to expose these. * I'm sure there's bits of code that need cleaning up, but I figured it was more important to start getting feedback on all of this first :). Lyude Paul (4): WIP: rust: Add basic KMS bindings WIP: drm: Introduce rvkms rust/drm/kms: Extract PlaneState into IntoPlan

[PATCH] drm/nouveau/dp: Fix incorrect return code in r535_dp_aux_xfer()

2024-03-15 Thread Lyude Paul
that. Fixes: 4ae3a20102b2 ("nouveau/gsp: don't free ctrl messages on errors") Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c b/drivers/gpu/d

Re: [PATCH 2/2] drm/nouveau: move more missing UAPI bits

2024-03-04 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2024-03-04 at 19:31 +0100, Karol Herbst wrote: > Those are already de-facto UAPI, so let's just move it into the uapi > header. > > Signed-off-by: Karol Herbst > --- > drivers/gpu/drm/nouveau/nouveau_abi16.c | 20 +++- > dr

Re: [PATCH 1/2] drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf

2024-03-04 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2024-03-04 at 19:31 +0100, Karol Herbst wrote: > If VM_BIND is enabled on the client the legacy submission ioctl can't be > used, however if a client tries to do so regardless it will return an > error. In this case the clients mutex remained unlocke

Future of nouveau/nova's display driver, and rvkms introduction!

2024-02-06 Thread Lyude Paul
orking on writing up KMS bindings. If anyone has any questions or comments feel free to reply :)! -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

[PATCH] drm/nouveau/kms/nv50-: Don't allow inheritance of headless iors

2023-12-13 Thread Lyude Paul
ted through nvif. This -should- hopefully fix the WARN_ON on GT218 reported by Borislav. Signed-off-by: Lyude Paul Cc: Borislav Petkov --- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/d

Re: nouveau 0000:01:00.0: drm_WARN_ON(!found_head)

2023-12-13 Thread Lyude Paul
Nevermind - I don't think I'll need the logs, I stared at the code for long enough and I think I realized what's happening. I will have a patch for you to test in just a moment, just waiting for it to compile so I can verify nothing else breaks On Wed, 2023-12-13 at 18:48 -0500, Lyude Paul wrote

Re: nouveau 0000:01:00.0: drm_WARN_ON(!found_head)

2023-12-13 Thread Lyude Paul
for the time being, but I'd really love to know how we're managing to get that far on a hardware generation we never implemented that nvkm ioctl for… On Wed, 2023-12-13 at 18:37 -0500, Lyude Paul wrote: > agh - thank you for repeatedly poking on this, I've been busy enough with GSP > work I totally

Re: nouveau 0000:01:00.0: drm_WARN_ON(!found_head)

2023-12-13 Thread Lyude Paul
this or shut > > up the WARN. > > Not only that - panic_on_warn turns this into an explosion so you don't > want that in a released kernel. > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

Re: [PATCH -next] drm/nouveau/fifo: Remove duplicated include in chan.c

2023-11-22 Thread Lyude Paul
Reviewed-by: Lyude Paul Will push upstream in a moment On Wed, 2023-11-22 at 08:49 +0800, Yang Li wrote: > ./drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c: chid.h is included more > than once. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_

Re: [PATCH v5 09/30] drm/dp: Add helpers to calculate the link BW overhead

2023-11-07 Thread Lyude Paul
Reviewed-by: Lyude Paul On Tue, 2023-11-07 at 02:14 +0200, Imre Deak wrote: > Add helpers drivers can use to calculate the BW allocation overhead - > due to SSC, FEC, DSC and data alignment on symbol cycles - and the > channel coding efficiency - due to the 8b/10b, 128b/132b encoding.

Re: [PATCH v4 09/30] drm/dp: Add helpers to calculate the link BW overhead

2023-11-07 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2023-10-30 at 17:58 +0200, Imre Deak wrote: > Add helpers drivers can use to calculate the BW allocation overhead - > due to SSC, FEC, DSC and data alignment on symbol cycles - and the > channel coding efficiency - due to the 8b/10b, 128b/132b encoding.

Re: [PATCH v4 08/30] drm/dp_mst: Add HBLANK expansion quirk for Synaptics MST hubs

2023-11-07 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2023-10-30 at 17:58 +0200, Imre Deak wrote: > Add a quirk for Synaptics MST hubs, which require a workaround - at leat > on i915 - for some modes, on which the hub applies HBLANK expansion. > These modes will only work by enabling DSC decompression

Re: [PATCH v4 07/30] drm/dp: Add DP_HBLANK_EXPANSION_CAPABLE and DSC_PASSTHROUGH_EN DPCD flags

2023-11-07 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2023-10-30 at 17:58 +0200, Imre Deak wrote: > Add the DPCD flag to enable DSC passthrough in a last branch device, > used in a follow-up i915 patch. > > Also add a flag to detect HBLANK expansion support in a branch device, > used by a workaround

Re: [PATCH v4 06/30] drm/dp_mst: Allow DSC in any Synaptics last branch device

2023-11-07 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2023-10-30 at 17:58 +0200, Imre Deak wrote: > The Synaptics MST branch devices support DSC decompression on all their > output ports, provided that they are last branch devices (with their > output ports connected to the sinks). The Thinkpad 40B0

Re: [PATCH] drm/nouveau/disp: fix DP capable DSM connectors

2023-10-12 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2023-10-11 at 13:41 +0200, Karol Herbst wrote: > Just special case DP DSM connectors until we properly figure out how to > deal with this. > > This resolves user regressions on GPUs with such connectors without > reverting the original fix. >

Re: [PATCH] drm/nouveau: exec: fix ioctl kernel-doc warning

2023-10-09 Thread Lyude Paul
Reviewed-by: Lyude Paul On Fri, 2023-10-06 at 17:55 -0700, Randy Dunlap wrote: > include/uapi/drm/nouveau_drm.h:49: warning: Cannot understand * > @NOUVEAU_GETPARAM_EXEC_PUSH_MAX > on line 49 - I thought it was a doc line > > Fixes: d59e75eef52d ("drm/nouveau: exec: repo

Re: [PATCH] drm/i2c/ch7006: fix a possible null pointer dereference

2023-10-09 Thread Lyude Paul
, and as well: this breaks things because you don't add back the drm_mode_probed_add() call. > + if (!mode) > + continue; > > n++; > } -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

Re: [PATCH v2] drm/nouveau: exec: fix ioctl kernel-doc warning

2023-10-09 Thread Lyude Paul
Reviewed-by: Lyude Paul On Sun, 2023-10-08 at 07:02 -0700, Randy Dunlap wrote: > kernel-doc emits a warning: > > include/uapi/drm/nouveau_drm.h:49: warning: Cannot understand * > @NOUVEAU_GETPARAM_EXEC_PUSH_MAX > on line 49 - I thought it was a doc line > > We don't h

Re: [PATCH] drm/atomic-helper: relax unregistered connector check

2023-10-05 Thread Lyude Paul
This seems like a very good solution to the problem :) Reviewed-by: Lyude Paul On Thu, 2023-10-05 at 13:16 +, Simon Ser wrote: > The driver might pull connectors which weren't submitted by > user-space into the atomic state. For instance, > intel_dp_mst_atomic_master_trans_chec

Re: [PATCH v2 1/3] drm/nouveau: chan: use struct nvif_mclass

2023-10-02 Thread Lyude Paul
For the whole series: Reviewed-by: Lyude Paul On Mon, 2023-10-02 at 15:46 +0200, Danilo Krummrich wrote: > Use actual struct nvif_mclass instead of identical anonymous struct. > > Signed-off-by: Danilo Krummrich > --- > drivers/gpu/drm/nouveau/nouveau_chan.c | 5 + >

Re: [PATCH] drm/nouveau: fence: fix type cast warning in nouveau_fence_emit()

2023-09-29 Thread Lyude Paul
Reviewed-by: Lyude Paul On Sat, 2023-09-16 at 03:14 +0200, Danilo Krummrich wrote: > Fix the following warning. > > drivers/gpu/drm/nouveau/nouveau_fence.c:210:45: sparse: sparse: > incorrect type in initializer (different address spaces) > @@ expected struct nouvea

Re: [RFT PATCH v2 04/12] drm/nouveau: Call drm_atomic_helper_shutdown() or equiv at shutdown time

2023-09-22 Thread Lyude Paul
actually very glad to see this because I think I've seen one bug in the wild as a result of things not getting shut down :) Reviewed-by: Lyude Paul Tested-by: Lyude Paul On Thu, 2023-09-21 at 12:26 -0700, Douglas Anderson wrote: > Based on grepping through the source code this driver appe

Re: [PATCH] drm/mst: check connector state before dereference

2023-09-22 Thread Lyude Paul
gt; return 0; > > /* If the CRTC isn't disabled by this state, don't release it's payload > */ > new_conn_state = drm_atomic_get_new_connector_state(state, > port->connector); > - if (new_conn_state->crtc) { > + WARN_ON(!new_conn_state); &

Re: [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect

2023-09-22 Thread Lyude Paul
…ugh, thanks for catching that :| yes you're completely right - NAK on this patch then On Fri, 2023-09-22 at 22:22 +0300, Imre Deak wrote: > On Fri, Sep 22, 2023 at 03:02:23PM -0400, Lyude Paul wrote: > > > > Oh! wow thank you for catching this: > > > > Reviewed

Re: [PATCH v1] drm/dp/mst: fix missing modeset unlock for MST port detect

2023-09-22 Thread Lyude Paul
Oh! wow thank you for catching this: Reviewed-by: Lyude Paul I will go and push this to drm-misc-next in just a moment On Fri, 2023-09-15 at 10:24 +0530, Ramya SR wrote: > Modeset mutex unlock is missing in drm_dp_mst_detect_port function. > This will lead to deadlock if calling the fu

Re: [PATCH 5/9] drm/nouveau/pm: Annotate struct nvkm_perfdom with __counted_by

2023-09-22 Thread Lyude Paul
Reviewed-by: Lyude Paul Thanks! On Fri, 2023-09-22 at 10:32 -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time che

[PATCH v3 44/44] drm/nouveau/kms/nv50-: disable dcb parsing

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - nvkm should provide all this info now - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_bios.c| 8 +--- drivers/gpu/drm/nouveau/nouveau_display.c | 8

[PATCH v3 43/44] drm/nouveau/kms/nv50-: create outputs based on nvkm info

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 97 ++- drivers/gpu/drm/nouveau/dispnv50/disp.h | 2 - drivers/gpu/drm

[PATCH v3 41/44] drm/nouveau/kms/nv50-: name aux channels after their connector

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - removes use of VBIOS data for naming - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 25 - 1 file changed, 9 insertions

[PATCH v3 39/44] drm/nouveau/kms/nv50-: create heads based on nvkm head mask

2023-09-19 Thread Lyude Paul
From: Ben Skeggs No need to go poking HW directly, and probably shouldn't on GSP-RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 18 +++--- 1 file changed, 3 insertions

[PATCH v3 38/44] drm/nouveau/disp/nv50-: skip DCB_OUTPUT_TV

2023-09-19 Thread Lyude Paul
From: Ben Skeggs We've never supported it. Signed-off-by: Ben Skeggs Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c

[PATCH v3 40/44] drm/nouveau/kms/nv50-: create heads after outps/conns

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - output info will be used later to determine MST support Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 64 - 1 file changed, 32 insertions(+), 32

[PATCH v3 37/44] drm/nouveau/disp: move outp init/fini paths to chipset code

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - pre-nv5x doesn't use any of this - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- .../gpu/drm/nouveau/nvkm/engine/disp/base.c | 31 +++ .../gpu/drm/nouveau/nvkm/engine

[PATCH v3 36/44] drm/nouveau/disp: move outp/conn construction to chipset code

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - pre-nv5x doesn't use any of this, has its own version DRM-side - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- .../gpu/drm/nouveau/nvkm/engine/disp/base.c | 117

[PATCH v3 35/44] drm/nouveau/disp: add dp mst id get/put methods

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 32 --- drivers/gpu/drm/nouveau/dispnv50/head.h | 1 + drivers/gpu/drm

[PATCH v3 34/44] drm/nouveau/disp: add dp sst config method

2023-09-19 Thread Lyude Paul
-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 12 +++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau/nvif/outp.c | 18 .../gpu/drm/nouveau/nvkm/engine/disp

[PATCH v3 29/44] drm/nouveau/kms/nv50-: split DP disable+enable into two modesets

2023-09-19 Thread Lyude Paul
From: Ben Skeggs Link training can finally be moved out of the supervisor sequence, but first we need to split DP modesets into separate disable and enable sequences to be able to perform link training between them instead. - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude

[PATCH v3 33/44] drm/nouveau/disp: move link training out of supervisor

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 11 ++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau

[PATCH v3 32/44] drm/nouveau/disp: add dp train method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - passes DPCD information from DRM to NVKM - removes NVKM's own sink caps handling - link still trained from supervisor, more patches to come Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau

[PATCH v3 31/44] drm/nouveau/kms/nv50-: fixup sink D3 before tearing down link

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - fixes bug preventing this on SST - implement for MST Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 13 +++-- drivers/gpu/drm/nouveau/nouveau_dp.c | 15

[PATCH v3 30/44] drm/nouveau/kms/nv50-: flush mst disables together

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - fixes some issues tearing down modes on tiled displays Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 11 +-- drivers/gpu/drm/nouveau/dispnv50/disp.h | 1 - 2

[PATCH v3 28/44] drm/nouveau/disp: add dp rates method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - moves building of link rates table from NVKM to DRM - preparing to move link training out of supervisor Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 13

[PATCH v3 27/44] drm/nouveau/disp: add dp aux xfer method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 32 +-- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 12 +++ drivers

[PATCH v3 26/44] drm/nouveau/disp: move dp aux pwr method to HAL

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c| 9 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 4 drivers/gpu/drm

[PATCH v3 25/44] drm/nouveau/disp: add hdmi audio hal function

2023-09-19 Thread Lyude Paul
From: Ben Skeggs This just adds a hook for RM to use, HW paths remain untouched, but should probably be cleaned up to use this too at some point. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine

[PATCH v3 24/44] drm/nouveau/disp: add output lvds config method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - was previously part of acquire() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0012.h| 16

[PATCH v3 23/44] drm/nouveau/disp: add output backlight control methods

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 17 drivers/gpu/drm/nouveau/include/nvif/outp.h | 3 + drivers/gpu/drm/nouveau

[PATCH v3 14/44] drm/nouveau/disp: update SOR routing immediately on acquire()

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - was previously delayed until second supervisor interrupt Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c

[PATCH v3 22/44] drm/nouveau/disp: remove SOR routing updates from supervisor

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - these shouldn't be necessary now, and are done in acquire()/release() - preparation for GSP-RM, where we don't control the supervisor Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm

[PATCH v3 21/44] drm/nouveau/disp: release outputs post-modeset

2023-09-19 Thread Lyude Paul
-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c| 18 -- .../gpu/drm/nouveau/nvkm/engine/disp/outp.c| 1 + .../gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 2 ++ 3 files changed, 11 insertions(+), 10

[PATCH v3 18/44] drm/nouveau/kms/nv50-: move audio enable post-modeset

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - adds tracking for post-UPDATE modeset operations, similar to mst[mo]'s - audio won't work on RM without this - we should probably have been doing this anyway Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul

[PATCH v3 20/44] drm/nouveau/disp: move hdmi disable out of release()

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - release() is being moved post-modeset, preserve hdmi behaviour for now Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 drivers/gpu/drm/nouveau

[PATCH v3 19/44] drm/nouveau/disp: add output hdmi config method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - was previously part of acquire() - preparation for GSP-RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 10 ++--- drivers/gpu/drm/nouveau/include/nvif/if0012.h

[PATCH v3 17/44] drm/nouveau/kms/nv50-: keep output state around until modeset complete

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - we'll want this info post-UPDATE for later patches Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[PATCH v3 15/44] drm/nouveau/kms/nv50-: pull some common init out of OR-specific code

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - cleanup before additional changes Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 69 --- drivers/gpu/drm/nouveau/nouveau_encoder.h | 2 + 2 files

[PATCH v3 16/44] drm/nouveau/kms/nv50-: remove nv_encoder.audio.connector

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - use nv_encoder.conn instead, outp->conn never changes Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +--- drivers/gpu/drm/nouveau/nouveau_encoder.h | 1 - 2 fi

[PATCH v3 13/44] drm/nouveau/disp: add acquire_sor/pior()

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparing to move protocol-specific args out of acquire() again - avoid re-acquiring acquired output, will matter when enforced later - sor/pior done at same time due to shared tmds/dp handling Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich

[PATCH v3 12/44] drm/nouveau/disp: add acquire_dac()

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparing to move protocol-specific args out of acquire() again - avoid re-acquiring acquired output, will matter when enforced later - this one is basically just a rename Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude

[PATCH v3 11/44] drm/nouveau/disp: shuffle to make upcoming diffs prettier

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparing to move protocol-specific args out of acquire() again - no code changes Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvif/outp.c | 106 +- .../gpu

[PATCH v3 09/44] drm/nouveau/disp: rename internal output acquire/release functions

2023-09-19 Thread Lyude Paul
From: Ben Skeggs These will be made static later in the patch series, after the code that uses them has been cleaned up in preparation for GSP-RM support. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm

[PATCH v3 10/44] drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state

2023-09-19 Thread Lyude Paul
mostly work without this commit, this commit should fix some edge case bugs that can occur on initial driver load. This also paves the way for some of the initial groundwork for fastboot support. Signed-off-by: Lyude Paul Signed-off-by: Ben Skeggs Acked-by: Danilo Krummrich --- drivers/gpu/drm

[PATCH v3 07/44] drm/nouveau/disp: add output detect method

2023-09-19 Thread Lyude Paul
From: Ben Skeggs This will check the relevant hotplug pin and skip the DDC probe we currently do if a display is present. - preparation for GSP-RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include

[PATCH v3 08/44] drm/nouveau/disp: add output method to fetch edid

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - needed to support TMDS EDID on RM Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 10 +++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm

[PATCH v3 02/44] drm/nouveau/imem: support allocations not preserved across suspend

2023-09-19 Thread Lyude Paul
From: Ben Skeggs Will initially be used to tag some large grctx allocations which don't need to be saved, to speedup suspend/resume. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- .../drm/nouveau/include/nvkm/core/memory.h| 1

[PATCH v3 04/44] drm/nouveau/mmu/gp100-: always invalidate TLBs at CACHE_LEVEL_ALL

2023-09-19 Thread Lyude Paul
From: Ben Skeggs Fixes some issues when running on top of RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c | 2 +- 2

[PATCH v3 06/44] drm/nouveau/disp: rearrange output methods

2023-09-19 Thread Lyude Paul
From: Ben Skeggs - preparation for a bunch of API changes, to make diffs prettier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 19 +++ .../gpu/drm/nouveau/nvkm

[PATCH v3 05/44] drm/nouveau/kms/nv50-: fix mst payload alloc fail crashing evo

2023-09-19 Thread Lyude Paul
From: Ben Skeggs Programming -1 (vc_start_slot, if alloc fails) into HW probably isn't the best idea. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 10 +++--- 1 file changed, 7

[PATCH v3 03/44] drm/nouveau/gr/gf100-: lose contents of global ctxbufs across suspend

2023-09-19 Thread Lyude Paul
From: Ben Skeggs Some of these buffers are quite large, and there's no need to preserve them across suspend. Mark the contents as lost to speedup suspend/resume. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm

[PATCH v3 00/44] drm/nouveau: initial support for GSP-RM 535.54.04 (and Ada GPUs)

2023-09-19 Thread Lyude Paul
drm/nouveau/kms/nv50-: create heads after outps/conns drm/nouveau/kms/nv50-: name aux channels after their connector drm/nouveau/kms/nv50-: create connectors based on nvkm info drm/nouveau/kms/nv50-: create outputs based on nvkm info drm/nouveau/kms/nv50-: disable dcb parsing Lyude Paul (1

[PATCH v3 01/44] drm/nouveau/devinit/tu102-: remove attempt at loading PreOS

2023-09-19 Thread Lyude Paul
From: Ben Skeggs >From Turing, HW will already have handled this and locked-down the falcon before we get control. So this *should* be a no-op. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/sub

Re: [PATCH] nouveau/u_memcpya: fix NULL vs error pointer bug

2023-09-18 Thread Lyude Paul
Reviewed-by: Lyude Paul I assume you need me to push this to drm-misc? On Fri, 2023-09-15 at 15:59 +0300, Dan Carpenter wrote: > The u_memcpya() function is supposed to return error pointers on > error. Returning NULL will lead to an Oops. > > Fixes: 68132cc6d1bc ("nouve

Re: [PATCH] drm/nouveau: sched: fix leaking memory of timedout job

2023-09-18 Thread Lyude Paul
t; if (job->ops->timeout) > - return job->ops->timeout(job); > + stat = job->ops->timeout(job); > + else > + NV_PRINTK(warn, job->cli, "Generic job timeout.\n"); > + > + drm_sched_start(sched, true); > > - return DRM_GPU_SCHED_STAT_ENODEV; > + return stat; > } > > static void -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

Re: [PATCH 1/4] drm/dp_mst: Fix NULL dereference during payload addition

2023-09-15 Thread Lyude Paul
Thanks for catching all of this! for the whole series: Reviewed-by: Lyude Paul On Thu, 2023-09-14 at 01:32 +0300, Imre Deak wrote: > Fix the NULL dereference leading to the following stack trace: > > [ 129.687181] i915 :00:02.0: [drm:drm_dp_add_payload_part1 > [drm_display_h

Re: [PATCH] drm/nouveau/nvif: refactor deprecated strncpy

2023-09-15 Thread Lyude Paul
Reviewed-by: Lyude Paul Will push this and your other patches in just a moment On Thu, 2023-09-14 at 21:30 +, Justin Stitt wrote: > `strncpy` is deprecated and as such we should prefer more robust and > less ambiguous string interfaces. > > A suitable replacement is `strs

Re: [PATCH] drm/nouveau/pm: refactor deprecated strncpy

2023-09-15 Thread Lyude Paul
...oops, responded to the wrong email :P Reviewed-by: Lyude Paul On Thu, 2023-09-14 at 22:17 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. >

Re: [PATCH] drm/nouveau/core: refactor deprecated strncpy

2023-09-15 Thread Lyude Paul
Eek, I didn't realize how many instances of this we had. Thanks for doing this :) Reviewed-by: Lyude Paul On Thu, 2023-09-14 at 21:40 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less

Re: [PATCH] drm/nouveau/pm: refactor deprecated strncpy

2023-09-15 Thread Lyude Paul
Nice catch! Reviewed-by: Lyude Paul Will push in just a moment On Thu, 2023-09-14 at 21:59 -0700, Kees Cook wrote: > On Thu, Sep 14, 2023 at 10:17:08PM +, Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > >

Re: [Patch v2 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-31 Thread Lyude Paul
On Thu, 2023-08-24 at 04:12 +, Lin, Wayne wrote: > [Public] > > Hi Lyude, > > I'm afraid that I don't have the permissions to push and would like to have > your help. Thanks! Whoops, sorry I only just noticed this message. I set a reminder on my phone to bug me to push it

Re: [PATCH v4 0/6] drm/i915/dp_link_training: Define a final failure state when link training fails

2023-08-30 Thread Lyude Paul
Other then the name typo (s/Pual/Paul): Signed-off-by: Lyude Paul (just since I co-authored things~) Reviewed-by: Lyude Paul I think we definitely want to make sure we get intel's opinions on this though, especially regarding the usage of link-status. I think we're close enough to link

Re: [PATCH v4 3/6] drm/dp_mst: Add drm_dp_set_mst_topology_link_status()

2023-08-30 Thread Lyude Paul
T topology and update their link status in order > to retrain MST links properly, we add the > drm_dp_set_mst_topology_link_status() helper. This helper simply marks > the link status of all connectors living in that topology as bad. We > will make use of this helper in i915 later in

Re: [PATCH v2 09/22] drm/dp_mst: Fix fractional bpp scaling in drm_dp_calc_pbn_mode()

2023-08-30 Thread Lyude Paul
Amazing! This work looks awesome Imre, sorry it took me a little bit to get back to this :). For all of the DP MST helper patches: Reviewed-by: Lyude Paul On Thu, 2023-08-24 at 11:05 +0300, Imre Deak wrote: > For fractional bpp values passed to the function in a .4 fixed point >

Re: [Patch v2 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-23 Thread Lyude Paul
Sure - you're also welcome to push the first two patches after fixing the indentation if you'd like On Wed, 2023-08-23 at 03:19 +, Lin, Wayne wrote: > [Public] > > Thanks, Lyude! > Should I push another version to fix the indention? > > > -Original Message-

Re: [Patch v2 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-17 Thread Lyude Paul
e payload to remote end */ > + ret = drm_dp_create_payload_to_remote(mgr, payload); > + if (ret < 0) > drm_err(mgr->dev, "Step 2 of creating MST payload for %p > failed: %d\n", > payload->port, ret); > - } > + else &

Re: [PATCH 3/3] drm/mst: adjust the function drm_dp_remove_payload_part2()

2023-08-17 Thread Lyude Paul
pos != new_payload && pos->vc_start_slot > new_payload- > > > > vc_start_slot) > > > > - pos->vc_start_slot -= old_payload->time_slots; > > > > + if (pos != payload && pos->vc_start_slot > payload- > > > > vc_start_slot) > > > > + pos->vc_start_slot -= time_slots_to_remove; > > > > } > > > > - new_payload->vc_start_slot = -1; > > > > + payload->vc_start_slot = -1; > > > > > > > > mgr->payload_count--; > > > > - mgr->next_start_slot -= old_payload->time_slots; > > > > + mgr->next_start_slot -= time_slots_to_remove; > > > > > > > > - if (new_payload->delete) > > > > - drm_dp_mst_put_port_malloc(new_payload->port); > > > > + if (payload->delete) > > > > + drm_dp_mst_put_port_malloc(payload->port); > > > > > > > > - new_payload->payload_allocation_status = > > > DRM_DP_MST_PAYLOAD_ALLOCATION_NONE; > > > > + payload->payload_allocation_status = > > > > +DRM_DP_MST_PAYLOAD_ALLOCATION_NONE; > > > > } > > > > -- > > Regards, > > Wayne > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2023-08-14 at 16:49 +0200, Karol Herbst wrote: > We can't simply free the connector after calling drm_connector_init on it. > We need to clean up the drm side first. > > It might not fix all regressions from 2b5d1c29f6c4 ("drm/nouveau/disp: &g

Re: [PATCH] drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes

2023-08-07 Thread Lyude Paul
Ugh, thanks for catching this! Reviewed-by: Lyude Paul On Sat, 2023-08-05 at 12:18 +0200, Karol Herbst wrote: > The original commit adding that check tried to protect the kenrel against > a potential invalid NULL pointer access. > > However we call nouveau_connector_detect_depth

Re: [Patch v2 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-07 Thread Lyude Paul
t_topology_ref_history { > }; > #endif /* IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS) */ > > +enum drm_dp_mst_payload_allocation { > + DRM_DP_MST_PAYLOAD_ALLOCATION_NONE, > + DRM_DP_MST_PAYLOAD_ALLOCATION_LOCAL, > + DRM_DP_MST_PAYLOAD_ALLOCATION_DFP, > + DRM_DP_MST_PAYLOAD_ALLOCATION_REMOTE, > +}; > + > struct drm_dp_mst_branch; > > /** > @@ -537,7 +544,7 @@ struct drm_dp_mst_atomic_payload { >* drm_dp_mst_atomic_wait_for_dependencies() has been called, which > will ensure the >* previous MST states payload start slots have been copied over to > the new state. Note >* that a new start slot won't be assigned/removed from this payload > until > - * drm_dp_add_payload_part1()/drm_dp_remove_payload() have been > called. > + * drm_dp_add_payload_part1()/drm_dp_remove_payload_part2() have been > called. >* * Acquire the MST modesetting lock, and then wait for any pending > MST-related commits to >* get committed to hardware by calling drm_crtc_commit_wait() on > each of the >* _crtc_commit structs in _dp_mst_topology_state.commit_deps. > @@ -564,6 +571,9 @@ struct drm_dp_mst_atomic_payload { > /** @dsc_enabled: Whether or not this payload has DSC enabled */ > bool dsc_enabled : 1; > > + /** @payload_allocation_status: The allocation status of this payload */ > + enum drm_dp_mst_payload_allocation payload_allocation_status; > + > /** @next: The list node for this payload */ > struct list_head next; > }; > @@ -842,10 +852,13 @@ int drm_dp_add_payload_part1(struct > drm_dp_mst_topology_mgr *mgr, > int drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr, >struct drm_atomic_state *state, >struct drm_dp_mst_atomic_payload *payload); > -void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr, > -struct drm_dp_mst_topology_state *mst_state, > -const struct drm_dp_mst_atomic_payload *old_payload, > -struct drm_dp_mst_atomic_payload *new_payload); > +void drm_dp_remove_payload_part1(struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_mst_topology_state *mst_state, > + struct drm_dp_mst_atomic_payload *payload); > +void drm_dp_remove_payload_part2(struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_mst_topology_state *mst_state, > + const struct drm_dp_mst_atomic_payload > *old_payload, > + struct drm_dp_mst_atomic_payload *new_payload); > > int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr); > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat

[PATCH v2] drm/nouveau/nvkm/dp: Add workaround to fix DP 1.3+ DPCD issues

2023-07-28 Thread Lyude Paul
://gitlab.freedesktop.org/drm/nouveau/-/issues/211 Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst --- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 48 ++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c b/drivers/gpu

  1   2   3   4   5   6   7   8   9   10   >