Bug 4537

Summary: miext/shadow/shrotate.c speedup
Product: xorg Reporter: Staffan Ulfberg <staffan>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: enhancement    
Priority: high CC: alexdeucher
Version: unspecifiedKeywords: patch
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to increase rotated bitmap copy speed none

Description Staffan Ulfberg 2005-09-21 06:17:50 UTC
I have a Sharp Zaurus C3100, where X normally runs rotated 90 degrees,
using a shadow framebuffer.  I've been hacking a bit on getting the
code that blits a rotated shadow onto the display a bit faster and
came up with the included patch.

Blitting in rotated mode is about 4x the previous speed.  Non-rotated
copies are about the same speed; maybe up to 10% slower for small
rectangles (on the Zaurus).

The idea is to copy the area in blocks of 32x32 pixels, to reduce the
number of cache misses, which are unavoidable when walking either the
source or the destination bitmap across the scanlines.  16x16, 24x24,
andd 32x32 yields about the same result, so I chose 32x32 since it
seems best for the non-rotated modes.

My guess is that this patch helps other machines as well, and also other OSes.
Comment 1 Staffan Ulfberg 2005-09-21 06:20:09 UTC
Created attachment 3348 [details] [review]
Patch to increase rotated bitmap copy speed
Comment 2 Daniel Stone 2007-02-27 01:28:09 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 Corbin Simpson 2010-03-27 04:21:05 UTC
Tagging to keep this patch from vanishing; will triage later.
Comment 4 Adam Jackson 2010-05-10 10:50:09 UTC
We have rotated shadow updates already, they were brought across into Xorg during the kdrive merge:

commit 8987b2c1efc9a4667e278e6ba411772ba2a4a4e6
Author: Keith Packard <keithp@keithp.com>
Date:   Thu Feb 16 07:17:31 2006 +0000

    Make more extensions optional in build (for kdrive). Fix kdrive build for
        actual hardware. Fix kdrive pointer signed/unsigned types. Add
        kdrive-required YX rotation functions. Replace rgb text file loading
        with static rgb color table.

This should really go into pixman someday though.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.