Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-08 Thread Dave Airlie
On Tue, 8 Nov 2022 at 22:28, Jason Gunthorpe wrote: > > On Tue, Nov 08, 2022 at 06:33:23AM +1000, Dave Airlie wrote: > > > At plumbers we decided a direction, I think the direction is good, if > > there is refactoring to be done, I'd rather it was done in tree with a > > clear direction. > > > >

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-08 Thread Jason Gunthorpe
On Tue, Nov 08, 2022 at 06:33:23AM +1000, Dave Airlie wrote: > At plumbers we decided a direction, I think the direction is good, if > there is refactoring to be done, I'd rather it was done in tree with a > clear direction. > > Coming in now and saying we should go down a different path isn't >

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Dave Airlie
> > > > > > "drm_minor" is not necessary anymore. Strictly managing minor numbers > > > lost its value years ago when /dev/ was reorganized. Just use > > > dynamic minors fully. > > drm minor is not just about handling minor numbers. It contains the > > entire code to manage devices that register

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Dave Airlie
On Mon, 7 Nov 2022 at 23:10, Jason Gunthorpe wrote: > > On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > > I don't agree with your statement that it should be "a layer over top of > > DRM". > > Anything on top of DRM is a device driver. > > Accel is not a device driver, it is a new

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Oded Gabbay
On Mon, Nov 7, 2022 at 6:31 PM Jason Gunthorpe wrote: > > On Mon, Nov 07, 2022 at 05:53:55PM +0200, Oded Gabbay wrote: > > On Mon, Nov 7, 2022 at 4:10 PM Jason Gunthorpe wrote: > > > > > > On Mon, Nov 07, 2022 at 04:02:01PM +0200, Oded Gabbay wrote: > > > > On Mon, Nov 7, 2022 at 3:10 PM Jason

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Jason Gunthorpe
On Mon, Nov 07, 2022 at 05:53:55PM +0200, Oded Gabbay wrote: > On Mon, Nov 7, 2022 at 4:10 PM Jason Gunthorpe wrote: > > > > On Mon, Nov 07, 2022 at 04:02:01PM +0200, Oded Gabbay wrote: > > > On Mon, Nov 7, 2022 at 3:10 PM Jason Gunthorpe wrote: > > > > > > > > On Mon, Nov 07, 2022 at 03:01:08PM

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Oded Gabbay
On Mon, Nov 7, 2022 at 4:10 PM Jason Gunthorpe wrote: > > On Mon, Nov 07, 2022 at 04:02:01PM +0200, Oded Gabbay wrote: > > On Mon, Nov 7, 2022 at 3:10 PM Jason Gunthorpe wrote: > > > > > > On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > > > > I don't agree with your statement that

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Jason Gunthorpe
On Mon, Nov 07, 2022 at 04:02:01PM +0200, Oded Gabbay wrote: > On Mon, Nov 7, 2022 at 3:10 PM Jason Gunthorpe wrote: > > > > On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > > > I don't agree with your statement that it should be "a layer over top of > > > DRM". > > > Anything on

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Oded Gabbay
On Mon, Nov 7, 2022 at 3:10 PM Jason Gunthorpe wrote: > > On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > > I don't agree with your statement that it should be "a layer over top of > > DRM". > > Anything on top of DRM is a device driver. > > Accel is not a device driver, it is a

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Stanislaw Gruszka
Hi On Mon, Nov 07, 2022 at 09:10:36AM -0400, Jason Gunthorpe wrote: > On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > > I don't agree with your statement that it should be "a layer over top of > > DRM". > > Anything on top of DRM is a device driver. > > Accel is not a device

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Jason Gunthorpe
On Mon, Nov 07, 2022 at 03:01:08PM +0200, Oded Gabbay wrote: > I don't agree with your statement that it should be "a layer over top of DRM". > Anything on top of DRM is a device driver. > Accel is not a device driver, it is a new type of drm minor / drm driver. Yeah, I still think this is not

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Oded Gabbay
On Mon, Nov 7, 2022 at 2:56 PM Jason Gunthorpe wrote: > > On Thu, Nov 03, 2022 at 10:39:36PM +0200, Oded Gabbay wrote: > > On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: > > > > > > On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Nov 02, 2022 at

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-07 Thread Jason Gunthorpe
On Thu, Nov 03, 2022 at 10:39:36PM +0200, Oded Gabbay wrote: > On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: > > > > On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: > > > > --- /dev/null > > > > +++

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-04 Thread Stanislaw Gruszka
On Thu, Nov 03, 2022 at 04:01:08PM -0700, Randy Dunlap wrote: > >>> Module name if "M" is chosen? > >> Will add > > So, unfortunately, the path of doing accel as a kernel module won't > > work cleanly (Thanks stanislaw for pointing this out to me). > > The reason is the circular dependency between

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-03 Thread Randy Dunlap
On 11/3/22 13:39, Oded Gabbay wrote: > On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: >> >> On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman >> wrote: >>> >>> On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: --- /dev/null +++ b/drivers/accel/Kconfig @@ -0,0

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-03 Thread Oded Gabbay
On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: > > On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: > > > --- /dev/null > > > +++ b/drivers/accel/Kconfig > > > @@ -0,0 +1,24 @@ > > > +# SPDX-License-Identifier:

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-03 Thread Oded Gabbay
On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman wrote: > > On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: > > --- /dev/null > > +++ b/drivers/accel/Kconfig > > @@ -0,0 +1,24 @@ > > +# SPDX-License-Identifier: GPL-2.0-only > > +# > > +# Compute Acceleration device configuration > >

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-03 Thread Oded Gabbay
On Thu, Nov 3, 2022 at 12:58 AM Randy Dunlap wrote: > > > > On 11/2/22 13:34, Oded Gabbay wrote: > > diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig > > new file mode 100644 > > index ..282ea24f90c5 > > --- /dev/null > > +++ b/drivers/accel/Kconfig > > @@ -0,0 +1,24 @@ > >

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-03 Thread Oded Gabbay
On Wed, Nov 2, 2022 at 11:04 PM Jeffrey Hugo wrote: > > On 11/2/2022 2:34 PM, Oded Gabbay wrote: > > diff --git a/drivers/accel/accel_drv.c b/drivers/accel/accel_drv.c > > new file mode 100644 > > index ..6132765ea054 > > --- /dev/null > > +++ b/drivers/accel/accel_drv.c > > @@ -0,0

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-02 Thread Greg Kroah-Hartman
On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: > --- /dev/null > +++ b/drivers/accel/Kconfig > @@ -0,0 +1,24 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +# > +# Compute Acceleration device configuration > +# > +# This framework provides support for compute acceleration devices,

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-02 Thread Randy Dunlap
On 11/2/22 13:34, Oded Gabbay wrote: > diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig > new file mode 100644 > index ..282ea24f90c5 > --- /dev/null > +++ b/drivers/accel/Kconfig > @@ -0,0 +1,24 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +# > +# Compute Acceleration

Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-02 Thread Jeffrey Hugo
On 11/2/2022 2:34 PM, Oded Gabbay wrote: diff --git a/drivers/accel/accel_drv.c b/drivers/accel/accel_drv.c new file mode 100644 index ..6132765ea054 --- /dev/null +++ b/drivers/accel/accel_drv.c @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Copyright 2022

[RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major

2022-11-02 Thread Oded Gabbay
Add a new Kconfig for the accel subsystem. The Kconfig currently contains only the basic CONFIG_ACCEL option that will be used to decide whether to compile the accel registration code. That code will be called directly from the DRM core code. The accelerator devices will be exposed to the user