On Sat, Feb 14, 2026 at 08:56:09AM +0700, Nam Cao wrote:
> Andy Shevchenko <[email protected]> writes:
> > On Fri, Feb 13, 2026 at 09:59:46AM +0100, Nam Cao wrote:
> >> 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. Improvement is measured by a
> >> pair of trace_printk() at the beginning of fb_write() and at the end of
> >> fbtft_deferred_io().
> >
> > Can you elaborate on the HW (the exact model of the panel and [sub]driver)
> > in use?
> 
> My hardware is the Adafruit's ILI9340. Driver is fbtft/fb_ili9340.c.

Please, add that into commit message.
It will leave the trace that this change has been tested and how.

...

> >> -  /* special case, needed ? */
> >
> > Do you know the history of this comment? What is "special case" and when 
> > does it appear?
> 
> This allows caller to pass -1 to "make dirty" the entire screen. The
> only caller that uses this special case is removed in this patch.

Perhaps a small note (summary of the above) to the commit message as well?

...

> > In light of the last TODO line I think that the change is desired by
> > the original author. Nevertheless I am wondering about these side effects
> > that might be (very unlikely?) considered if this code (partial refresh)
> > runs for a significant period of time:
> >
> > - some bits of the screen (on non-updated part) might be flipped
> > - the static picture may lead to wearing of (decolourisation) the panel
> > - what is the thermal distribution (probably with backlight off)?
> >
> > Maybe it makes sense to refresh a full screen from time to time, but
> > TBH my knowledge of TFT panels from last decade is quite limited. I only
> > think from the point of the general physics and common sense. That's
> > why this long footnote rather philosophical, but I would be glad to
> > learn the state of affairs of the modern TFT panels in terms of the
> > physical parameters lasting over the time under different application
> > cases.
> 
> I can't tell you much about TFT panels, sorry. My company used to do a
> demo board with one of them, that's how I have some hardware to play with.
> 
> If user uses mmap() instead of write(), then full refresh is never done
> (well, unless user writes to the entire screen). So if lack of refresh
> is a problem, someone should have noticed already.

Right, that's why I asked more for my own learning.

-- 
With Best Regards,
Andy Shevchenko


Reply via email to