Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2 Pull up following revision(s) (requ...
details: https://anonhg.NetBSD.org/src/rev/4eef8c9b2b9d
branches: netbsd-7
changeset: 799514:4eef8c9b2b9d
user: snj <snj%NetBSD.org@localhost>
date: Thu Jul 30 15:43:36 2015 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #904):
sys/external/bsd/drm2/dist/drm/drm_bufs.c: revision 1.7
sys/external/bsd/drm2/dist/include/drm/drmP.h: revision 1.11
sys/external/bsd/drm2/drm/drm_memory.c: revision 1.7
sys/external/bsd/drm2/pci/drm_pci.c: revision 1.13
Replace drm_ioremap by drm_core_ioremap, reducing diff a little.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_bufs.c | 8 ++++----
sys/external/bsd/drm2/dist/include/drm/drmP.h | 4 +---
sys/external/bsd/drm2/drm/drm_memory.c | 15 ++++++++-------
sys/external/bsd/drm2/pci/drm_pci.c | 6 +++---
4 files changed, 16 insertions(+), 17 deletions(-)
diffs (133 lines):
diff -r fca53217304b -r 4eef8c9b2b9d sys/external/bsd/drm2/dist/drm/drm_bufs.c
--- a/sys/external/bsd/drm2/dist/drm/drm_bufs.c Thu Jul 30 15:41:44 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_bufs.c Thu Jul 30 15:43:36 2015 +0000
@@ -213,7 +213,7 @@
}
if (map->type == _DRM_REGISTERS) {
#ifdef __NetBSD__
- map->handle = drm_ioremap(dev, map);
+ drm_core_ioremap(map, dev);
#else
if (map->flags & _DRM_WRITE_COMBINING)
map->handle = ioremap_wc(map->offset,
@@ -351,7 +351,7 @@
if (!list) {
if (map->type == _DRM_REGISTERS)
#ifdef __NetBSD__
- drm_iounmap(dev, map);
+ drm_core_ioremapfree(map, dev);
#else
iounmap(map->handle);
#endif
@@ -372,7 +372,7 @@
if (ret) {
if (map->type == _DRM_REGISTERS)
#ifdef __NetBSD__ /* XXX What about other map types...? */
- drm_iounmap(dev, map);
+ drm_core_ioremapfree(map, dev);
#else
iounmap(map->handle);
#endif
@@ -494,7 +494,7 @@
switch (map->type) {
case _DRM_REGISTERS:
#ifdef __NetBSD__
- drm_iounmap(dev, map);
+ drm_core_ioremapfree(map, dev);
#else
iounmap(map->handle);
#endif
diff -r fca53217304b -r 4eef8c9b2b9d sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h Thu Jul 30 15:41:44 2015 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h Thu Jul 30 15:43:36 2015 +0000
@@ -1437,9 +1437,7 @@
/* Memory management support (drm_memory.h) */
#include <drm/drm_memory.h>
-#ifdef __NetBSD__ /* XXX move to drm_memory.h */
-extern void *drm_ioremap(struct drm_device *dev, struct drm_local_map *map);
-extern void drm_iounmap(struct drm_device *dev, struct drm_local_map *map);
+#ifdef __NetBSD__
extern int drm_limit_dma_space(struct drm_device *, resource_size_t,
resource_size_t);
#endif
diff -r fca53217304b -r 4eef8c9b2b9d sys/external/bsd/drm2/drm/drm_memory.c
--- a/sys/external/bsd/drm2/drm/drm_memory.c Thu Jul 30 15:41:44 2015 +0000
+++ b/sys/external/bsd/drm2/drm/drm_memory.c Thu Jul 30 15:43:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_memory.c,v 1.6 2014/07/16 20:56:25 riastradh Exp $ */
+/* $NetBSD: drm_memory.c,v 1.6.2.1 2015/07/30 15:43:37 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.6 2014/07/16 20:56:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.6.2.1 2015/07/30 15:43:37 snj Exp $");
#ifdef _KERNEL_OPT
#include "agp_i810.h"
@@ -74,8 +74,8 @@
return false;
}
-void *
-drm_ioremap(struct drm_device *dev, struct drm_local_map *map)
+void
+drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev)
{
const bus_space_tag_t bst = dev->bst;
unsigned int unit;
@@ -125,19 +125,20 @@
}
/* Failure! */
- return NULL;
+ return;
win: map->lm_data.bus_space.bst = bst;
- return bus_space_vaddr(bst, map->lm_data.bus_space.bsh);
+ map->handle = bus_space_vaddr(bst, map->lm_data.bus_space.bsh);
}
void
-drm_iounmap(struct drm_device *dev, struct drm_local_map *map)
+drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
{
if (map->lm_data.bus_space.bus_map != NULL) {
bus_space_unmap(map->lm_data.bus_space.bst,
map->lm_data.bus_space.bsh, map->size);
map->lm_data.bus_space.bus_map = NULL;
+ map->handle = NULL;
}
}
diff -r fca53217304b -r 4eef8c9b2b9d sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c Thu Jul 30 15:41:44 2015 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c Thu Jul 30 15:43:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.c,v 1.6.2.2 2015/03/06 21:39:11 snj Exp $ */
+/* $NetBSD: drm_pci.c,v 1.6.2.3 2015/07/30 15:43:37 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.6.2.2 2015/03/06 21:39:11 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.6.2.3 2015/07/30 15:43:37 snj Exp $");
#include <sys/types.h>
#include <sys/errno.h>
@@ -140,7 +140,7 @@
continue;
}
- /* Inquire about it. We'll map it in drm_ioremap. */
+ /* Inquire about it. We'll map it in drm_core_ioremap. */
if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, reg, type,
&bm->bm_base, &bm->bm_size, &bm->bm_flags) != 0) {
aprint_debug_dev(self, "map %u failed\n", unit);
Home |
Main Index |
Thread Index |
Old Index