Re: Notifications about ACPI events in userspace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12.05.2017 12:06, Lukas Wunner wrote:
> On Fri, May 12, 2017 at 10:37:47AM +0200, Florian Echtler wrote:
>> I'm currently adding support for the iMac's target display mode (TDM) to
>> Linux.
> 
> Cool!

:-)

>> However, I'm not seeing anything happening with either acpi_listen or
>> kacpimon.
>> Does this require any kernel changes, or could I subscribe to these
>> events somehow?
> 
> You can subscribe to these events by calling acpi_install_notify_handler().
> See drivers/platform/x86/apple-gmux.c for an example.  That's a driver for
> APP000B, a custom chip found on dual-GPU MacBook Pros dubbed GMUX which is
> responsible for multiplexing the panel between the GPUs.

OK, but this has to happen in a kernel context, correct? No way to see these
from userspace?

> I'm not sure what APP000C is, could be a similar custom controller, I'd have
> to do some research first to know what it does.  Surely "DP" stands for
> DisplayPort, but what does "PT" stand for?

I'm guessing DPPT is for "DisPlayPorT". As far as I could tell, it's just a stub
for receiving the Notify() calls; the actual source switching is handled by
writing to SMC keys.

> Perhaps apple-gmux.c could serve as a template for an APP000C driver.
> The code should be easy to understand, if you have questions just ask away.

Since I need to modify the applesmc.c driver anyway, it would probably make
sense to integrate the notify handler there?

The other approach would be to write a dedicated TDM module, but I'm not sure
how to access the SMC, then...

Best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux