[PATCH xserver 04/12] xfree86: Move DRICreatePCIBusID to the PCI code
Adam Jackson
ajax at redhat.com
Fri Jun 16 19:44:44 UTC 2017
This symbol is used by some DRI2+ drivers and there's nothing
DRI1-specific about it.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/common/xf86pciBus.c | 12 ++++++++++++
hw/xfree86/common/xf86str.h | 2 ++
hw/xfree86/dri/dri.c | 12 ------------
hw/xfree86/dri/dri.h | 2 --
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 012ca08d2..7a4ccb805 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1465,3 +1465,15 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
if (*chipset < 0)
*chipset = (pVideo->vendor_id << 16) | pVideo->device_id;
}
+
+char *
+DRICreatePCIBusID(const struct pci_device *dev)
+{
+ char *busID;
+
+ if (asprintf(&busID, "pci:%04x:%02x:%02x.%d",
+ dev->domain, dev->bus, dev->dev, dev->func) == -1)
+ return NULL;
+
+ return busID;
+}
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index edd91c745..79c4c9daf 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -771,4 +771,6 @@ typedef enum {
ACTION_SWITCHSCREEN_PREV,
} ActionEvent;
+extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *dev);
+
#endif /* _XF86STR_H */
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 0142b6ea7..9f7075996 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -2404,15 +2404,3 @@ DRIMoveBuffersHelper(ScreenPtr pScreen,
*xdir = 1;
}
-
-char *
-DRICreatePCIBusID(const struct pci_device *dev)
-{
- char *busID;
-
- if (asprintf(&busID, "pci:%04x:%02x:%02x.%d",
- dev->domain, dev->bus, dev->dev, dev->func) == -1)
- return NULL;
-
- return busID;
-}
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index dfd2f827e..2ec1c76ea 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -325,8 +325,6 @@ extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen,
int dy,
int *xdir, int *ydir, RegionPtr reg);
-extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo);
-
extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn);
extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
--
2.13.0
More information about the xorg-devel
mailing list