Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-24 Thread Warner Losh
On Sat, Oct 24, 2020 at 9:38 AM Kyle Evans  wrote:

> On Sat, Oct 24, 2020 at 4:52 AM Hans Petter Selasky 
> wrote:
> >
> > On 2020-10-24 02:13, Warner Losh wrote:
> > > I was going to suggest and try this change, but life has been
> complicated...
> > >
> > > Has it been committed?
> > >
> >
> > No, not yet.
> >
> > --HPS
> >
>
> I went ahead and did so: r367004
>

Excellent. I was going to do that, but you committed exactly what I was
going to.

Warner
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-24 Thread Kyle Evans
On Sat, Oct 24, 2020 at 4:52 AM Hans Petter Selasky  wrote:
>
> On 2020-10-24 02:13, Warner Losh wrote:
> > I was going to suggest and try this change, but life has been complicated...
> >
> > Has it been committed?
> >
>
> No, not yet.
>
> --HPS
>

I went ahead and did so: r367004
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-24 Thread Hans Petter Selasky

On 2020-10-24 02:13, Warner Losh wrote:

I was going to suggest and try this change, but life has been complicated...

Has it been committed?



No, not yet.

--HPS

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-23 Thread Warner Losh
I was going to suggest and try this change, but life has been complicated...

Has it been committed?

Warner

On Thu, Oct 22, 2020, 1:43 PM Kyle Evans  wrote:

> On Thu, Oct 22, 2020 at 2:35 PM Niclas Zeising 
> wrote:
> >
> > On 2020-10-22 15:22, Kyle Evans wrote:
> > > On Sat, Oct 17, 2020 at 11:40 AM Warner Losh  wrote:
> > >>
> > >>
> > >>
> > >> On Sat, Oct 17, 2020, 10:11 AM Alexander V. Chernikov <
> melif...@ipfw.ru> wrote:
> > >>>
> > >>> 17.10.2020, 14:07, "Hans Petter Selasky" :
> > >>>
> > >>> On 2020-10-17 14:34, Alexander V. Chernikov wrote:
> > >>>
> > >>>   17.10.2020, 12:32, "Hans Petter Selasky" :
> > >>>
> > >>>On 2020-10-17 13:27, Alexander V. Chernikov wrote:
> > >>>
> > >>>  02.10.2020, 19:26, "Emmanuel Vadot"  > >>>>:
> > >>>
> > >>>   Author: manu
> > >>>   Date: Fri Oct 2 18:26:41 2020
> > >>>   New Revision: 366372
> > >>>   URL:
> https://svnweb.freebsd.org/changeset/base/366372
> > >>>
> > >>>   Log:
> > >>>  linuxkpi: Add backlight support
> > >>>
> > >>>  Add backlight function to linuxkpi.
> > >>>  Graphics drivers expose the backlight of the
> panel directly so
> > >>>allow them
> > >>>   to use the backlight subsystem so
> > >>>  user can use backlight(8) to configure them.
> > >>>
> > >>>  Reviewed by: hselasky
> > >>>  Relnotes: yes
> > >>>  Differential Revision: The FreeBSD Foundation
> > >>>
> > >>>   Added:
> > >>>
> head/sys/compat/linuxkpi/common/include/linux/backlight.h
> > >>>(contents,
> > >>>   props changed)
> > >>>   Modified:
> > >>>
> head/sys/compat/linuxkpi/common/include/linux/device.h
> > >>>  head/sys/compat/linuxkpi/common/src/linux_kmod.c
> > >>>  head/sys/compat/linuxkpi/common/src/linux_pci.c
> > >>>  head/sys/conf/kmod.mk
> > >>>
> > >>>  It breaks the build for me with
> > >>>
> /usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
> > >>>  fatal error: 'backlight_if.h' file not found
> > >>>
> > >>>
> > >>>How do you build? Doesn't break over here.
> > >>>
> > >>>   GENERIC + COMPAT_LINUXKPI.
> > >>>
> > >>>
> > >>>
> > >>> Try adding:
> > >>>
> > >>> options backlight
> > >>>
> > >>> To the kernel config.
> > >>>
> > >>> Yep, thank you!
> > >>> Maybe it's worth considering adding static assert with the message
> describing this dependency?
> > >>
> > >>
> > >> Yes. It likely is worth doing something to highlight this issue.
> > >>
> > >> Warner
> > >>
> > >
> > > I think we just need to slap the two core backlight files with an ` |
> > > compat_linux` so that they simply get pulled in if you specify
> > > COMPAT_LINUX. config(8) handles this terribly, configng must have a
> > > better provides/requires/implies/whatever functionality so we can
> > > specify that compat_linux implies backlight and not do crud like this
> > > where it becomes more complicated to see what any given option really
> > > entails.
> > >
> > > Thanks,
> >
> > COMPAT_LINUX can't be right.  Isn't that the linuxolator?
> > Regards
> > --
> > Niclas Zeising
>
> Whoops, s/LINUX/LINUXKPI/
>
> :-)
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-22 Thread Kyle Evans
On Thu, Oct 22, 2020 at 2:35 PM Niclas Zeising  wrote:
>
> On 2020-10-22 15:22, Kyle Evans wrote:
> > On Sat, Oct 17, 2020 at 11:40 AM Warner Losh  wrote:
> >>
> >>
> >>
> >> On Sat, Oct 17, 2020, 10:11 AM Alexander V. Chernikov  
> >> wrote:
> >>>
> >>> 17.10.2020, 14:07, "Hans Petter Selasky" :
> >>>
> >>> On 2020-10-17 14:34, Alexander V. Chernikov wrote:
> >>>
> >>>   17.10.2020, 12:32, "Hans Petter Selasky" :
> >>>
> >>>On 2020-10-17 13:27, Alexander V. Chernikov wrote:
> >>>
> >>>  02.10.2020, 19:26, "Emmanuel Vadot"  >>>>:
> >>>
> >>>   Author: manu
> >>>   Date: Fri Oct 2 18:26:41 2020
> >>>   New Revision: 366372
> >>>   URL: https://svnweb.freebsd.org/changeset/base/366372
> >>>
> >>>   Log:
> >>>  linuxkpi: Add backlight support
> >>>
> >>>  Add backlight function to linuxkpi.
> >>>  Graphics drivers expose the backlight of the panel 
> >>> directly so
> >>>allow them
> >>>   to use the backlight subsystem so
> >>>  user can use backlight(8) to configure them.
> >>>
> >>>  Reviewed by: hselasky
> >>>  Relnotes: yes
> >>>  Differential Revision: The FreeBSD Foundation
> >>>
> >>>   Added:
> >>>  
> >>> head/sys/compat/linuxkpi/common/include/linux/backlight.h
> >>>(contents,
> >>>   props changed)
> >>>   Modified:
> >>>  
> >>> head/sys/compat/linuxkpi/common/include/linux/device.h
> >>>  head/sys/compat/linuxkpi/common/src/linux_kmod.c
> >>>  head/sys/compat/linuxkpi/common/src/linux_pci.c
> >>>  head/sys/conf/kmod.mk
> >>>
> >>>  It breaks the build for me with
> >>>  
> >>> /usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
> >>>  fatal error: 'backlight_if.h' file not found
> >>>
> >>>
> >>>How do you build? Doesn't break over here.
> >>>
> >>>   GENERIC + COMPAT_LINUXKPI.
> >>>
> >>>
> >>>
> >>> Try adding:
> >>>
> >>> options backlight
> >>>
> >>> To the kernel config.
> >>>
> >>> Yep, thank you!
> >>> Maybe it's worth considering adding static assert with the message 
> >>> describing this dependency?
> >>
> >>
> >> Yes. It likely is worth doing something to highlight this issue.
> >>
> >> Warner
> >>
> >
> > I think we just need to slap the two core backlight files with an ` |
> > compat_linux` so that they simply get pulled in if you specify
> > COMPAT_LINUX. config(8) handles this terribly, configng must have a
> > better provides/requires/implies/whatever functionality so we can
> > specify that compat_linux implies backlight and not do crud like this
> > where it becomes more complicated to see what any given option really
> > entails.
> >
> > Thanks,
>
> COMPAT_LINUX can't be right.  Isn't that the linuxolator?
> Regards
> --
> Niclas Zeising

Whoops, s/LINUX/LINUXKPI/

:-)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-22 Thread Niclas Zeising

On 2020-10-22 15:22, Kyle Evans wrote:

On Sat, Oct 17, 2020 at 11:40 AM Warner Losh  wrote:




On Sat, Oct 17, 2020, 10:11 AM Alexander V. Chernikov  wrote:


17.10.2020, 14:07, "Hans Petter Selasky" :

On 2020-10-17 14:34, Alexander V. Chernikov wrote:

  17.10.2020, 12:32, "Hans Petter Selasky" :

   On 2020-10-17 13:27, Alexander V. Chernikov wrote:

 02.10.2020, 19:26, "Emmanuel Vadot" mailto:m...@freebsd.org>>:

  Author: manu
  Date: Fri Oct 2 18:26:41 2020
  New Revision: 366372
  URL: https://svnweb.freebsd.org/changeset/base/366372

  Log:
 linuxkpi: Add backlight support

 Add backlight function to linuxkpi.
 Graphics drivers expose the backlight of the panel 
directly so
   allow them
  to use the backlight subsystem so
 user can use backlight(8) to configure them.

 Reviewed by: hselasky
 Relnotes: yes
 Differential Revision: The FreeBSD Foundation

  Added:
 head/sys/compat/linuxkpi/common/include/linux/backlight.h
   (contents,
  props changed)
  Modified:
 head/sys/compat/linuxkpi/common/include/linux/device.h
 head/sys/compat/linuxkpi/common/src/linux_kmod.c
 head/sys/compat/linuxkpi/common/src/linux_pci.c
 head/sys/conf/kmod.mk

 It breaks the build for me with
 
/usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
 fatal error: 'backlight_if.h' file not found


   How do you build? Doesn't break over here.

  GENERIC + COMPAT_LINUXKPI.



Try adding:

options backlight

To the kernel config.

Yep, thank you!
Maybe it's worth considering adding static assert with the message describing 
this dependency?



Yes. It likely is worth doing something to highlight this issue.

Warner



I think we just need to slap the two core backlight files with an ` |
compat_linux` so that they simply get pulled in if you specify
COMPAT_LINUX. config(8) handles this terribly, configng must have a
better provides/requires/implies/whatever functionality so we can
specify that compat_linux implies backlight and not do crud like this
where it becomes more complicated to see what any given option really
entails.

Thanks,


COMPAT_LINUX can't be right.  Isn't that the linuxolator?
Regards
--
Niclas Zeising
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-22 Thread Kyle Evans
On Sat, Oct 17, 2020 at 11:40 AM Warner Losh  wrote:
>
>
>
> On Sat, Oct 17, 2020, 10:11 AM Alexander V. Chernikov  
> wrote:
>>
>> 17.10.2020, 14:07, "Hans Petter Selasky" :
>>
>> On 2020-10-17 14:34, Alexander V. Chernikov wrote:
>>
>>  17.10.2020, 12:32, "Hans Petter Selasky" :
>>
>>   On 2020-10-17 13:27, Alexander V. Chernikov wrote:
>>
>> 02.10.2020, 19:26, "Emmanuel Vadot" >   >:
>>
>>  Author: manu
>>  Date: Fri Oct 2 18:26:41 2020
>>  New Revision: 366372
>>  URL: https://svnweb.freebsd.org/changeset/base/366372
>>
>>  Log:
>> linuxkpi: Add backlight support
>>
>> Add backlight function to linuxkpi.
>> Graphics drivers expose the backlight of the panel 
>> directly so
>>   allow them
>>  to use the backlight subsystem so
>> user can use backlight(8) to configure them.
>>
>> Reviewed by: hselasky
>> Relnotes: yes
>> Differential Revision: The FreeBSD Foundation
>>
>>  Added:
>> head/sys/compat/linuxkpi/common/include/linux/backlight.h
>>   (contents,
>>  props changed)
>>  Modified:
>> head/sys/compat/linuxkpi/common/include/linux/device.h
>> head/sys/compat/linuxkpi/common/src/linux_kmod.c
>> head/sys/compat/linuxkpi/common/src/linux_pci.c
>> head/sys/conf/kmod.mk
>>
>> It breaks the build for me with
>> 
>> /usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
>> fatal error: 'backlight_if.h' file not found
>>
>>
>>   How do you build? Doesn't break over here.
>>
>>  GENERIC + COMPAT_LINUXKPI.
>>
>>
>>
>> Try adding:
>>
>> options backlight
>>
>> To the kernel config.
>>
>> Yep, thank you!
>> Maybe it's worth considering adding static assert with the message 
>> describing this dependency?
>
>
> Yes. It likely is worth doing something to highlight this issue.
>
> Warner
>

I think we just need to slap the two core backlight files with an ` |
compat_linux` so that they simply get pulled in if you specify
COMPAT_LINUX. config(8) handles this terribly, configng must have a
better provides/requires/implies/whatever functionality so we can
specify that compat_linux implies backlight and not do crud like this
where it becomes more complicated to see what any given option really
entails.

Thanks,

Kyle Evans
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Sean Bruno
>> sbruno@alice:~ % pkg info |grep kmod
>> drm-current-kmod-4.16.g20200320 DRM modules for the linuxkpi-based KMS
>> components
>> drm-kmod-g20190710 Metaport of DRM modules for the
>> linuxkpi-based KMS components
>> gpu-firmware-kmod-g20200503    Firmware modules for the linuxkpi-based
>> KMS components
> 
> You may want to have to update this to recent and try again;  if that
> still breaks I assume either Hans or I will be happy to help until manu
> is back.
> 
> I’d assume with more linuxkpi bits implemented in HEAD the conflicts in
> head will stay … and port/package updates will have to happen once in a
> while (*).
> 
> https://svnweb.freebsd.org/base?view=revision=366374
> https://svnweb.freebsd.org/ports?view=revision=551266
> 
> /bz
> 
> (*) manu is making sure that after the commit to head the new port keeps
> compiling with older kernels for a while using __FreeBSD_version; I may
> have a partial solution that might allow us to update the port first but
> neither won’t help with old ports like in this case.
> 

I think its fair to tell people like me who update -current every couple
of months to update more frequently or pop something into the top of
-current reminding them that they need to keep up.  :-)

For now, I'm rebuilding my poudriere jail and will update my pkg's to
ports-HEAD then retry the updates.  I don't think you folks should spend
too much time on it.

sean



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Bjoern A. Zeeb

On 17 Oct 2020, at 20:48, Sean Bruno wrote:


Same buildfailure with GENERIC-NODEBUG.


Seems different.



https://people.freebsd.org/~sbruno/backlight.txt


HEAD with which version of the drm port/package?

/bz


sbruno@alice:~ % pkg info |grep kmod
drm-current-kmod-4.16.g20200320 DRM modules for the linuxkpi-based KMS
components
drm-kmod-g20190710 Metaport of DRM modules for the
linuxkpi-based KMS components
gpu-firmware-kmod-g20200503Firmware modules for the linuxkpi-based
KMS components


You may want to have to update this to recent and try again;  if that 
still breaks I assume either Hans or I will be happy to help until manu 
is back.


I’d assume with more linuxkpi bits implemented in HEAD the conflicts 
in head will stay … and port/package updates will have to happen once 
in a while (*).


https://svnweb.freebsd.org/base?view=revision=366374
https://svnweb.freebsd.org/ports?view=revision=551266

/bz

(*) manu is making sure that after the commit to head the new port keeps 
compiling with older kernels for a while using __FreeBSD_version; I may 
have a partial solution that might allow us to update the port first but 
neither won’t help with old ports like in this case.


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Sean Bruno

>> Same buildfailure with GENERIC-NODEBUG.
> 
> Seems different.
> 
> 
>> https://people.freebsd.org/~sbruno/backlight.txt
> 
> HEAD with which version of the drm port/package?
> 
> /bz

sbruno@alice:~ % pkg info |grep kmod
drm-current-kmod-4.16.g20200320 DRM modules for the linuxkpi-based KMS
components
drm-kmod-g20190710 Metaport of DRM modules for the
linuxkpi-based KMS components
gpu-firmware-kmod-g20200503Firmware modules for the linuxkpi-based
KMS components

> 
> 



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Bjoern A. Zeeb

On 17 Oct 2020, at 20:14, Sean Bruno wrote:


On 2020-10-17 05:27, Alexander V. Chernikov wrote:

02.10.2020, 19:26, "Emmanuel Vadot" :

Author: manu
Date: Fri Oct 2 18:26:41 2020
New Revision: 366372
URL: https://svnweb.freebsd.org/changeset/base/366372

Log:
  linuxkpi: Add backlight support
  
  Add backlight function to linuxkpi.
  Graphics drivers expose the backlight of the panel directly 
so

allow them to use the backlight subsystem so
  user can use backlight(8) to configure them.
  
  Reviewed by: hselasky
  Relnotes: yes
  Differential Revision: The FreeBSD Foundation

Added:
  head/sys/compat/linuxkpi/common/include/linux/backlight.h
(contents, props changed)
Modified:
  head/sys/compat/linuxkpi/common/include/linux/device.h
  head/sys/compat/linuxkpi/common/src/linux_kmod.c
  head/sys/compat/linuxkpi/common/src/linux_pci.c
  head/sys/conf/kmod.mk

It breaks the build for me with
 
/usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
fatal error: 'backlight_if.h' file not found




Same buildfailure with GENERIC-NODEBUG.


Seems different.



https://people.freebsd.org/~sbruno/backlight.txt


HEAD with which version of the drm port/package?

/bz


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Hans Petter Selasky

On 2020-10-17 22:14, Sean Bruno wrote:

On 2020-10-17 05:27, Alexander V. Chernikov wrote:

02.10.2020, 19:26, "Emmanuel Vadot" :

 Author: manu
 Date: Fri Oct 2 18:26:41 2020
 New Revision: 366372
 URL: https://svnweb.freebsd.org/changeset/base/366372

 Log:
   linuxkpi: Add backlight support
   
   Add backlight function to linuxkpi.

   Graphics drivers expose the backlight of the panel directly so
 allow them to use the backlight subsystem so
   user can use backlight(8) to configure them.
   
   Reviewed by: hselasky

   Relnotes: yes
   Differential Revision: The FreeBSD Foundation

 Added:
   head/sys/compat/linuxkpi/common/include/linux/backlight.h
 (contents, props changed)
 Modified:
   head/sys/compat/linuxkpi/common/include/linux/device.h
   head/sys/compat/linuxkpi/common/src/linux_kmod.c
   head/sys/compat/linuxkpi/common/src/linux_pci.c
   head/sys/conf/kmod.mk

It breaks the build for me with
  
/usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:

fatal error: 'backlight_if.h' file not found




Same buildfailure with GENERIC-NODEBUG.


I'll have a look at it tomorrow.

I think Emmanuel is OOO this week.

--HPS
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Sean Bruno


On 2020-10-17 05:27, Alexander V. Chernikov wrote:
> 02.10.2020, 19:26, "Emmanuel Vadot" :
> 
> Author: manu
> Date: Fri Oct 2 18:26:41 2020
> New Revision: 366372
> URL: https://svnweb.freebsd.org/changeset/base/366372
> 
> Log:
>   linuxkpi: Add backlight support
>   
>   Add backlight function to linuxkpi.
>   Graphics drivers expose the backlight of the panel directly so
> allow them to use the backlight subsystem so
>   user can use backlight(8) to configure them.
>   
>   Reviewed by: hselasky
>   Relnotes: yes
>   Differential Revision: The FreeBSD Foundation
> 
> Added:
>   head/sys/compat/linuxkpi/common/include/linux/backlight.h
> (contents, props changed)
> Modified:
>   head/sys/compat/linuxkpi/common/include/linux/device.h
>   head/sys/compat/linuxkpi/common/src/linux_kmod.c
>   head/sys/compat/linuxkpi/common/src/linux_pci.c
>   head/sys/conf/kmod.mk
> 
> It breaks the build for me with
>  
> /usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
> fatal error: 'backlight_if.h' file not found
> 
> 

Same buildfailure with GENERIC-NODEBUG.

sean


https://people.freebsd.org/~sbruno/backlight.txt



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Warner Losh
On Sat, Oct 17, 2020, 10:11 AM Alexander V. Chernikov 
wrote:

> 17.10.2020, 14:07, "Hans Petter Selasky" :
>
> On 2020-10-17 14:34, Alexander V. Chernikov wrote:
>
>  17.10.2020, 12:32, "Hans Petter Selasky" :
>
>   On 2020-10-17 13:27, Alexander V. Chernikov wrote:
>
> 02.10.2020, 19:26, "Emmanuel Vadot">:
>
>  Author: manu
>  Date: Fri Oct 2 18:26:41 2020
>  New Revision: 366372
>  URL: https://svnweb.freebsd.org/changeset/base/366372
>
>  Log:
> linuxkpi: Add backlight support
>
> Add backlight function to linuxkpi.
> Graphics drivers expose the backlight of the panel
> directly so
>   allow them
>  to use the backlight subsystem so
> user can use backlight(8) to configure them.
>
> Reviewed by: hselasky
> Relnotes: yes
> Differential Revision: The FreeBSD Foundation
>
>  Added:
>
> head/sys/compat/linuxkpi/common/include/linux/backlight.h
>   (contents,
>  props changed)
>  Modified:
> head/sys/compat/linuxkpi/common/include/linux/device.h
> head/sys/compat/linuxkpi/common/src/linux_kmod.c
> head/sys/compat/linuxkpi/common/src/linux_pci.c
> head/sys/conf/kmod.mk
>
> It breaks the build for me with
>
> 
> /usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
> fatal error: 'backlight_if.h' file not found
>
>
>   How do you build? Doesn't break over here.
>
>  GENERIC + COMPAT_LINUXKPI.
>
>
>
> Try adding:
>
> options backlight
>
> To the kernel config.
>
> Yep, thank you!
> Maybe it's worth considering adding static assert with the message
> describing this dependency?
>

Yes. It likely is worth doing something to highlight this issue.

Warner


--HPS
>
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Alexander V . Chernikov


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Hans Petter Selasky

On 2020-10-17 14:34, Alexander V. Chernikov wrote:

17.10.2020, 12:32, "Hans Petter Selasky" :

 On 2020-10-17 13:27, Alexander V. Chernikov wrote:

   02.10.2020, 19:26, "Emmanuel Vadot" mailto:m...@freebsd.org>>:

Author: manu
Date: Fri Oct 2 18:26:41 2020
New Revision: 366372
URL: https://svnweb.freebsd.org/changeset/base/366372

Log:
   linuxkpi: Add backlight support

   Add backlight function to linuxkpi.
   Graphics drivers expose the backlight of the panel directly 
so
 allow them
to use the backlight subsystem so
   user can use backlight(8) to configure them.

   Reviewed by: hselasky
   Relnotes: yes
   Differential Revision: The FreeBSD Foundation

Added:
   head/sys/compat/linuxkpi/common/include/linux/backlight.h
 (contents,
props changed)
Modified:
   head/sys/compat/linuxkpi/common/include/linux/device.h
   head/sys/compat/linuxkpi/common/src/linux_kmod.c
   head/sys/compat/linuxkpi/common/src/linux_pci.c
   head/sys/conf/kmod.mk

   It breaks the build for me with
   
/usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
   fatal error: 'backlight_if.h' file not found


 How do you build? Doesn't break over here.

GENERIC + COMPAT_LINUXKPI.



Try adding:

options backlight

To the kernel config.

--HPS

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Alexander V . Chernikov


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Hans Petter Selasky

On 2020-10-17 13:27, Alexander V. Chernikov wrote:

02.10.2020, 19:26, "Emmanuel Vadot" :

 Author: manu
 Date: Fri Oct 2 18:26:41 2020
 New Revision: 366372
 URL: https://svnweb.freebsd.org/changeset/base/366372

 Log:
linuxkpi: Add backlight support

Add backlight function to linuxkpi.
Graphics drivers expose the backlight of the panel directly so allow 
them
 to use the backlight subsystem so
user can use backlight(8) to configure them.

Reviewed by: hselasky
Relnotes: yes
Differential Revision: The FreeBSD Foundation

 Added:
head/sys/compat/linuxkpi/common/include/linux/backlight.h (contents,
 props changed)
 Modified:
head/sys/compat/linuxkpi/common/include/linux/device.h
head/sys/compat/linuxkpi/common/src/linux_kmod.c
head/sys/compat/linuxkpi/common/src/linux_pci.c
head/sys/conf/kmod.mk

It breaks the build for me with
/usr/home/melifaro/free/head/sys/compat/linuxkpi/common/src/linux_pci.c:70:10:
fatal error: 'backlight_if.h' file not found


How do you build? Doesn't break over here.

Maybe you need to do a clean first?

--HPS
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-17 Thread Alexander V . Chernikov


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r366372 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf

2020-10-02 Thread Emmanuel Vadot
Author: manu
Date: Fri Oct  2 18:26:41 2020
New Revision: 366372
URL: https://svnweb.freebsd.org/changeset/base/366372

Log:
  linuxkpi: Add backlight support
  
  Add backlight function to linuxkpi.
  Graphics drivers expose the backlight of the panel directly so allow them to 
use the backlight subsystem so
  user can use backlight(8) to configure them.
  
  Reviewed by:  hselasky
  Relnotes: yes
  Differential Revision:The FreeBSD Foundation

Added:
  head/sys/compat/linuxkpi/common/include/linux/backlight.h   (contents, props 
changed)
Modified:
  head/sys/compat/linuxkpi/common/include/linux/device.h
  head/sys/compat/linuxkpi/common/src/linux_kmod.c
  head/sys/compat/linuxkpi/common/src/linux_pci.c
  head/sys/conf/kmod.mk

Added: head/sys/compat/linuxkpi/common/include/linux/backlight.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/compat/linuxkpi/common/include/linux/backlight.h   Fri Oct  2 
18:26:41 2020(r366372)
@@ -0,0 +1,94 @@
+/*-
+ * Copyright (c) 2020 The FreeBSD Foundation
+ *
+ * This software was developed by Emmanuel Vadot under sponsorship
+ * from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LINUX_BACKLIGHT_H_
+#define _LINUX_BACKLIGHT_H_
+
+#include 
+
+struct backlight_device;
+
+enum backlight_type {
+   BACKLIGHT_RAW = 0,
+};
+
+struct backlight_properties {
+   int type;
+   int max_brightness;
+   int brightness;
+   int power;
+};
+
+enum backlight_notification {
+   BACKLIGHT_REGISTERED,
+   BACKLIGHT_UNREGISTERED,
+};
+
+enum backlight_update_reason {
+   BACKLIGHT_UPDATE_HOTKEY = 0
+};
+
+struct backlight_ops {
+   int options;
+#defineBL_CORE_SUSPENDRESUME   1
+   int (*update_status)(struct backlight_device *);
+   int (*get_brightness)(struct backlight_device *);
+};
+
+struct backlight_device {
+   const struct backlight_ops *ops;
+   struct backlight_properties props;
+   void *data;
+   struct device *dev;
+   char *name;
+};
+
+#define bl_get_data(bd) (bd)->data
+
+struct backlight_device *linux_backlight_device_register(const char *name,
+struct device *dev, void *data, const struct backlight_ops *ops, struct 
backlight_properties *props);
+void linux_backlight_device_unregister(struct backlight_device *bd);
+#definebacklight_device_register(name, dev, data, ops, props)  \
+   linux_backlight_device_register(name, dev, data, ops, props)
+#definebacklight_device_unregister(bd) 
linux_backlight_device_unregister(bd)
+
+static inline void
+backlight_update_status(struct backlight_device *bd)
+{
+   bd->ops->update_status(bd);
+}
+
+static inline void
+backlight_force_update(struct backlight_device *bd, int reason)
+{
+   bd->props.brightness = bd->ops->get_brightness(bd);
+}
+
+#endif /* _LINUX_BACKLIGHT_H_ */

Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
==
--- head/sys/compat/linuxkpi/common/include/linux/device.h  Fri Oct  2 
18:23:27 2020(r366371)
+++ head/sys/compat/linuxkpi/common/include/linux/device.h  Fri Oct  2 
18:26:41 2020(r366372)
@@ -41,9 +41,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
+#include 
 
 struct device;
 struct fwnode_handle;
@@ -114,6 +116,8 @@ struct device {
unsigned intirq_end;
const struct attribute_group **groups;
struct fwnode_handle *fwnode;
+   struct cdev *backlight_dev;
+   struct backlight_device *bd;