Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Dave Airlie
On Fri, 28 Feb 2025 at 09:07, John Hubbard wrote: > > On Thu Feb 27, 2025 at 1:42 PM PST, Dave Airlie wrote: > > On Thu, 27 Feb 2025 at 11:34, John Hubbard wrote: > >> On Wed Feb 26, 2025 at 5:02 PM PST, Greg KH wrote: > >> > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > ...

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Dave Airlie
On Fri, 28 Feb 2025 at 11:49, Timur Tabi wrote: > > On Fri, 2025-02-28 at 07:37 +1000, Dave Airlie wrote: > > I've tried to retrofit checking 0x to drivers a lot, I'd > > prefer not to. Drivers getting stuck in wait for clear bits for ever. > > That's what read_poll_timeout() is for. I'm

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

2025-02-27 Thread Danilo Krummrich
On 2/12/25 10:01 AM, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. So, in order to avoid ending up with flexible-array members in the middle of other structs, we use the `struct_group_tagged()` helper to separ

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Danilo Krummrich
On Thu, Feb 27, 2025 at 08:55:09AM -0800, Boqun Feng wrote: > On Thu, Feb 27, 2025 at 12:17:33PM -0400, Jason Gunthorpe wrote: > > > I still wonder why you couldn't also have these reliable reference > > counts rooted on the device driver instead of only on the module. > > > > You could put reli

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Timur Tabi
On Fri, 2025-02-28 at 07:37 +1000, Dave Airlie wrote: > I've tried to retrofit checking 0x to drivers a lot, I'd > prefer not to. Drivers getting stuck in wait for clear bits for ever. That's what read_poll_timeout() is for. I'm surprised Nouveau doesn't use it.

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

2025-02-27 Thread Gustavo A. R. Silva
> Applied to drm-misc-next, thanks! Awesome. :) Thank you, guys. -- Gustavo

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Dave Airlie
On Wed, 26 Feb 2025 at 00:11, Alexandre Courbot wrote: > > On Mon Feb 24, 2025 at 9:07 PM JST, Danilo Krummrich wrote: > > CC: Gary > > > > On Mon, Feb 24, 2025 at 10:40:00AM +0900, Alexandre Courbot wrote: > >> This inability to sleep while we are accessing registers seems very > >> constraining

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Dave Airlie
On Thu, 27 Feb 2025 at 11:34, John Hubbard wrote: > > On Wed Feb 26, 2025 at 5:02 PM PST, Greg KH wrote: > > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > >> The way misc device works you can't unload the module until all the > >> FDs are closed and the misc code directly hand

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread John Hubbard
On Thu Feb 27, 2025 at 1:42 PM PST, Dave Airlie wrote: > On Thu, 27 Feb 2025 at 11:34, John Hubbard wrote: >> On Wed Feb 26, 2025 at 5:02 PM PST, Greg KH wrote: >> > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: ... > nova is just a drm driver, it's not a rewrite of the drm subs

Re: [PATCH v2 0/2] NVKM GSP RPC message handling policy

2025-02-27 Thread Zhi Wang
On 26/02/2025 17.42, Zhi Wang wrote: > On 26/02/2025 11.32, Lyude Paul wrote: >> For the whole series: >> >> Reviewed-by: Lyude Paul >> > > Hi Lyude: > > Thanks so much for the RB. Ben found a hidden use-after-free after > enabling the KFENCE in v3.I re-spined it with a minor fixes. Please > r

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Danilo Krummrich
On Thu, Feb 27, 2025 at 06:00:13PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 27, 2025 at 01:25:10PM -0800, Boqun Feng wrote: > > > > Most of the cases, it should be naturally achieved, because you already > > bind the objects into your module or driver, otherwise they would be > > already cancel

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 01:25:10PM -0800, Boqun Feng wrote: > > The design pattern says that 'share it with the rest of the world' is > > a bug. A driver following the pattern cannot do that, it must contain > > the driver objects within the driver scope and free them. In C we > > I cannot speak f

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 06:32:15PM +0100, Danilo Krummrich wrote: > On Thu, Feb 27, 2025 at 08:55:09AM -0800, Boqun Feng wrote: > > On Thu, Feb 27, 2025 at 12:17:33PM -0400, Jason Gunthorpe wrote: > > > > > I still wonder why you couldn't also have these reliable reference > > > counts rooted on t

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 12:32:45PM +0100, Danilo Krummrich wrote: > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > > On Wed, Feb 26, 2025 at 10:31:10PM +0100, Danilo Krummrich wrote: > > > Let's take a step back and look again why we have Devres (and Revocable) > > > for > > >

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Wed, Feb 26, 2025 at 05:02:23PM -0800, Greg KH wrote: > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > > The way misc device works you can't unload the module until all the > > FDs are closed and the misc code directly handles races with opening > > new FDs while modules are

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Wed, Feb 26, 2025 at 04:41:08PM -0800, Boqun Feng wrote: > And if you don't store the HrTimerHandle anywhere, like you drop() it > right after start a hrtimer, it will immediately stop the timer. Does > this make sense? Oh, I understand that, but it is not sufficient in the kernel. You are mak

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 07:18:02AM -0800, Boqun Feng wrote: > On Thu, Feb 27, 2025 at 10:46:18AM -0400, Jason Gunthorpe wrote: > > On Wed, Feb 26, 2025 at 04:41:08PM -0800, Boqun Feng wrote: > > > And if you don't store the HrTimerHandle anywhere, like you drop() it > > > right after start a hrtime

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Danilo Krummrich
On Thu, Feb 27, 2025 at 11:07:09AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 27, 2025 at 12:32:45PM +0100, Danilo Krummrich wrote: > > On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > > > On Wed, Feb 26, 2025 at 10:31:10PM +0100, Danilo Krummrich wrote: > > > > Let's take a step

Re: [RFC PATCH 0/3] gpu: nova-core: add basic timer subdevice implementation

2025-02-27 Thread Danilo Krummrich
On Wed, Feb 26, 2025 at 07:47:30PM -0400, Jason Gunthorpe wrote: > On Wed, Feb 26, 2025 at 10:31:10PM +0100, Danilo Krummrich wrote: > > Let's take a step back and look again why we have Devres (and Revocable) for > > e.g. pci::Bar. > > > > The device / driver model requires that device resources