Module Name: src
Committed By: riastradh
Date: Mon Aug 27 15:12:21 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/linux: linux_pci.c
Log Message:
Try agp_i810_borrow only if CONFIG_AGP is enabled.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/linux/linux_pci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/linux/linux_pci.c
diff -u src/sys/external/bsd/drm2/linux/linux_pci.c:1.4 src/sys/external/bsd/drm2/linux/linux_pci.c:1.5
--- src/sys/external/bsd/drm2/linux/linux_pci.c:1.4 Mon Aug 27 14:19:59 2018
+++ src/sys/external/bsd/drm2/linux/linux_pci.c Mon Aug 27 15:12:21 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_pci.c,v 1.4 2018/08/27 14:19:59 riastradh Exp $ */
+/* $NetBSD: linux_pci.c,v 1.5 2018/08/27 15:12:21 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,10 +30,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.4 2018/08/27 14:19:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.5 2018/08/27 15:12:21 riastradh Exp $");
#include <linux/pci.h>
+#include <drm/drm_agp_netbsd.h>
+
device_t
pci_dev_dev(struct pci_dev *pdev)
{
@@ -606,10 +608,14 @@ pci_iomap(struct pci_dev *pdev, unsigned
size, BUS_SPACE_MAP_LINEAR | pdev->pd_resources[i].flags,
&pdev->pd_resources[i].bsh);
if (error) {
+#ifdef CONFIG_AGP
/* Horrible hack: try asking the fake AGP device. */
if (!agp_i810_borrow(pdev->pd_resources[i].addr, size,
&pdev->pd_resources[i].bsh))
return NULL;
+#else
+ return NULL;
+#endif
}
pdev->pd_resources[i].bst = pdev->pd_pa.pa_memt;
pdev->pd_resources[i].kva = bus_space_vaddr(pdev->pd_resources[i].bst,