Re: [PATCH][next] drm/nouveau/gsp: remove extraneous ; after mutex

2024-10-03 Thread Danilo Krummrich
On 9/17/24 2:08 PM, Colin Ian King wrote: The mutex field has two following semicolons, replace this with just one semicolon. Signed-off-by: Colin Ian King Applied to drm-misc-fixes, thanks! --- drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning

2024-10-03 Thread Danilo Krummrich
On 10/3/24 8:44 PM, Gustavo A. R. Silva wrote: On 03/10/24 12:36, Danilo Krummrich wrote: On 9/13/24 12:23 PM, Danilo Krummrich wrote: Hi, On 9/13/24 10:09 AM, Gustavo A. R. Silva wrote: Hi all, Friendly ping: who can take this, please? 🙂 Usually, that's me. But I thought you

Re: [PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning

2024-10-03 Thread Danilo Krummrich
On 9/13/24 12:23 PM, Danilo Krummrich wrote: Hi, On 9/13/24 10:09 AM, Gustavo A. R. Silva wrote: Hi all, Friendly ping: who can take this, please? 🙂 Usually, that's me. But I thought you might want to send a v2 based on Kees' comments? Do you plan to follow up on this? I'

Re: [PATCH] drm/nouveau/i2c: rename aux.c and aux.h to auxch.c and auxch.h

2024-10-03 Thread Danilo Krummrich
On 6/3/24 11:15 AM, egyszer...@freemail.hu wrote: From: Benjamin Szőke The goal is to clean-up Linux repository from AUX file names, because the use of such file names is prohibited on other operating systems such as Windows, so the Linux repository cannot be cloned and edited on them. Signed-

Re: [PATCH v4 1/2] drm/sched: Use drm sched lockdep map for submit_wq

2024-10-02 Thread Danilo Krummrich
On Wed, Oct 02, 2024 at 03:00:08PM +, Matthew Brost wrote: > On Wed, Oct 02, 2024 at 04:16:00PM +0200, Danilo Krummrich wrote: > > On Wed, Oct 02, 2024 at 06:16:38AM -0700, Matthew Brost wrote: > > > Avoid leaking a lockdep map on each drm sched creation and destruction >

Re: [PATCH v4 1/2] drm/sched: Use drm sched lockdep map for submit_wq

2024-10-02 Thread Danilo Krummrich
c: Luben Tuikov > Cc: Christian König > Signed-off-by: Matthew Brost Good catch, Acked-by: Danilo Krummrich > --- > drivers/gpu/drm/scheduler/sched_main.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/scheduler/sched_main.c

Re: [PATCH] drm/gpuvm: merge adjacent gpuva range during a map operation

2024-09-23 Thread Danilo Krummrich
(adding dri-devel) On Mon, Sep 23, 2024 at 02:24:02PM +, Zeng, Oak wrote: > > > This patch is an old one in my back log. I roughly remember I ran into > > a situation where there were two duplicated VMAs covering > > > Same virtual address range are kept in gpuvm's RB-tree. One VMA > > was act

Re: [PATCH v2] drm/sched: Fix dynamic job-flow control race

2024-09-23 Thread Danilo Krummrich
On Fri, Sep 13, 2024 at 01:23:01PM -0700, Rob Clark wrote: > From: Rob Clark > > Fixes a race condition reported here: > https://github.com/AsahiLinux/linux/issues/309#issuecomment-2238968609 > > The whole premise of lockless access to a single-producer-single- > consumer queue is that there is

Re: [PATCH] MAINTAINERS: drm/sched: Add new maintainers

2024-09-23 Thread Danilo Krummrich
t; > > > Signed-off-by: Philipp Stanner > > Cc: Christian König > > Cc: Luben Tuikov > > Cc: Matthew Brost > > Cc: Danilo Krummrich > > Cc: Tvrtko Ursulin > > > > Acked-by: Matthew Brost Applied to drm-misc-fixes. > > > ---

Re: [PATCH] MAINTAINERS: drm/sched: Add new maintainers

2024-09-16 Thread Danilo Krummrich
n Tuikov > Cc: Matthew Brost > Cc: Danilo Krummrich > Cc: Tvrtko Ursulin Acked-by: Danilo Krummrich > > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 10430778c998..fc2d8bf3ee74 100644 > --- a/M

Re: [PATCH] drm/sched: Fix dynamic job-flow control race

2024-09-16 Thread Danilo Krummrich
On Mon, Sep 16, 2024 at 10:21:21AM +0200, Philipp Stanner wrote: > On Fri, 2024-09-13 at 09:53 -0700, Rob Clark wrote: > > From: Rob Clark > > > > Fixes a race condition reported here: > > https://github.com/AsahiLinux/linux/issues/309#issuecomment-2238968609 > > As Danilo suggested before, I'd

Re: [PATCH v2] drm/sched: Fix dynamic job-flow control race

2024-09-16 Thread Danilo Krummrich
> Closes: https://github.com/AsahiLinux/linux/issues/309 > Cc: sta...@vger.kernel.org > Signed-off-by: Rob Clark Reviewed-by: Danilo Krummrich > --- > drivers/gpu/drm/scheduler/sched_entity.c | 4 ++-- > drivers/gpu/drm/scheduler/sched_main.c | 7 ++- > include/d

Re: [PATCH] drm/sched: Fix dynamic job-flow control race

2024-09-13 Thread Danilo Krummrich
drm_gpu_scheduler *sched, > struct drm_sched_entity *entity) Please also remove the entity parameter. For the other refactoring, I agree it should be in a different patch. With that, Reviewed-by: Danilo Krummrich Thanks for fixing this. - Danilo > { > - if (

Re: [PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning

2024-09-13 Thread Danilo Krummrich
Hi, On 9/13/24 10:09 AM, Gustavo A. R. Silva wrote: Hi all, Friendly ping: who can take this, please? 🙂 Usually, that's me. But I thought you might want to send a v2 based on Kees' comments? - Danilo Thanks -Gustavo On 21/08/24 22:16, Gustavo A. R. Silva wrote: Use the `DEFINE_RAW_FLEX(

Re: [PATCH] drm/tidss: Add MIT license along with GPL-2.0

2024-09-12 Thread Danilo Krummrich
permissive manner. Signed-off-by: Devarsh Thakkar My only contribution to this driver was through DRM refactorings, but anyways: Acked-by: Danilo Krummrich --- drivers/gpu/drm/tidss/Makefile| 2 +- drivers/gpu/drm/tidss/tidss_crtc.c| 2 +- drivers/gpu/drm/tidss

Re: [PATCH v2 1/8] rust: drm: ioctl: Add DRM ioctl abstraction

2024-09-03 Thread Danilo Krummrich
On Mon, Sep 02, 2024 at 06:15:42PM +0200, Daniel Vetter wrote: > On Wed, Jun 19, 2024 at 01:31:37AM +0200, Danilo Krummrich wrote: > > From: Asahi Lina > > > > DRM drivers need to be able to declare which driver-specific ioctls they > > support. Add an abstraction impl

Re: [PATCH v2 3/8] rust: drm: add driver abstractions

2024-09-03 Thread Danilo Krummrich
On Mon, Sep 02, 2024 at 06:29:06PM +0200, Daniel Vetter wrote: > On Wed, Jun 19, 2024 at 01:31:39AM +0200, Danilo Krummrich wrote: > > Implement the DRM driver abstractions. > > > > The `Driver` trait provides the interface to the actual driver to fill > > in the driver

Re: [PATCH -next v2] drm/nouveau: Use for_each_child_of_node_scoped()

2024-08-30 Thread Danilo Krummrich
On Fri, Aug 30, 2024 at 03:36:54PM +0800, Jinjie Ruan wrote: > Avoids the need for manual cleanup of_node_put() in early exits > from the loop. > > Signed-off-by: Jinjie Ruan Applied to drm-misc-next, thanks!

Re: [PATCH] drm/sched: Fix UB pointer dereference

2024-08-27 Thread Danilo Krummrich
pr_err(). Cc: # 6.7+ Fixes: 56e449603f0a ("drm/sched: Convert the GPU scheduler to variable number of run-queues") Reported-by: Danilo Krummrich Closes: https://lore.kernel.org/lkml/20231108022716.15250-1-d...@redhat.com/ Signed-off-by: Philipp Stanner --- drivers/gpu/drm/schedu

Re: [PATCH 69/86] drm/nouveau: Run DRM default client setup

2024-08-16 Thread Danilo Krummrich
lable video memory, with a default of 32. Adapt this for the new client interface. Signed-off-by: Thomas Zimmermann Acked-by: Danilo Krummrich Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_drm.c | 7 +-- 1 file changed, 5 insertions(

Re: [PATCH] nouveau/firmware: using dma non-coherent interfaces for fw loading. (v2)

2024-08-15 Thread Danilo Krummrich
On Fri, Aug 16, 2024 at 06:19:23AM +1000, Dave Airlie wrote: > From: Dave Airlie > > Currently, enabling SG_DEBUG in the kernel will cause nouveau to hit a > BUG() on startup, when the iommu is enabled: > > kernel BUG at include/linux/scatterlist.h:187! > invalid opcode: [#1] PREEMPT SMP NO

Re: [PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()

2024-08-12 Thread Danilo Krummrich
On 8/12/24 2:34 PM, Thomas Zimmermann wrote: Hi Am 12.08.24 um 14:17 schrieb Danilo Krummrich: On 8/12/24 10:28 AM, Thomas Zimmermann wrote: Replace the call to drm_fb_helper_output_poll_changed() with a call to drm_client_dev_hotplug(). It is equivalent in functionality, but uses the DRM

Re: [PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()

2024-08-12 Thread Danilo Krummrich
: Daniel Vetter Acked-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_vga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index ee637f1fe03d..ab4e11dc0b8a 100644 --- a/drivers/gpu

Re: [PATCH v2 4/9] drm/nouveau: Do not set struct drm_mode_config_funcs.output_poll_changed

2024-08-12 Thread Danilo Krummrich
Vetter Acked-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 - drivers/gpu/drm/nouveau/nouveau_display.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index e4c8ce6dd40a

Re: [PATCH v2 3/9] drm/nouveau: Do not set struct drm_driver.lastclose

2024-08-12 Thread Danilo Krummrich
Signed-off-by: Thomas Zimmermann Acked-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 7 --- drivers/gpu/drm/nouveau/nouveau_vga.h | 1 - 3 files changed, 9 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b

Re: [PATCH] drm/nouveau: remove unused variable ret

2024-07-29 Thread Danilo Krummrich
unused variable > ‘ret’ [-Werror=unused-variable] >29 | int ret; > | ^~~ > > Fixes: 961ae5f9807b ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} > from common code") > Cc: Ben Skeggs > Cc: Danilo Krummrich > Signed-o

Re: [PATCH 6/8] drm/ttm: revert "Export ttm_bo_get_unless_zero()"

2024-07-25 Thread Danilo Krummrich
good to add the corresponding driver maintainers to the recipient list. Anyway, for the TTM patches: Reviewed-by: Danilo Krummrich --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_bo_internal.h | 48 +++ drivers/gpu/drm/ttm/ttm_bo_util.c

Re: [PATCH 0/3] Nouveau fixes for TTM refcount rework

2024-07-22 Thread Danilo Krummrich
On 7/18/24 7:53 AM, Ben Skeggs wrote: On 19/7/24 02:58, Danilo Krummrich wrote: Hi Christian, Those three patches should unblock your series to use GEM references instead of TTM ones. @Lyude, Dave: Can you please double check? Hi Danilo, These look fine to me, and appear to resolve the

[PATCH 3/3] drm/nouveau: use GEM references instead of TTMs

2024-07-18 Thread Danilo Krummrich
ttm_bo. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 43 ++--- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +-- drivers/gpu/drm/nouveau/nouveau_bo.h| 21 ++-- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau

[PATCH 0/3] Nouveau fixes for TTM refcount rework

2024-07-18 Thread Danilo Krummrich
Hi Christian, Those three patches should unblock your series to use GEM references instead of TTM ones. @Lyude, Dave: Can you please double check? - Danilo Danilo Krummrich (3): drm/nouveau: prime: fix refcount underflow drm/nouveau: bo: remove unused functions drm/nouveau: use GEM

[PATCH 2/3] drm/nouveau: bo: remove unused functions

2024-07-18 Thread Danilo Krummrich
nouveau_bo_new_pin_map() and nouveau_bo_unmap_unpin_unref() are unused, hence remove them. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_bo.h | 29 1 file changed, 29 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers

[PATCH 1/3] drm/nouveau: prime: fix refcount underflow

2024-07-18 Thread Danilo Krummrich
t;) Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_prime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c index b58ab595faf8..cd95446d6851 100644 --- a/drivers/gpu/d

Re: Switch reference counting to GEM instead of TTM

2024-07-16 Thread Danilo Krummrich
On 7/16/24 3:12 PM, Danilo Krummrich wrote: Hi Christian, Forgot to say, please also add driver maintainers and related mailing lists, dri-devel gets a lot of messages and I saw this series by chance. - Danilo On 7/16/24 2:35 PM, Christian König wrote: Hello everyone, to make use of

Re: Switch reference counting to GEM instead of TTM

2024-07-16 Thread Danilo Krummrich
Hi Christian, On 7/16/24 2:35 PM, Christian König wrote: Hello everyone, to make use of drm_exec it is necessary to have TTM drivers actually use the GEM reference count instead of the TTM one. This patch set is a start to do that. It switches all uses of ttm_bo_get/put to the GEM counterpart

[PATCH] drm/gpuvm: fix missing dependency to DRM_EXEC

2024-07-15 Thread Danilo Krummrich
k/lock/validate external/evicted objects") Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index d0aa277fc3bf..d08d79bbb0f6 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/d

Re: [PATCH v2] drm/nouveau: Improve variable names in nouveau_sched_init()

2024-07-12 Thread Danilo Krummrich
On 7/12/24 8:26 AM, Philipp Stanner wrote: nouveau_sched_init() uses the function drm_sched_init(). The latter function has parameters called "hang_limit" and "timeout" in its API documentation. nouveau_sched_init(), however, defines a variable called "job_hang_limit" which is passed to drm_sche

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-12 Thread Danilo Krummrich
On Fri, Jul 12, 2024 at 12:13:15PM -0300, Daniel Almeida wrote: > > > > On 12 Jul 2024, at 11:53, Danilo Krummrich wrote: > > > > You could also just define those structures in a C header directly and use > > it > > from Rust, can't you? > >

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-12 Thread Danilo Krummrich
On Fri, Jul 12, 2024 at 11:35:25AM -0300, Daniel Almeida wrote: > Hi Steven, thanks for the review! > > > > > This is defining the ABI to userspace and as such we'd need a way of > > exporting this for userspace tools to use. The C approach is a header in > > include/uabi. I'd also suggest making

Re: [PATCH] drm/nouveau: Improve variable names in nouveau_sched_init()

2024-07-11 Thread Danilo Krummrich
On Thu, Jul 11, 2024 at 07:35:51PM +0200, Philipp Stanner wrote: > nouveau_sched_init() uses the function drm_sched_init(). The latter > function has parameters called "hang_limit" and "timeout" in its API > documentation. > > nouveau_sched_init(), however, defines a variable called > "job_hang_li

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-10 Thread Danilo Krummrich
(+Sima) Hi Daniel, On 7/11/24 12:50 AM, Daniel Almeida wrote: Dump the state of the GPU. This feature is useful for debugging purposes. --- Hi everybody! For those looking for a branch instead, see [0]. I know this patch has (possibly many) issues. It is meant as a discussion around the GEM a

Re: [PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes

2024-06-26 Thread Danilo Krummrich
On 6/26/24 11:44, Jani Nikula wrote: On Wed, 26 Jun 2024, Ma Ke wrote: In nouveau_connector_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Please a

Device / Driver and PCI Rust abstractions

2024-06-18 Thread Danilo Krummrich
https://lore.kernel.org/lkml/20240618234025.15036-1-d...@redhat.com/

[PATCH v2 10/10] nova: add initial driver stub

2024-06-18 Thread Danilo Krummrich
https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u [1] Signed-off-by: Danilo Krummrich --- MAINTAINERS| 10 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/nova/Kconfig | 12 +++ drivers/gpu/drm/nova/Makefile | 3 + dr

[PATCH v2 8/8] nova: add initial driver stub

2024-06-18 Thread Danilo Krummrich
https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u [1] Signed-off-by: Danilo Krummrich --- MAINTAINERS| 10 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/nova/Kconfig | 12 +++ drivers/gpu/drm/nova/Makefile | 3 + dr

[PATCH v2 7/8] rust: drm: gem: Add GEM object abstraction

2024-06-18 Thread Danilo Krummrich
From: Asahi Lina The DRM GEM subsystem is the DRM memory management subsystem used by most modern drivers. Add a Rust abstraction to allow Rust DRM driver implementations to use it. Signed-off-by: Asahi Lina Co-developed-by: Danilo Krummrich Signed-off-by: Danilo Krummrich --- rust/bindings

[PATCH v2 6/8] rust: drm: file: Add File abstraction

2024-06-18 Thread Danilo Krummrich
From: Asahi Lina A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich

[PATCH v2 5/8] rust: drm: add DRM driver registration

2024-06-18 Thread Danilo Krummrich
) once the parent device is unbound. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/kernel/drm/drv.rs | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/rust/kernel/drm/drv.rs b/rust/kernel

[PATCH v2 4/8] rust: drm: add device abstraction

2024-06-18 Thread Danilo Krummrich
Lina Signed-off-by: Danilo Krummrich --- rust/bindings/bindings_helper.h | 1 + rust/kernel/drm/device.rs | 180 rust/kernel/drm/mod.rs | 1 + 3 files changed, 182 insertions(+) create mode 100644 rust/kernel/drm/device.rs diff --git a/rust

[PATCH v2 2/8] rust: Add a Sealed trait

2024-06-18 Thread Danilo Krummrich
From: Asahi Lina Some traits exposed by the kernel crate may not be intended to be implemented by downstream modules. Add a Sealed trait to allow avoiding this using the sealed trait pattern. Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/kernel/lib.rs | 5 + 1 file

[PATCH v2 3/8] rust: drm: add driver abstractions

2024-06-18 Thread Danilo Krummrich
Implement the DRM driver abstractions. The `Driver` trait provides the interface to the actual driver to fill in the driver specific data, such as the `DriverInfo`, driver features and IOCTLs. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust

[PATCH v2 1/8] rust: drm: ioctl: Add DRM ioctl abstraction

2024-06-18 Thread Danilo Krummrich
abstraction are in place (but it will not fail to compile on its own, if not called). Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/bindings/bindings_helper.h | 1 + rust/kernel/drm/ioctl.rs| 153 rust/kernel/drm/mod.rs | 5

[PATCH v2 0/8] DRM Rust abstractions and Nova

2024-06-18 Thread Danilo Krummrich
sktop.org/drm/nova/-/tree/nova-next Asahi Lina (4): rust: drm: ioctl: Add DRM ioctl abstraction rust: Add a Sealed trait rust: drm: file: Add File abstraction rust: drm: gem: Add GEM object abstraction Danilo Krummrich (4): rust: drm: add driver abstractions rust: drm: add device abst

Re: [RFC] GPU driver with separate "core" and "DRM" modules

2024-06-17 Thread Danilo Krummrich
On Fri, Jun 14, 2024 at 03:02:09AM +1000, Ben Skeggs wrote: > NVIDIA has been exploring ways to better support the effort for an > upstream kernel mode driver for GPUs that are capable of running GSP-RM > firmware, since the introduction[1] to Nova. > > Use cases have been identified for which sep

Re: [PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-17 Thread Danilo Krummrich
On 6/17/24 11:33, Dan Carpenter wrote: Use kmemdup_array() because we're allocating an array. The main difference between kmemdup() and kmemdup_array() is that the kmemdup_array() function has integer overflow checking built it. The "args->in_sync.count" variable is a u32 so integer overflows w

Re: [PATCH] drm/nouveau: Constify struct nouveau_job_ops

2024-06-17 Thread Danilo Krummrich
On 6/14/24 18:08, Christophe JAILLET wrote: "struct nouveau_job_ops" is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct nouveau_job" and "struct nouveau_job_args" also need to be adjusted

Re: [PATCH] nouveau: rip out busy fence waits

2024-06-17 Thread Danilo Krummrich
On 4/17/24 07:40, Dave Airlie wrote: From: Dave Airlie I'm pretty sure this optimisation is actually not a great idea, and is racy with other things waiting for fences. Yes, I tried to use it in the past on scheduler tear down, to have an indicator whether all jobs had the chance to finish.

Re: [PATCH 2/6] drm/nouveau: remove unused struct 'init_exec'

2024-06-11 Thread Danilo Krummrich
On 6/11/24 12:37, Dr. David Alan Gilbert wrote: * Danilo Krummrich (d...@redhat.com) wrote: On 5/18/24 01:26, li...@treblig.org wrote: From: "Dr. David Alan Gilbert" 'init_exec' is unused since commit cb75d97e9c77 ("drm/nouveau: implement devinit subdev, and new init

Re: [PATCH v2] drm/nouveau: don't attempt to schedule hpd_work on headless cards

2024-06-11 Thread Danilo Krummrich
On 6/8/24 00:09, Vasily Khoruzhick wrote: If the card doesn't have display hardware, hpd_work and hpd_lock are left uninitialized which causes BUG when attempting to schedule hpd_work on runtime PM resume. Fix it by adding headless flag to DRM and skip any hpd if it's set. Fixes: ae1aadb1eb8d (

Re: [PATCH 2/6] drm/nouveau: remove unused struct 'init_exec'

2024-06-11 Thread Danilo Krummrich
On 5/18/24 01:26, li...@treblig.org wrote: From: "Dr. David Alan Gilbert" 'init_exec' is unused since commit cb75d97e9c77 ("drm/nouveau: implement devinit subdev, and new init table parser") Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Danilo Kr

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-06-10 Thread Danilo Krummrich
On Sat, Jun 08, 2024 at 08:28:06AM +0900, FUJITA Tomonori wrote: > On Fri, 7 Jun 2024 19:55:49 +0200 > Danilo Krummrich wrote: > > > On Fri, Jun 07, 2024 at 05:41:11PM +0200, Greg KH wrote: > >> On Fri, Jun 07, 2024 at 03:33:39PM +0200, Danilo Krummrich wrote: > >

Re: [RFC PATCH 3/8] rust: drm: Add Device and Driver abstractions

2024-06-09 Thread Danilo Krummrich
Hi Lina, Welcome back! On Sun, Jun 09, 2024 at 02:15:57PM +0900, Asahi Lina wrote: > > > On 5/22/24 6:23 AM, Rob Herring wrote: > > On Mon, May 20, 2024 at 07:20:50PM +0200, Danilo Krummrich wrote: > >> From: Asahi Lina > > This is missing an entry for DRI

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-06-07 Thread Danilo Krummrich
On Fri, Jun 07, 2024 at 05:41:11PM +0200, Greg KH wrote: > On Fri, Jun 07, 2024 at 03:33:39PM +0200, Danilo Krummrich wrote: > > On Fri, Jun 07, 2024 at 02:36:50PM +0200, Greg KH wrote: > > > Anyway, that's all hand-wavy right now, sorry, to get back to the point > > &

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-06-07 Thread Danilo Krummrich
On Fri, Jun 07, 2024 at 02:36:50PM +0200, Greg KH wrote: > Anyway, that's all hand-wavy right now, sorry, to get back to the point > here, again, let's take this, which will allow the firmware bindings to > be resubmitted and hopefully accepted, and we can move forward from > there to "real" things

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-06-07 Thread Danilo Krummrich
On Fri, Jun 07, 2024 at 02:36:50PM +0200, Greg KH wrote: > On Fri, Jun 07, 2024 at 09:11:32PM +0900, FUJITA Tomonori wrote: > > Hi, > > > > On Fri, 31 May 2024 11:59:47 +0200 > > Danilo Krummrich wrote: > > > > > Once we get to a conclusion I

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-06-07 Thread Danilo Krummrich
On Fri, Jun 07, 2024 at 09:11:32PM +0900, FUJITA Tomonori wrote: > Hi, > > On Fri, 31 May 2024 11:59:47 +0200 > Danilo Krummrich wrote: > > > Once we get to a conclusion I can send a series with only the device and > > firmare > > abstractions such that we can

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-31 Thread Danilo Krummrich
On Fri, May 31, 2024 at 04:50:32PM +0900, FUJITA Tomonori wrote: > On Thu, 30 May 2024 08:47:25 +0200 > Danilo Krummrich wrote: > > >> >> >> For a Rust PHY driver, you know that you have a valid pointer to C's > >> >> >> device object

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-29 Thread Danilo Krummrich
On Thu, May 30, 2024 at 01:24:33PM +0900, FUJITA Tomonori wrote: > Hi, > > On Thu, 30 May 2024 04:01:39 +0200 > Danilo Krummrich wrote: > > > On Thu, May 30, 2024 at 08:28:24AM +0900, FUJITA Tomonori wrote: > >> Hi, > >> > >> On Wed

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-29 Thread Danilo Krummrich
On Thu, May 30, 2024 at 08:28:24AM +0900, FUJITA Tomonori wrote: > Hi, > > On Wed, 29 May 2024 21:57:03 +0200 > Greg KH wrote: > > >> For a Rust PHY driver, you know that you have a valid pointer to C's > >> device object of C's PHY device during the probe callback. The driver > >> creates a Rus

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-28 Thread Danilo Krummrich
On Tue, May 28, 2024 at 08:40:20AM +, Zhi Wang wrote: > On 27/05/2024 22.18, Danilo Krummrich wrote: > > External email: Use caution opening links or attachments > > > > > > On Tue, May 21, 2024 at 08:32:31AM +0300, Zhi Wang wrote: > >> On Mon, 20

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-28 Thread Danilo Krummrich
On Tue, May 28, 2024 at 02:45:02PM +0200, Greg KH wrote: > On Tue, May 28, 2024 at 02:19:24PM +0200, Danilo Krummrich wrote: > > However, if you have a driver that needs the firmware abstractions, I would > > be > > surprised if there were any hesitations to already mer

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-28 Thread Danilo Krummrich
On Tue, May 28, 2024 at 08:01:26PM +0900, FUJITA Tomonori wrote: > On Mon, 27 May 2024 21:22:47 +0200 > Danilo Krummrich wrote: > > >> > +/// Abstraction around a C firmware struct. > >> > +/// > >> > +/// This is a simple abstraction around the C f

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-28 Thread Danilo Krummrich
raction is dropped. > > Signed-off-by: Danilo Krummrich > --- > rust/bindings/bindings_helper.h | 1 + > rust/kernel/firmware.rs | 74 + > rust/kernel/lib.rs | 1 + > 3 files changed, 76 insertions(+) > create mode 1006

Re: [RFC PATCH 3/8] rust: drm: Add Device and Driver abstractions

2024-05-27 Thread Danilo Krummrich
On Tue, May 21, 2024 at 04:23:33PM -0500, Rob Herring wrote: > On Mon, May 20, 2024 at 07:20:50PM +0200, Danilo Krummrich wrote: > > From: Asahi Lina > > > > Add abstractions for DRM drivers and devices. These go together in one > > commit since both are fairly tightl

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-27 Thread Danilo Krummrich
On Wed, May 22, 2024 at 08:53:34AM +0900, FUJITA Tomonori wrote: > Hi, > Thanks for working on the firmware API! > > On Mon, 20 May 2024 19:24:19 +0200 > Danilo Krummrich wrote: > > > Add an abstraction around the kernels firmware API to request firmware > > im

Re: [RFC PATCH 7/8] rust: add firmware abstractions

2024-05-27 Thread Danilo Krummrich
On Tue, May 21, 2024 at 08:32:31AM +0300, Zhi Wang wrote: > On Mon, 20 May 2024 19:24:19 +0200 > Danilo Krummrich wrote: > > > Add an abstraction around the kernels firmware API to request firmware > > images. The abstraction provides functions to access the firmware > &

Re: [PATCH v3] drm/nouveau/nvif: Avoid build error due to potential integer overflows

2024-05-27 Thread Danilo Krummrich
for validating the allocation size to avoid the overflow. While at it, split assignments out of if conditions. Fixes: a61ddb4393ad ("drm: enable (most) W=1 warnings by default across the subsystem") Cc: Javier Martinez Canillas Cc: Jani Nikula Cc: Thomas Zimmermann Cc: Danilo Krumm

Re: Device / Driver and PCI Rust abstractions

2024-05-20 Thread Danilo Krummrich
https://lore.kernel.org/rust-for-linux/20240520172554.182094-1-d...@redhat.com/

[RFC PATCH 8/8] nova: add initial driver stub

2024-05-20 Thread Danilo Krummrich
https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u [1] Signed-off-by: Danilo Krummrich --- MAINTAINERS| 10 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/nova/Kconfig | 11 +++ drivers/gpu/drm/nova/Makefile | 3 + dr

[RFC PATCH 7/8] rust: add firmware abstractions

2024-05-20 Thread Danilo Krummrich
: Danilo Krummrich --- rust/bindings/bindings_helper.h | 1 + rust/kernel/firmware.rs | 74 + rust/kernel/lib.rs | 1 + 3 files changed, 76 insertions(+) create mode 100644 rust/kernel/firmware.rs diff --git a/rust/bindings/bindings_helper.h b

[RFC PATCH 6/8] rust: drm: gem: Add GEM object abstraction

2024-05-20 Thread Danilo Krummrich
From: Asahi Lina The DRM GEM subsystem is the DRM memory management subsystem used by most modern drivers. Add a Rust abstraction to allow Rust DRM driver implementations to use it. Signed-off-by: Asahi Lina Co-developed-by: Danilo Krummrich Signed-off-by: Danilo Krummrich --- rust/bindings

[RFC PATCH 5/8] rust: drm: file: Add File abstraction

2024-05-20 Thread Danilo Krummrich
From: Asahi Lina A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich

[RFC PATCH 4/8] rust: drm: implement `AsRef` for DRM device

2024-05-20 Thread Danilo Krummrich
Implement `AsRef` for `drm::device::Device` such that `dev_*` print macros can be used conveniently. Signed-off-by: Danilo Krummrich --- rust/kernel/drm/device.rs | 8 1 file changed, 8 insertions(+) diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index f72bab8dd42d

[RFC PATCH 4/8] rust: drm: implement `AsRef` for DRM device

2024-05-20 Thread Danilo Krummrich
Implement `AsRef` for `drm::device::Device` such that `dev_*` print macros can be used conveniently. Signed-off-by: Danilo Krummrich --- rust/kernel/drm/device.rs | 8 1 file changed, 8 insertions(+) diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index f72bab8dd42d

[RFC PATCH 3/8] rust: drm: Add Device and Driver abstractions

2024-05-20 Thread Danilo Krummrich
: Danilo Krummrich Signed-off-by: Danilo Krummrich --- rust/bindings/bindings_helper.h | 2 + rust/kernel/drm/device.rs | 87 + rust/kernel/drm/drv.rs | 318 rust/kernel/drm/mod.rs | 2 + 4 files changed, 409 insertions(+) create

[RFC PATCH 2/8] rust: Add a Sealed trait

2024-05-20 Thread Danilo Krummrich
From: Asahi Lina Some traits exposed by the kernel crate may not be intended to be implemented by downstream modules. Add a Sealed trait to allow avoiding this using the sealed trait pattern. Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/kernel/lib.rs | 5 + 1 file

[RFC PATCH 1/8] rust: drm: ioctl: Add DRM ioctl abstraction

2024-05-20 Thread Danilo Krummrich
abstraction are in place (but it will not fail to compile on its own, if not called). Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/bindings/bindings_helper.h | 1 + rust/kernel/drm/ioctl.rs| 153 rust/kernel/drm/mod.rs | 5

[RFC PATCH 0/8] [RFC] DRM Rust abstractions and Nova

2024-05-20 Thread Danilo Krummrich
rust: drm: file: Add File abstraction rust: drm: gem: Add GEM object abstraction Danilo Krummrich (3): rust: drm: implement `AsRef` for DRM device rust: add firmware abstractions nova: add initial driver stub MAINTAINERS | 10 + drivers/gpu/drm/Kconfig |

Re: [PATCH v4] drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations

2024-05-13 Thread Danilo Krummrich
Hi Mohamed, Thank you for fixing this up! On 5/9/24 22:43, Mohamed Ahmed wrote: Allows PTE kind and tile mode on BO create with VM_BIND, and adds a GETPARAM to indicate this change. This is needed to support It's usually better to use imperative verb form for commit messages. No need to send

Re: [PATCH] drm/i915: fix missing linux/debugfs.h includes

2024-04-30 Thread Danilo Krummrich
On 4/30/24 16:53, Jani Nikula wrote: On Tue, 30 Apr 2024, Danilo Krummrich wrote: After dropping linux/debugfs.h include from drm/drm_print.h the following files in i915 miss the linux/debugfs.h include: i915_debugfs.c, i915_debugfs_params.c and i915_gpu_error.c. Add the include to fix the

Re: [PATCH] nouveau: Add missing break statement

2024-04-30 Thread Danilo Krummrich
On 4/30/24 15:18, Chaitanya Kumar Borah wrote: Add the missing break statement that causes the following build error CC [M] drivers/gpu/drm/i915/display/intel_display_device.o ../drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c: In function ‘build_registry’: ../drivers/

[PATCH] drm/i915: fix missing linux/debugfs.h includes

2024-04-30 Thread Danilo Krummrich
t;drm/print: drop include debugfs.h and include where needed") Closes: https://lore.kernel.org/oe-kbuild-all/202404260726.nyguvl59-...@intel.com/ Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/i915/i915_debugfs.c| 1 + drivers/gpu/drm/i915/i915_debugfs_params.c | 1 + drivers/gp

Re: [PATCH] [v7] nouveau: add command-line GSP-RM registry support

2024-04-30 Thread Danilo Krummrich
On 4/30/24 15:06, Lucas De Marchi wrote: On Fri, Apr 26, 2024 at 06:08:19PM GMT, Danilo Krummrich wrote: On 4/25/24 18:38, Timur Tabi wrote: On Thu, 2024-04-25 at 15:22 +0200, Danilo Krummrich wrote: +    size_t length; + +    /* Remove any whitespace from the parameter string

[PATCH] drm/nouveau: use vmemdup_array_user() in u_memcpya()

2024-04-15 Thread Danilo Krummrich
Now that we have vmemdup_array_user(), make use of it. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index

[PATCH] drm/nouveau: fix duplicate pointer to struct drm_device

2024-04-15 Thread Danilo Krummrich
nouveau_uvmm_ioctl_vm_init() already has a pointer to struct drm_device, no need to derive another one from struct drm_file. Fixes: 266f7618e761 ("drm/nouveau: separately allocate struct nouveau_uvmm") Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_uvmm.c | 3 +

Re: [PATCH] nouveau: fix instmem race condition around ptr stores

2024-04-15 Thread Danilo Krummrich
On 4/11/24 03:15, Dave Airlie wrote: From: Dave Airlie Running a lot of VK CTS in parallel against nouveau, once every few hours you might see something like this crash. BUG: kernel NULL pointer dereference, address: 0008 PGD 800114e6e067 P4D 800114e6e067 PUD 109046067 PMD

Re: [PATCH v2] drm: nv04: Fix out of bounds access

2024-04-15 Thread Danilo Krummrich
On 4/11/24 13:08, Mikhail Kobuk wrote: When Output Resource (dcb->or) value is assigned in fabricate_dcb_output(), there may be out of bounds access to dac_users array in case dcb->or is zero because ffs(dcb->or) is used as index there. The 'or' argument of fabricate_dcb_output() must be interpre

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

2024-04-10 Thread Danilo Krummrich
On 4/10/24 17:39, Mikhail Kobuk wrote: On 08/04/2024 16:23, Danilo Krummrich wrote: On 4/5/24 22:05, Lyude Paul wrote: On Fri, 2024-04-05 at 17:53 +0200, Danilo Krummrich wrote: On 3/31/24 08:45, Mikhail Kobuk wrote: Output Resource (dcb->or) value is not guaranteed to be non-zero (i.e.

Re: [PATCH] nouveau: fix instmem race condition around ptr stores

2024-04-09 Thread Danilo Krummrich
On 4/9/24 10:27, Lucas Stach wrote: Am Dienstag, dem 09.04.2024 um 10:34 +1000 schrieb Dave Airlie: From: Dave Airlie Running a lot of VK CTS in parallel against nouveau, once every few hours you might see something like this crash. BUG: kernel NULL pointer dereference, address: 0

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

2024-04-08 Thread Danilo Krummrich
On 4/5/24 22:05, Lyude Paul wrote: On Fri, 2024-04-05 at 17:53 +0200, Danilo Krummrich wrote: On 3/31/24 08:45, Mikhail Kobuk wrote: Output Resource (dcb->or) value is not guaranteed to be non-zero (i.e. in drivers/gpu/drm/nouveau/nouveau_bios.c, in 'fabricate_dcb_encoder_table()'

Re: [PATCH] nouveau: fix devinit paths to only handle display on GSP.

2024-04-08 Thread Danilo Krummrich
ot;nouveau/gsp: don't check devinit disable on GSP.") Signed-off-by: Dave Airlie Reviewed-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c | 12 drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c | 1 + 2 files changed, 9 insertions(+),

  1   2   3   4   5   6   7   8   9   >