Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/linux Try agp_i810_borrow only if CONF...
details: https://anonhg.NetBSD.org/src/rev/7813d2e2c096
branches: trunk
changeset: 364859:7813d2e2c096
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 15:12:21 2018 +0000
description:
Try agp_i810_borrow only if CONFIG_AGP is enabled.
diffstat:
sys/external/bsd/drm2/linux/linux_pci.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 52b0656ee581 -r 7813d2e2c096 sys/external/bsd/drm2/linux/linux_pci.c
--- a/sys/external/bsd/drm2/linux/linux_pci.c Mon Aug 27 15:12:09 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_pci.c Mon Aug 27 15:12:21 2018 +0000
@@ -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 @@
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,
Home |
Main Index |
Thread Index |
Old Index