Page MenuHomeFreeBSD

linuxkpi: Add backlight support
ClosedPublic

Authored by manu on Aug 31 2020, 2:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 1:06 AM
Unknown Object (File)
Wed, Nov 13, 2:37 AM
Unknown Object (File)
Oct 4 2024, 7:10 PM
Unknown Object (File)
Oct 1 2024, 7:42 AM
Unknown Object (File)
Sep 30 2024, 2:48 AM
Unknown Object (File)
Sep 23 2024, 8:45 AM
Unknown Object (File)
Sep 5 2024, 7:24 PM
Unknown Object (File)
Sep 5 2024, 5:11 PM

Details

Summary

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.

Sponsored-by: The FreeBSD Foundation.

Test Plan

Tested using https://github.com/freebsd/drm-kmod/tree/backlight on intel and amd laptop.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

manu requested review of this revision.Aug 31 2020, 2:56 PM
manu added a parent revision: D26250: Add backlight subsystem.
manu edited the test plan for this revision. (Show Details)
manu added a subscriber: zeising.

Remove changes that should have been part of D26250

Nice work!
How is the backlight adjustments exposed to users?
Do we need to change drm-current-kmod?

sys/compat/linuxkpi/common/include/linux/backlight.h
32–33

Should this be _LINUX_BACKLIGHT_H_ ?

93

I think you should add something like
/* !_LINUX_BACKLIGHT_H */ here

Nice work!
How is the backlight adjustments exposed to users?

See https://reviews.freebsd.org/D26251

Do we need to change drm-current-kmod?

Yes I think so, I'll not commit before making a PR (if required).

sys/compat/linuxkpi/common/include/linux/backlight.h
32–33

Yeah, I'll update

93

It's not needed but indeed better.

This revision is now accepted and ready to land.Aug 31 2020, 4:09 PM
sys/compat/linuxkpi/common/include/linux/backlight.h
77

Please use function macros here !

This revision now requires review to proceed.Sep 3 2020, 12:35 PM
sys/modules/linuxkpi/Makefile
26

I think backlight_if.h should be added to LINUXKPI_GENSRCS definition in

sys/conf/kmod.mk:LINUXKPI_GENSRCS

hselasky added inline comments.
sys/modules/linuxkpi/Makefile
26

Forget that. It is only used when building the LinuxKPI!

This revision is now accepted and ready to land.Sep 3 2020, 12:44 PM

Add backlight_if.h to LINUXKPI_GENSRC variable.

This revision now requires review to proceed.Sep 3 2020, 12:45 PM

No this is the right place for _if.h files.

manu marked 3 inline comments as done.Sep 3 2020, 12:48 PM
This revision is now accepted and ready to land.Sep 3 2020, 12:51 PM

Add support for GETINFO and free backlight data.

This revision now requires review to proceed.Sep 16 2020, 4:33 PM

Don't forget to bump the FreeBSD KERNEL version after this.

This revision is now accepted and ready to land.Sep 16 2020, 5:17 PM