Bug 12160 - compilation broken due to the libpciaccess related rework
Summary: compilation broken due to the libpciaccess related rework
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/avivo (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 12161
  Show dependency treegraph
 
Reported: 2007-08-25 12:40 UTC by Dodji Seketeli
Modified: 2007-08-28 15:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
this patch fixes the compilation breakage (3.05 KB, patch)
2007-08-25 12:45 UTC, Dodji Seketeli
no flags Details | Splinter Review
patch reworked to port the driver over the pciaccess infrastructure (8.44 KB, text/plain)
2007-08-26 11:32 UTC, Dodji Seketeli
no flags Details
rework the patch to make it compile with pre *and* post pci-rework (9.75 KB, text/plain)
2007-08-28 15:19 UTC, Dodji Seketeli
no flags Details

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.