diff options
| author | Nam Cao <namcao@linutronix.de> | 2026-02-16 07:57:30 +0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-23 15:08:54 +0100 |
| commit | 5c05c1ac4baa600f4b6743dabb18e1fb6d64c048 (patch) | |
| tree | 31fee10a22b01c45feca7c5bdbbb2c38117a633f /tools/perf/scripts/python/bin | |
| parent | 6bb9204e2995c9cecf9a5c3051dcdb6ad589423e (diff) | |
staging: fbtft: Optimize partial write()
When user write() only to part of the screen, the driver still updates the
entire screen. That wastes CPU cycles.
Optimize by updating only the changed lines.
Also remove a "special case" in fbtft_mkdirty() as its only user is removed
in this patch.
Tested with an Adafruit ILI9340 (drivers/staging/fbtft/fb_ili9340.c).
Improvement is measured by a pair of trace_printk() at the beginning of
fb_write() and at the end of fbtft_deferred_io().
Update type Before After
====================================
full screen 196ms 200ms
half screen 200ms 124ms
quarter screen 193ms 81ms
one pixel 199ms 43ms
It is interesting to note that if the deferred IO's delay time (40ms) is
subtracted, then the time amount scales linearly with the write size.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/20260216005730.4535-1-namcao@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
