[PATCH 09/11] xfree86: organize and group all pci related stuff inside xf86.h
Tiago Vignatti
tiago.vignatti at nokia.com
Fri May 21 04:43:22 PDT 2010
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
hw/xfree86/common/xf86.h | 57 +++++++++++++++++++++------------------------
1 files changed, 27 insertions(+), 30 deletions(-)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 68c3744..d8629a8 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -41,8 +41,6 @@
#include <dix-config.h>
#endif
-#include <pciaccess.h>
-
#include "xf86str.h"
#include "xf86Opt.h"
#include <X11/Xfuncproto.h>
@@ -62,7 +60,6 @@ extern _X_EXPORT DevPrivateKey xf86CreateRootWindowKey;
extern _X_EXPORT DevPrivateKey xf86PixmapKey;
extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
extern _X_EXPORT const unsigned char byte_reversed[256];
-extern _X_EXPORT Bool pciSlotClaimed;
extern _X_EXPORT Bool fbSlotClaimed;
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
extern _X_EXPORT Bool sbusSlotClaimed;
@@ -91,21 +88,39 @@ extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */
/* Function Prototypes */
#ifndef _NO_XF86_PROTOTYPES
-/* xf86Bus.c */
+/* PCI related */
+#include <pciaccess.h>
+extern _X_EXPORT Bool pciSlotClaimed;
-extern _X_EXPORT Bool xf86CheckPciSlot( const struct pci_device * );
-extern _X_EXPORT int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp,
- int chipset, GDevPtr dev, Bool active);
+extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *);
+extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp,
+ int chipset, GDevPtr dev, Bool active);
extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *);
-extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device,
- int *func);
-extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func);
+extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus,
+ int *device, int *func);
+extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus,
+ int device, int func);
extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer);
+extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci);
+extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci,
+ memType base);
+extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex);
+extern _X_EXPORT int xf86MatchPciInstances(const char *driverName,
+ int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets,
+ GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities);
+extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn,
+ int scrnFlag, int entityIndex,PciChipsets *p_chip, void *dummy,
+ EntityProc init, EntityProc enter, EntityProc leave, pointer private);
+/* Obsolete! don't use */
+extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
+ int entityIndex,PciChipsets *p_chip, void *dummy, EntityProc init,
+ EntityProc enter, EntityProc leave, pointer private);
+
+/* xf86Bus.c */
+
extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex);
extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
-extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci);
-/* new RAC */
extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp);
extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex,
@@ -114,10 +129,8 @@ extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex);
extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex);
extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
-extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex);
extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
EntityProc enter, EntityProc leave, pointer);
-extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base);
extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
extern _X_EXPORT void xf86EnterServerState(xf86State state);
extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
@@ -223,10 +236,6 @@ extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg,
SymTabPtr chips);
extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist);
-extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID,
- SymTabPtr chipsets, PciChipsets *PCIchipsets,
- GDevPtr *devList, int numDevs, DriverPtr drvp,
- int **foundEntities);
extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num,
Bool (*ClockFunc)(ScrnInfoPtr, int),
void (*ProtectRegs)(ScrnInfoPtr, Bool),
@@ -265,23 +274,11 @@ extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen);
extern _X_EXPORT pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name,
char **adaptor_name, pointer *adaptor_options);
extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny);
-extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag,
- int entityIndex,PciChipsets *p_chip,
- void *dummy, EntityProc init,
- EntityProc enter, EntityProc leave,
- pointer private);
extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
int entityIndex, EntityProc init,
EntityProc enter, EntityProc leave,
pointer private);
-/* Obsolete! don't use */
-extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
- int entityIndex,PciChipsets *p_chip,
- void *dummy, EntityProc init,
- EntityProc enter, EntityProc leave,
- pointer private);
-
extern _X_EXPORT Bool xf86IsScreenPrimary(int scrnIndex);
extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
int format, unsigned long len,
--
1.6.0.4
More information about the xorg-devel
mailing list