Created attachment 29308 [details] [review]
patch against alp_driver.c to add a check for pitch values
as seen testing Ubuntu 9.10 Alpha 5:
the GD 5446 uses 9 bits to store the pitch value, which then get shifted by 3 bits to the left in the graphic card. For the resolution of 1360x768 however, X sets the pitch to 1408, which hence results to an actual used pitch by the card of 128. As a result the screen is garbled.
While I don't have the real hardware to test it (a GD 5446 with 4 Mb is somewhat rare), FAUmachine simulates exactly this graphic card.
I've tested the attached patch using the current xserver-xorg from Ubuntu 9.10, and it works within FAUmachine.
It looks like the 2048 you set initially is never read. It's better to just not
initialize it there (or initialize it to the defualt value and don't set it in
Can you send the updated patch to xorg-devel for review?
*** Bug 21070 has been marked as a duplicate of this bug. ***
Created attachment 52605 [details] [review]
limit the maximum pitch on the GD5446 to 4088
Reworked patch. Thanks for the review!
The GD5436 is similar. Is this needed for the GD5436 as well?
Indeed, looking at the Cirrus Logic - Alpine Family - CL-GD543X/'4X - Technical Reference Manual, it looks as it is applicable for the GD5436 as well. Sadly, I have no means to test it there.
Author: Stefan Potyra <email@example.com>
Date: Thu Oct 20 14:44:44 2011 -0700
Limit the maximul pitch of GD5436 and GD5446
Limit the maximum supported pitch of the GD5446 to 4088, since the internal
pitch register is only 9 bit (and contains the pitch left shifted by 3).
Signed-off-by: Jeremy Huddleston <firstname.lastname@example.org>