Page MenuHomeFreeBSD

LinuxKPI: enable class dev_groups attributes
AcceptedPublic

Authored by hselasky on Sun, Sep 8, 2:35 PM.

Details

Summary

This is necessary for backlight in DRM/KMS drivers:

% sysctl sys.class.backlight
sys.class.backlight.intel_backlight.bl_device.type: raw
sys.class.backlight.intel_backlight.bl_device.max_brightness: 65535
sys.class.backlight.intel_backlight.bl_device.actual_brightness: 5000
sys.class.backlight.intel_backlight.bl_device.brightness: 5000
sys.class.backlight.intel_backlight.bl_device.bl_power: 0

(the corresponding kms-drm patch is just removing the ifdef __linux__'es in linux_backlight.c. well, replacing them with a __FreeBSD_version check once this lands and gets a version number)

I think I've added the create_groups in the right place… it works, anyway :)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 26612

Event Timeline

imp accepted this revision.Sat, Sep 21, 10:17 PM

Seems fine to me. Does this cause an issue for other users of LinuxKPI?

This revision is now accepted and ready to land.Sat, Sep 21, 10:17 PM
hselasky accepted this revision.Sun, Sep 22, 6:13 AM

I'll take it.

hselasky commandeered this revision.Sun, Sep 22, 6:40 AM
hselasky updated this revision to Diff 62411.
hselasky edited reviewers, added: greg_unrelenting.technology; removed: hselasky.

Found some bugs in the patch. Can you re-test? Also re-loading kernel module?

This revision now requires review to proceed.Sun, Sep 22, 6:41 AM

oh, i915 is reloadable, right. Everything works fine, can adjust brightness after reloading.

sys/compat/linuxkpi/common/include/linux/sysfs.h
63

why remove the comment? :)

This revision is now accepted and ready to land.Sun, Sep 22, 11:57 AM