HomeFreeBSD

iichid(4): Improve idle sampling hysteresis

Description

iichid(4): Improve idle sampling hysteresis

In sampling mode some devices return same data indefinitely even if
there is nothing to report. Previous idle hysteresis implementation
activated only when device returned no data, so some devices ended up
polled at fast rate all the time. This new implementation compares
each new report with the previous, and, if they are identical, after
reaching threshold also drop sampling rate to slow.

On my Dell XPS 13 9310 with iichid(4) touchscreen and touchpad this
reduces idle power consumption by ~0.5W by reducing number of context
switches in the driver from ~4000 to ~700 per second when not touched.

MFC after: 1 month

(cherry picked from commit 8c86b981240324c1daaa387d4d3f8e3e53db3d2e)

Details

Provenance
mavAuthored on Dec 23 2023, 3:50 AM
Parents
rG8d8f348c8fe7: ig4: Actively use FIFO thresholds
Branches
Unknown
Tags
Unknown