Bug 10742

Summary: xf86-video-glint crash during load because of endian problem
Product: xorg Reporter: Brice Goglin <brice.goglin>
Component: Driver/glintAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium CC: matthieu.herrb
Version: git   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420738
Whiteboard:
i915 platform: i915 features:

Description Brice Goglin 2007-04-24 10:26:30 UTC
Christian Tusche reported this bug to the Debian BTS today. He's using the xf86-video-glint driver 1.1.1 (1:1.1.1-3 in Debian) on a Sparc machine (and thinks the bug might also occur on PPC).

System configuration:
Sun Ultra60 with Raptor GFX graphic card (Permedia2v chipset)
running etch with a 2.6.20 kernel.
The problem also existed in Xorg 7.0.

Problem:
The Xserver hangs or crashes when loading the driver. As from the logfile, the card is wrongly detected, e.g. 4MB video ram instead 
of 8MB.

Reason:
The driver correctly writes to the big-endian registers of the card, but the 
MMIO_xxxx functions do a byte-swap by default on this architecture, ending up 
in a wrong byte-order. For reference, see "compiler.h" from the "xorg-server" 
source.

Solution:
Define "SPARC_MMIO_IS_BE" for compiling the glint driver.
E.g., by:
# CFLAGS="-O2 -DSPARC_MMIO_IS_BE" ./configure
(maybe on PPC_MMIO_IS_BE has to be defined on PPC architecture)

I suggest setting these defines in the source code in "config.h".
Comment 1 Matthieu Herrb 2009-06-04 10:38:47 UTC
Fixed in commit 1b36ca0c453191e4837cea25794731b166df19f7

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.