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/dist/drm/nouveau/nvkm/subdev/pci Trans...
details: https://anonhg.NetBSD.org/src/rev/eee45d32e59d
branches: trunk
changeset: 366048:eee45d32e59d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:40:50 2018 +0000
description:
Translate agp_info accents.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_agp.c | 22 ++++++++-
1 files changed, 18 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r 353828b61435 -r eee45d32e59d sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_agp.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_agp.c Mon Aug 27 07:40:40 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_agp.c Mon Aug 27 07:40:50 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_pci_agp.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_pci_agp.c,v 1.3 2018/08/27 07:40:50 riastradh Exp $ */
/*
* Copyright 2015 Nouveau Project
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_agp.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_agp.c,v 1.3 2018/08/27 07:40:50 riastradh Exp $");
#include "agp.h"
#ifdef __NVKM_PCI_AGP_H__
@@ -137,16 +137,30 @@
agp_copy_info(pci->agp.bridge, &info);
agp_backend_release(pci->agp.bridge);
+#ifdef __NetBSD__
+ pci->agp.mode = info.aki_info.ai_mode;
+ pci->agp.base = info.aki_info.ai_aperture_base;
+ pci->agp.size = info.aki_info.ai_aperture_size;
+ pci->agp.cma = !info.aki_info.ai_memory_allowed; /* XXX ? */
+#else
pci->agp.mode = info.mode;
pci->agp.base = info.aper_base;
pci->agp.size = info.aper_size * 1024 * 1024;
pci->agp.cma = info.cant_use_aperture;
+#endif
pci->agp.mtrr = -1;
/* determine if bridge + chipset combination needs a workaround */
while (quirk->hostbridge_vendor) {
- if (info.device->vendor == quirk->hostbridge_vendor &&
- info.device->device == quirk->hostbridge_device &&
+#ifdef __NetBSD__
+ uint16_t vendor = PCI_VENDOR(info.aki_info.ai_devid);
+ uint16_t product = PCI_PRODUCT(info.aki_info.ai_devid);
+#else
+ uint16_t vendor = info.device->vendor;
+ uint16_t product = info.device->device;
+#endif
+ if (vendor == quirk->hostbridge_vendor &&
+ product == quirk->hostbridge_device &&
(quirk->chip_vendor == (u16)PCI_ANY_ID ||
pci->pdev->vendor == quirk->chip_vendor) &&
(quirk->chip_device == (u16)PCI_ANY_ID ||
Home |
Main Index |
Thread Index |
Old Index