]> git.ipfire.org Git - thirdparty/linux.git/commit
udlfb: optimization - test the backing buffer
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 25 Jul 2018 13:41:56 +0000 (15:41 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 25 Jul 2018 13:41:56 +0000 (15:41 +0200)
commit8f3c39b8565df2504d727be2ed6d2643bae2b317
tree6746a8929d8307b0073054c43d10d8bfb8f08483
parent7433914efd584b22bb49d3e1eee001f5d0525ecd
udlfb: optimization - test the backing buffer

Currently, the udlfb driver only tests for identical bytes at the
beginning or at the end of a page and renders anything between the first
and last mismatching pixel. But pages are not the same as lines, so this
is quite suboptimal - if there is something modified at the beginning of a
page and at the end of a page, the whole page is rendered, even if most of
the page is not modified.

This patch makes it test for identical pixels at the beginning and end of
each rendering command. This patch improves identical byte detection by
41% when playing video in a window.

This patch also fixes a possible screen corruption if the user is writing
to the framebuffer while dlfb_render_hline is in progress - the pixel data
that is copied to the backbuffer with memcpy may be different from the
pixel data that is actually rendered to the hardware (because the content
of the framebuffer may change between memcpy and the rendering command).
We must make sure that we copy exactly the same pixel as the pixel that is
being rendered.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
[b.zolnierkie: fix code indent]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/udlfb.c