Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-17 Thread Pierre Moreau
[…] > > > + const int nb = atomic_inc_return(&bl_interfaces_nb) - 1; > > This kinda sucks if you reload nouveau a bunch. How about using an > "ida". Have a look in drivers/gpu/drm/drm_crtc.c for how I use that > one. I had a quick look at drm_crtc.c. This seems to be exactly what I need,

Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-16 Thread Pierre Moreau
On 02:40 PM - Apr 15 2016, Nick Tenney wrote: > On Fri, Apr 15, 2016 at 11:25 AM, Ilia Mirkin wrote: > > > On Fri, Apr 15, 2016 at 11:22 AM, Pierre Moreau > > wrote: > > > On 11:06 AM - Apr 15 2016, Ilia Mirkin wrote: > > >> On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau > > wrote: > > >> > Cu

Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-15 Thread Nick Tenney
On Fri, Apr 15, 2016 at 11:25 AM, Ilia Mirkin wrote: > On Fri, Apr 15, 2016 at 11:22 AM, Pierre Moreau > wrote: > > On 11:06 AM - Apr 15 2016, Ilia Mirkin wrote: > >> On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau > wrote: > >> > Currently, every backlight interface created by Nouveau uses the

Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-15 Thread Ilia Mirkin
On Fri, Apr 15, 2016 at 11:22 AM, Pierre Moreau wrote: > On 11:06 AM - Apr 15 2016, Ilia Mirkin wrote: >> On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau >> wrote: >> > Currently, every backlight interface created by Nouveau uses the same name, >> > nv_backlight. This leads to a sysfs warning as

Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-15 Thread Pierre Moreau
On 11:06 AM - Apr 15 2016, Ilia Mirkin wrote: > On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau wrote: > > Currently, every backlight interface created by Nouveau uses the same name, > > nv_backlight. This leads to a sysfs warning as it tries to create an already > > existing folder. This patch ad

Re: [Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-15 Thread Ilia Mirkin
On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau wrote: > Currently, every backlight interface created by Nouveau uses the same name, > nv_backlight. This leads to a sysfs warning as it tries to create an already > existing folder. This patch adds a incremented number to the name, but keeps > the i

[Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces

2016-04-15 Thread Pierre Moreau
Currently, every backlight interface created by Nouveau uses the same name, nv_backlight. This leads to a sysfs warning as it tries to create an already existing folder. This patch adds a incremented number to the name, but keeps the initial name as nv_backlight, to avoid possibly breaking userspac