Bug 12160

Summary: compilation broken due to the libpciaccess related rework
Product: xorg Reporter: Dodji Seketeli <dodji>
Component: Driver/avivoAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 12161    
Attachments:
Description Flags
this patch fixes the compilation breakage
none
patch reworked to port the driver over the pciaccess infrastructure
none
rework the patch to make it compile with pre *and* post pci-rework none

Description Dodji Seketeli 2007-08-25 12:40:19 UTC
Master does not compile anymore when libpciaccess is installed
Comment 1 Dodji Seketeli 2007-08-25 12:45:09 UTC
Created attachment 11273 [details] [review]
this patch fixes the compilation breakage

what the patch does:

 +define the PCIACCESS macro when the lipciaccess is found at configure time
 +properly use the lipciaccess pci related types, not the pciVideoPtr related ones
 +make sure the use of libpciaccess are guarded by the PCIACCESS macro
 +fix gcc warnings
Comment 2 Dodji Seketeli 2007-08-26 11:32:01 UTC
Created attachment 11282 [details]
patch reworked to port the driver over the pciaccess infrastructure

modified avivo_preinit() to make it use libpciaccess to properly map the MMIO region as well as the framebuffer memory into virtuall address space.
Comment 3 Christoph Brill 2007-08-28 12:59:49 UTC
At least from what I can tell the configure.ac changes from http://wiki.x.org/wiki/PciReworkHowto look much more sane. But I'm far away from understanding autotools :-)
Comment 4 Dodji Seketeli 2007-08-28 15:19:19 UTC
Created attachment 11314 [details]
rework the patch to make it compile with pre *and* post pci-rework

I just reworked the patch to make it compile with pre *and* post pci-re.
The idea is to detect the XSERVER_LIBPCIACCESS macro defined in xorg-server.h in the xorg-xserver tree. If it is set, then define the PCIACCESS macro used throughout the avivo code to switch to libpciaccess. Otherwise, use the old PCI infrastructure.
Avivotool needs the libpciaccess though, so it is always detected by configure.
Comment 5 Jerome Glisse 2007-08-28 15:31:59 UTC
Looks good, pushed.

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.