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 use pci_dma64_availab...
details: https://anonhg.NetBSD.org/src/rev/1c7ec13fc446
branches: trunk
changeset: 340997:1c7ec13fc446
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Oct 14 00:12:55 2015 +0000
description:
use pci_dma64_available() to choose a valid DMA tag.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c | 11 ++++---
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c | 11 ++++---
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c | 8 +++---
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c | 8 +++---
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c | 13 ++++++---
5 files changed, 28 insertions(+), 23 deletions(-)
diffs (178 lines):
diff -r 93472bea563f -r 1c7ec13fc446 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c Tue Oct 13 21:28:41 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c Wed Oct 14 00:12:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_fb_nv50.c,v 1.2 2015/02/25 17:29:43 riastradh Exp $ */
+/* $NetBSD: nouveau_subdev_fb_nv50.c,v 1.3 2015/10/14 00:12:55 mrg Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_fb_nv50.c,v 1.2 2015/02/25 17:29:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_fb_nv50.c,v 1.3 2015/10/14 00:12:55 mrg Exp $");
#include <core/client.h>
#include <core/enum.h>
@@ -255,8 +255,8 @@
#ifdef __NetBSD__
{
- /* XXX pa_dmat or pa_dmat64? */
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
int nsegs;
priv->r100c08_map = NULL; /* paranoia */
@@ -321,7 +321,8 @@
#ifdef __NetBSD__
if (priv->r100c08_map) {
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
bus_dmamap_unload(dmat, priv->r100c08_map);
bus_dmamem_unmap(dmat, priv->r100c08_kva, PAGE_SIZE);
diff -r 93472bea563f -r 1c7ec13fc446 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c Tue Oct 13 21:28:41 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c Wed Oct 14 00:12:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_fb_nvc0.c,v 1.2 2015/02/25 17:29:43 riastradh Exp $ */
+/* $NetBSD: nouveau_subdev_fb_nvc0.c,v 1.3 2015/10/14 00:12:55 mrg Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_fb_nvc0.c,v 1.2 2015/02/25 17:29:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_fb_nvc0.c,v 1.3 2015/10/14 00:12:55 mrg Exp $");
#include "nvc0.h"
@@ -81,7 +81,8 @@
#ifdef __NetBSD__
if (priv->r100c10_map) {
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
bus_dmamap_unload(dmat, priv->r100c10_map);
bus_dmamem_unmap(dmat, priv->r100c10_kva, PAGE_SIZE);
@@ -114,8 +115,8 @@
#ifdef __NetBSD__
{
- /* XXX pa_dmat or pa_dmat64? */
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
int nsegs;
priv->r100c10_map = NULL; /* paranoia */
diff -r 93472bea563f -r 1c7ec13fc446 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c Tue Oct 13 21:28:41 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c Wed Oct 14 00:12:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_vm_nv04.c,v 1.2 2015/02/25 22:12:00 riastradh Exp $ */
+/* $NetBSD: nouveau_subdev_vm_nv04.c,v 1.3 2015/10/14 00:12:55 mrg Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_vm_nv04.c,v 1.2 2015/02/25 22:12:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_vm_nv04.c,v 1.3 2015/10/14 00:12:55 mrg Exp $");
#include <core/gpuobj.h>
@@ -139,9 +139,9 @@
}
#ifdef __NetBSD__
if (priv->nullp) {
- /* XXX pa_dmat or pa_dmat64? */
struct nouveau_device *device = nv_device(priv);
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
bus_dmamap_unload(dmat, priv->nullmap);
bus_dmamem_unmap(dmat, priv->nullp, PAGE_SIZE);
diff -r 93472bea563f -r 1c7ec13fc446 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c Tue Oct 13 21:28:41 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c Wed Oct 14 00:12:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_vm_nv44.c,v 1.2 2015/02/25 22:12:00 riastradh Exp $ */
+/* $NetBSD: nouveau_subdev_vm_nv44.c,v 1.3 2015/10/14 00:12:55 mrg Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_vm_nv44.c,v 1.2 2015/02/25 22:12:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_vm_nv44.c,v 1.3 2015/10/14 00:12:55 mrg Exp $");
#include <core/gpuobj.h>
#include <core/option.h>
@@ -192,8 +192,8 @@
#ifdef __NetBSD__
{
- /* XXX pa_dmat or pa_dmat64? */
- const bus_dma_tag_t dmat = device->pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
int nsegs;
/* XXX errno NetBSD->Linux */
diff -r 93472bea563f -r 1c7ec13fc446 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c Tue Oct 13 21:28:41 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c Wed Oct 14 00:12:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nv50_display.c,v 1.3 2015/02/25 14:57:04 riastradh Exp $ */
+/* $NetBSD: nouveau_nv50_display.c,v 1.4 2015/10/14 00:12:55 mrg Exp $ */
/*
* Copyright 2011 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nv50_display.c,v 1.3 2015/02/25 14:57:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nv50_display.c,v 1.4 2015/10/14 00:12:55 mrg Exp $");
#include <linux/dma-mapping.h>
#include <linux/err.h>
@@ -184,8 +184,8 @@
if (dmac->ptr) {
struct pci_dev *pdev = nv_device(core)->pdev;
#ifdef __NetBSD__
- /* XXX pa_dmat or pa_dmat64? */
- const bus_dma_tag_t dmat = pdev->pd_pa.pa_dmat64;
+ const bus_dma_tag_t dmat = pci_dma64_available(&pdev->pd_pa) ?
+ pdev->pd_pa.pa_dmat64 : pdev->pd_pa.pa_dmat;
bus_dmamap_unload(dmat, dmac->dmamap);
bus_dmamem_unmap(dmat, dmac->dmakva, PAGE_SIZE);
@@ -343,7 +343,10 @@
#ifdef __NetBSD__
{
- const bus_dma_tag_t dmat = nv_device(core)->pdev->pd_pa.pa_dmat64;
+ struct nouveau_device *device = nv_device(core);
+ const bus_dma_tag_t dmat = pci_dma64_available(&device->pdev->pd_pa) ?
+ device->pdev->pd_pa.pa_dmat64 : device->pdev->pd_pa.pa_dmat;
+
int rsegs;
/* XXX errno NetBSD->Linux */
Home |
Main Index |
Thread Index |
Old Index