summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:38:36 +1000
commit9c38b4f8d3f0fa685da802bc511d89a35215c45f (patch)
tree9c1c8436c031cef4792cd8bfe00d7bac06f3ba39 /lib
parente7c0675537839f171106a865f33861a27c9c00d7 (diff)
downloadnouveau-9c38b4f8d3f0fa685da802bc511d89a35215c45f.tar.gz
pci: merge agp handling from nouveau drm
This commit reinstates the pre-DEVINIT AGP fiddling that was broken in an earlier commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/include/nvif/os.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
index ce7dfb999..182ae5ad5 100644
--- a/lib/include/nvif/os.h
+++ b/lib/include/nvif/os.h
@@ -652,6 +652,17 @@ void nvos_iounmap(void __iomem *ptr);
#define memcpy_toio memcpy
#define wmb()
+static inline int
+arch_phys_wc_add(u64 base, u64 size)
+{
+ return -1;
+}
+
+static inline void
+arch_phys_wc_del(int index)
+{
+}
+
/******************************************************************************
* io mapping
*****************************************************************************/
@@ -990,6 +1001,49 @@ pci_disable_msi(struct pci_dev *pdev)
#define pci_get_bus_and_slot(a, b) NULL
#define pci_read_config_dword(a,b,c) *(c) = 0
+#define PCI_VENDOR_ID_NVIDIA 0x10de
+#define PCI_VENDOR_ID_VIA 0x1106
+
+/******************************************************************************
+ * AGP
+ *****************************************************************************/
+#define PCI_AGP_COMMAND_FW 0x10
+
+#ifdef CONFIG_AGP
+struct agp_bridge_data {
+};
+
+struct agp_kern_info {
+ struct pci_dev *device;
+ unsigned long mode;
+ unsigned long aper_base;
+ size_t aper_size;
+ bool cant_use_aperture;
+};
+
+static inline struct agp_bridge_data *
+agp_backend_acquire(struct pci_dev *pdev)
+{
+ return NULL;
+}
+
+static inline void
+agp_backend_release(struct agp_bridge_data *bridge)
+{
+}
+
+static inline int
+agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info)
+{
+ return -ENOSYS;
+}
+
+static inline void
+agp_enable(struct agp_bridge_data *bridge, u32 mode)
+{
+}
+#endif
+
/******************************************************************************
* platform device
*****************************************************************************/