Re: [External] Re: [PATCH v4 3/3] platform/x86: thinkpad_acpi: Add platform profile support

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

 



Hi Barnabas,

On 2020-11-27 2:22 p.m., Barnabás Pőcze wrote:
Hi


2020. november 26., csütörtök 17:51 keltezéssel, Mark Pearson írta:

[...]
+static bool dytc_ignore_next_event;

As a sidenote: can the profile switching be triggered by means that's not the
`/sys/firmware/acpi/platform_profile` attribute (e.g. a physical button)?
Because if so, then I'm not sure if `dytc_ignore_next_event` achieves its purpose
robustly, although I believe it won't cause issues in practice. I think it could
be made more robust using a mutex to serialize and synchronize access to the DYTC
interface, but I'm not sure if the effort is worth it.


A user can do FN+L, FN+M, FN+H to switch mode (though hopefully with this API and the support in user space they won't need to do that any more).

So I think you're right about this area having issues, and Hans picks up on this too. I had avoided a mutex as I thought that would cause problems in the event handler. In Han's email he suggests an atomic int and I think that could work nicely but will have to try it out and see.

Regardless - I agree this area needs some work and I'll look into it

Thanks!
Mark




[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