Repository navigation
[26.04_linux-nvidia-bos] NVIDIA: SAUCE: i2c: mt65xx: use the ACPI declared bus speed when no clock-frequency is given - #719
Conversation
…lock-frequency is given On ACPI platforms the controller node carries no "clock-frequency" property; the bus speed is declared by the peripherals in their I2cSerialBus resources. The driver only looked at the controller property and fell back to standard mode, so every bus ran at 100 kHz regardless of what the peripherals asked for (1 MHz for the touchscreen digitizer, 400 kHz for the keyboard and touchpad on the reference laptops). At 100 kHz the host cannot keep up with a high report rate HID device such as a pen digitizer; the device buffers its reports and the user sees a constant input lag of about a second. Keyboard and touchpad latency is affected the same way to a smaller degree. When the controller property is absent and the device has an ACPI companion, take the slowest speed declared on the bus through i2c_acpi_find_bus_speed(), and keep the standard mode fallback only when nothing is declared. Tested on an arm64 ACPI laptop: the digitizer bus comes up at 1 MHz, the keyboard and touchpad buses at 400 kHz, and the stylus follows the hand with no visible delay. Signed-off-by: David Cemin <[email protected]> (cherry picked from commit fd8059c22bf109c0cad693252f2e0189baf149e8)
|
Could someone from BaseOS file the Launchpad bug for this one as well? I will add the BugLink to both PRs (719 and 720) once it exists. The 7.3-next counterpart is #720. |
BaseOS Kernel ReviewWarning
|
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 1 commits...
Cherry-pick digest:
E: 3a141b4f9c49 ("NVIDIA: SAUCE: i2c: mt65xx: use the ACPI"): cannot resolve upstream SHA fd8059c22bf1
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 3a141b4f9c49 │ fd8059c22bf1 │ ERROR │ ERROR │ ERROR │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘
Lint: all checks passed.
|
|
Can you drop the This snippet also looks like it can be simplified to: if (ret < 0) {
/* ACPI declares the speed in the peripherals' I2cSerialBus resources */
i2c->speed_hz = i2c_acpi_find_bus_speed(i2c->dev);
if (!i2c->speed_hz)
i2c->speed_hz = I2C_MAX_STANDARD_MODE_FREQ;
}
|
On ACPI platforms the controller node carries no "clock-frequency" property; the bus speed is declared by the peripherals in their I2cSerialBus resources. The driver only looked at the controller property and fell back to standard mode, so every bus ran at 100 kHz regardless of what the peripherals asked for (1 MHz for the touchscreen digitizer, 400 kHz for the keyboard and touchpad on the reference laptops).
At 100 kHz the host cannot keep up with a high report rate HID device such as a pen digitizer; the device buffers its reports and the user sees a constant input lag of about a second. Keyboard and touchpad latency is affected the same way to a smaller degree.
When the controller property is absent and the device has an ACPI companion, take the slowest speed declared on the bus through i2c_acpi_find_bus_speed(), and keep the standard mode fallback only when nothing is declared.
Tested on an arm64 ACPI laptop: the digitizer bus comes up at 1 MHz, the keyboard and touchpad buses at 400 kHz, and the stylus follows the hand with no visible delay.
Upstream status: not upstreamable on its own. The ACPI probe path of i2c-mt65xx is itself a SAUCE change in this tree (c85b3bf), so this fix depends on it and will go upstream together with the ACPI support.
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2174977