Repository navigation
[26.04_linux-nvidia-7.3-next] NVIDIA: SAUCE: i2c: mt65xx: use the ACPI declared bus speed when no clock-frequency is given - #720
Open
dcemin-nv wants to merge 1 commit into
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)
Collaborator
BaseOS Kernel ReviewWarning
|
Contributor
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: 1a6382677eaa ("NVIDIA: SAUCE: i2c: mt65xx: use the ACPI"): cannot resolve upstream SHA fd8059c22bf1
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 1a6382677eaa │ fd8059c22bf1 │ ERROR │ ERROR │ ERROR │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘
Lint: all checks passed.
|
Collaborator
|
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;
}
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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