G2D: Implement "double speed" 16bpp blits
When source and destination coordinates allow it, a 16bpp screen-to-
screen blit is divided into up to three segments: two optional one
pixel wide edges and an aligned middle segment that is copied in
32-bit mode.
This patch adds the low-level function sunxi_g2d_blit_r5g6b5_in_three
and adds logic to the general blit function to use it for 16bpp to
16bpp blits if the source and destination coordinates allow it. This
patch automatically enables the use of this optimization in the
sunxi G2D X driver. The area threshold for using G2D for
16bpp-to-16bpp blits was introduced in a previous patch.
Benchmarks:
1920x1080x16bpp@60Hz, ShadowFB disabled:
x11perf -scroll100
Before:
350000 trep @ 0.0881 msec ( 11400.0/sec): Scroll 100x100 pixels
After:
350000 trep @ 0.0819 msec ( 12200.0/sec): Scroll 100x100 pixels
x11perf -scroll500
Before:
20000 trep @ 1.3547 msec ( 738.0/sec): Scroll 500x500 pixels
After:
35000 trep @ 0.8005 msec ( 1250.0/sec): Scroll 500x500 pixels
Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Please register or sign in to comment