Bug 57649 - xf86-video-ati: Acceleration of solid pictures broken on big endian
Summary: xf86-video-ati: Acceleration of solid pictures broken on big endian
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.7 (2012.06)
Hardware: PowerPC OpenBSD
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-28 10:27 UTC by Martin Pieuchot
Modified: 2013-03-07 13:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
EXA: Fix acceleration of solid pictures on big endian (2.86 KB, text/plain)
2012-11-28 10:27 UTC, Martin Pieuchot
no flags Details
UMS: Swap bytes when uploading to pixmap for solid picture on big endian host (1.46 KB, patch)
2013-03-07 11:47 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Martin Pieuchot 2012-11-28 10:27:38 UTC
Created attachment 70730 [details]
EXA: Fix acceleration of solid pictures on big endian

On OpenBSD/macppc with drm and UMS ati driver 6.14.5 and 6.14.6, gtk (cairo?) applications do not render black fonts correctly. 

This does not happen when using 'Option "AccelMethod" "XAA"' nor with the ati driver version 6.14.4.

I believe the problem comes from an endianness issue related to the support for accelerated solid pictures added between 6.14.4 and .5. The attached patch fixes
this issue for me, tested on a mac mini (rv280) and powerbook (rv350).

Don't hesitate if you need more information.
Comment 1 Michel Dänzer 2012-11-28 12:23:17 UTC
The current code works correctly on Linux/PPC KMS (the XF86DRM_MODE path in RADEONSolidPixmap()), so this patch would probably break that case.
Comment 2 Michel Dänzer 2012-11-28 12:29:26 UTC
Also, this patch will probably break when running at depth 16 instead of the default 24, as the GPU will be programmed to do 16-bit instead of 32-bit byte swapping for CPU access to VRAM.
Comment 3 Michel Dänzer 2013-03-07 11:47:19 UTC
Created attachment 76114 [details] [review]
UMS: Swap bytes when uploading to pixmap for solid picture on  big endian host

This patch should address the issues from my previous comments. Please test at depth 24 and 16.
Comment 4 Martin Pieuchot 2013-03-07 13:09:25 UTC
Your diff correctly fixes the problem I was seeing. I just tested it on a PowerBook G4 with a rv350 at depth 24 *and* 16.

Thank you for taking the time to look into this issue, I really appreciate it.
Comment 5 Alex Deucher 2013-03-07 13:47:29 UTC
Might be worth applying to the ums xf86-video-ati git branch.
Comment 6 Michel Dänzer 2013-03-07 13:54:42 UTC
Fixed on the ums branch, thanks for testing!

commit 96ddc91bfa07d91b412afcf90e13523fe9efaf08
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 7 09:59:29 2013 +0100

    UMS: Swap bytes when uploading to pixmap for solid picture on big endian host


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.