Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-27 Thread Jiho Chu
On Wed, 26 Oct 2022 09:38:13 +0300 Oded Gabbay wrote: > On Tue, Oct 25, 2022 at 9:43 AM Jiho Chu wrote: > > > > > > On Sun, 23 Oct 2022 00:46:22 +0300 > > Oded Gabbay wrote: > > > > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > > > index b58ffb1433d6..c13701a8d4be 10064

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-25 Thread Oded Gabbay
On Tue, Oct 25, 2022 at 4:27 PM Michał Winiarski wrote: > > On Mon, Oct 24, 2022 at 08:43:58PM +0300, Oded Gabbay wrote: > > On Mon, Oct 24, 2022 at 6:21 PM Jeffrey Hugo wrote: > > > > > > On 10/22/2022 3:46 PM, Oded Gabbay wrote: > > > > The accelerator devices are exposed to user-space using a

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-25 Thread Oded Gabbay
On Tue, Oct 25, 2022 at 9:43 AM Jiho Chu wrote: > > > On Sun, 23 Oct 2022 00:46:22 +0300 > Oded Gabbay wrote: > > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > > index b58ffb1433d6..c13701a8d4be 100644 > > --- a/drivers/gpu/drm/drm_drv.c > > +++ b/drivers/gpu/drm/drm_drv.

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-25 Thread Michał Winiarski
On Mon, Oct 24, 2022 at 08:43:58PM +0300, Oded Gabbay wrote: > On Mon, Oct 24, 2022 at 6:21 PM Jeffrey Hugo wrote: > > > > On 10/22/2022 3:46 PM, Oded Gabbay wrote: > > > The accelerator devices are exposed to user-space using a dedicated > > > major. In addition, they are represented in /dev with

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-24 Thread Jiho Chu
On Sun, 23 Oct 2022 00:46:22 +0300 Oded Gabbay wrote: > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index b58ffb1433d6..c13701a8d4be 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -56,6 +56,9 @@ MODULE_LICENSE("GPL and additional rights"

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-24 Thread Oded Gabbay
On Mon, Oct 24, 2022 at 6:21 PM Jeffrey Hugo wrote: > > On 10/22/2022 3:46 PM, Oded Gabbay wrote: > > The accelerator devices are exposed to user-space using a dedicated > > major. In addition, they are represented in /dev with new, dedicated > > device char names: /dev/accel/accel*. This is done

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-24 Thread Jeffrey Hugo
On 10/22/2022 3:46 PM, Oded Gabbay wrote: The accelerator devices are exposed to user-space using a dedicated major. In addition, they are represented in /dev with new, dedicated device char names: /dev/accel/accel*. This is done to make sure any user-space software that tries to open a graphic c

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-24 Thread Oded Gabbay
On Sun, Oct 23, 2022 at 3:41 PM Greg Kroah-Hartman wrote: > > On Sun, Oct 23, 2022 at 12:46:22AM +0300, Oded Gabbay wrote: > > +/** > > + * accel_open - open method for ACCEL file > > + * @inode: device inode > > + * @filp: file pointer. > > + * > > + * This function must be used by drivers as the

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-23 Thread Greg Kroah-Hartman
On Sun, Oct 23, 2022 at 12:46:22AM +0300, Oded Gabbay wrote: > +/** > + * accel_open - open method for ACCEL file > + * @inode: device inode > + * @filp: file pointer. > + * > + * This function must be used by drivers as their &file_operations.open > method. > + * It looks up the correct ACCEL dev

[RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-22 Thread Oded Gabbay
The accelerator devices are exposed to user-space using a dedicated major. In addition, they are represented in /dev with new, dedicated device char names: /dev/accel/accel*. This is done to make sure any user-space software that tries to open a graphic card won't open the accelerator device by mis