[Nouveau] [PATCH 1/2] nouveau/bl: Assign different names to interfaces
Nick Tenney
nick.tenney at gmail.com
Fri Apr 15 18:40:18 UTC 2016
On Fri, Apr 15, 2016 at 11:25 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Fri, Apr 15, 2016 at 11:22 AM, Pierre Moreau <pierre.morrow at free.fr>
> wrote:
> > On 11:06 AM - Apr 15 2016, Ilia Mirkin wrote:
> >> On Fri, Apr 15, 2016 at 10:57 AM, Pierre Moreau <pierre.morrow at free.fr>
> 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 initial name as nv_backlight, to avoid possibly breaking
> userspace; the
> >> > second interface will be named nv_backlight1, and so on.
> >> >
> >> > Fixes: fdo#86539
>
I believe Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86539 is
the preferred format. I think this is picked up by the mesa release scripts
or some such.
> >> > Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> >> > ---
> >> > drm/nouveau/nouveau_backlight.c | 35
> +++++++++++++++++++++++++++++++++--
> >> > 1 file changed, 33 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drm/nouveau/nouveau_backlight.c
> b/drm/nouveau/nouveau_backlight.c
> >> > index 89eb460..914e2cb 100644
> >> > --- a/drm/nouveau/nouveau_backlight.c
> >> > +++ b/drm/nouveau/nouveau_backlight.c
> >> > @@ -36,6 +36,10 @@
> >> > #include "nouveau_reg.h"
> >> > #include "nouveau_encoder.h"
> >> >
> >> > +static atomic_t bl_interfaces_nb = { 0 };
> >>
> >> static data is initialized to 0, this should be unnecessary.
> >
> > I didn’t know that. But on the other hand, I like having it explicit,
> and it
> > should not add any overhead.
>
> It increases the size of the object file. I believe it's kernel policy
> to avoid static initializations to 0. (Note that this doesn't hold in
> regular user applications, just the kernel.)
>
> -ilia
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160415/8b33c66f/attachment-0001.html>
More information about the dri-devel
mailing list