[PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

2025-03-20 Thread Alexandre Courbot
Add a basic timer device and exercise it during device probing. This first draft is probably very questionable. One point in particular which should IMHO receive attention: the generic wait_on() method aims at providing similar functionality to Nouveau's nvkm_[num]sec() macros. Since this method w

[PATCH RFC v3 2/7] rust: make ETIMEDOUT error available

2025-03-20 Thread Alexandre Courbot
Signed-off-by: Alexandre Courbot --- rust/kernel/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs index 1e510181432cceae46219f7ed3597a88b85ebe0a..475d14a4830774aa7717d3b5e70c7ff9de203dc2 100644 --- a/rust/kernel/error.rs +++ b/rust/kernel/

[RFC PATCH v3 0/7] gpu: nova-core: register definitions and basic timer and falcon devices

2025-03-20 Thread Alexandre Courbot
043-1-abdiel.janul...@gmail.com/ - https://lore.kernel.org/rust-for-linux/20250306222336.23482-1-d...@kernel.org/ - https://lore.kernel.org/rust-for-linux/20250320-registers-v2-1-d277409bc...@nvidia.com/ TODO: - Document more registers and fields, - Add BIOS extractor code to obtain the FWSEC

[PATCH RFC v3 5/7] gpu: nova-core: use register!() to define register layout

2025-03-20 Thread Alexandre Courbot
Use the register!() macro to define the layout for the Boot0 register and use its accessors through the use of the convenience with_bar!() macro, which uses Revocable::try_access() and converts its returned Option into the proper error as needed. Signed-off-by: Alexandre Courbot --- drivers/gpu/

[PATCH RFC v3 1/7] rust: add useful ops for u64

2025-03-20 Thread Alexandre Courbot
It is common to build a u64 from its high and low parts obtained from two 32-bit registers. Conversely, it is also common to split a u64 into two u32s to write them into registers. Add an extension trait for u64 that implement these methods in a new `num` module. It is expected that this trait wil

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-20 Thread Danilo Krummrich
On Fri, Mar 21, 2025 at 05:57:55AM +1000, Ben Skeggs wrote: > On 21/3/25 04:18, Danilo Krummrich wrote: > > > Hi Mel, > > > > On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote: > > > > @@ -72,6 +75,9 @@ struct nvkm_device { > > > bool armed; > > > bo

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-20 Thread Danilo Krummrich
On Thu, Mar 20, 2025 at 07:18:13PM +0100, Danilo Krummrich wrote: > Hi Mel, > > On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote: > > +int > > +nouveau_abi16_ioctl_get_zcull_info(ABI16_IOCTL_ARGS) > > +{ > > + struct nouveau_drm *drm = nouveau_drm(dev); > > + struct nvkm_device *dev

Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

2025-03-20 Thread Alexandre Courbot
Hi Boqun, On Fri Mar 21, 2025 at 3:17 AM JST, Boqun Feng wrote: > Hi Alexandre, > > On Thu, Mar 20, 2025 at 10:39:14PM +0900, Alexandre Courbot wrote: >> Add a basic timer device and exercise it during device probing. This >> first draft is probably very questionable. >> >> One point in particula

[PATCH RFC v3 4/7] gpu: nova-core: add missing GA100 definition

2025-03-20 Thread Alexandre Courbot
linux-firmware contains a directory for GA100, and it is a defined chipset in Nouveau. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 4de67a

[PATCH RFC v3 3/7] gpu: nova-core: derive useful traits for Chipset

2025-03-20 Thread Alexandre Courbot
We will commonly need to compare chipset versions, so derive the ordering traits to make that possible. Also derive Copy and Clone since Chipsets are as cheap as an integer. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d