diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-04 18:26:54 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-08-02 16:10:13 +0200 |
commit | dc171114926ec390ab90f46534545420ec03e458 (patch) | |
tree | 73351a37033a0cdee492d098bb935c215edcfc4b /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) |
ACPI: EC: Do not release locks during operation region accesses
It is not particularly useful to release locks (the EC mutex and the
ACPI global lock, if present) and re-acquire them immediately thereafter
during EC address space accesses in acpi_ec_space_handler().
First, releasing them for a while before grabbing them again does not
really help anyone because there may not be enough time for another
thread to acquire them.
Second, if another thread successfully acquires them and carries out
a new EC write or read in the middle if an operation region access in
progress, it may confuse the EC firmware, especially after the burst
mode has been enabled.
Finally, manipulating the locks after writing or reading every single
byte of data is overhead that it is better to avoid.
Accordingly, modify the code to carry out EC address space accesses
entirely without releasing the locks.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/12473338.O9o76ZdvQC@rjwysocki.net
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h')
0 files changed, 0 insertions, 0 deletions