Page MenuHomeFreeBSD

LinuxKPI: enable class dev_groups attributes
ClosedPublic

Authored by hselasky on Sep 8 2019, 2:35 PM.
Tags
None
Referenced Files
F55806566: D21564.diff
Fri, Feb 3, 5:31 PM
Unknown Object (File)
Sun, Jan 22, 6:29 PM
Unknown Object (File)
Sun, Jan 22, 6:29 PM
Unknown Object (File)
Sun, Jan 22, 6:29 PM
Unknown Object (File)
Sun, Jan 22, 6:24 PM
Unknown Object (File)
Tue, Jan 17, 12:14 AM
Unknown Object (File)
Sat, Jan 7, 10:45 AM
Unknown Object (File)
Dec 27 2022, 3:32 PM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

This revision is now accepted and ready to land.Sep 21 2019, 10:17 PM
hselasky updated this revision to Diff 62411.
hselasky edited reviewers, added: val_packett.cool; removed: hselasky.

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

This revision now requires review to proceed.Sep 22 2019, 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 ↗(On Diff #62411)

why remove the comment? :)

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

Who will submit this patch?

Who will submit this patch?

I'm not sure what this means exactly? Submit to where? You mean listed as submitter in the commit message? Doesn't matter, you don't have to say it was me :D