Page MenuHomeFreeBSD

LinuxKPI: Implement ACPI bits required by drm-kmod in base system.
AcceptedPublic

Authored by wulf on Wed, Sep 30, 10:34 AM.

Details

Reviewers
hselasky
manu
kib
Summary

It includes:

ACPI_HANDLE() implementation.
AC and VIDEO ACPI events notification support.
Replacement of hand-rolled GPLed _DSM method evaluation helpers with in-base ones.
General cleanup of ACPI headers (based on previous @manu work in 5.4-cleanup-lkpi branch)

Depends on https://reviews.freebsd.org/D26602

Required drm-kmod changes: https://github.com/freebsd/drm-kmod/pull/30 (5.4-cleanup-lkpi branch)

Test Plan

Try to run it on amd gpu. My intel laptops do not have DSM functions. Moreover ACPI events handler in i915kms driver is a stub.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

wulf requested review of this revision.Wed, Sep 30, 10:35 AM
hselasky added inline comments.
sys/compat/linuxkpi/common/include/acpi/acpi.h
45

If these are functions, use function macros, to narrow down the matching scope.

Thanks,
That looks good at first glance, will do a better review later this week.
This will need a FreeBSD_version bump so we can check it in the drm-kmods code.
Thanks for doing that, I'm glad I didn't started this work after cleaning the unneeded bits in drm-kmod :)

Use static inline functions instead of preprocessor #define's to rename ACPICA methods.

Add workaround for BOOLEAN type leaked from FreeBSD ACPICA to drm-kmod. It can break amdgpu compilation.

wulf marked an inline comment as done.Wed, Sep 30, 9:53 PM

Make sure this code compiles for all platforms we have before committing. Not only amd64 and aarch64.

This revision is now accepted and ready to land.Thu, Oct 1, 7:16 AM

LGTM too.
Please bump __FreeBSD_version and please sync with me before commiting to base so I can merge in drm-kmod and update the ports quickly.
Thanks.