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