Page MenuHomeFreeBSD

linuxkpi: Add backlight support
ClosedPublic

Authored by manu on Aug 31 2020, 2:56 PM.

Details

Reviewers
hselasky
emaste
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
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
31–32

Should this be _LINUX_BACKLIGHT_H_ ?

92

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
31–32

Yeah, I'll update

92

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 ↗(On Diff #76592)

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 ↗(On Diff #76592)

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