Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/drm Update drm_memory.c to re...
details: https://anonhg.NetBSD.org/src/rev/8e8802ea2e26
branches: riastradh-drm2
changeset: 788222:8e8802ea2e26
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:47:19 2013 +0000
description:
Update drm_memory.c to reflect drm_local_map tagged union changes.
diffstat:
sys/external/bsd/drm2/drm/drm_memory.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diffs (89 lines):
diff -r 1df1ecf32da3 -r 8e8802ea2e26 sys/external/bsd/drm2/drm/drm_memory.c
--- a/sys/external/bsd/drm2/drm/drm_memory.c Wed Jul 24 02:47:05 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_memory.c Wed Jul 24 02:47:19 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_memory.c,v 1.1.2.2 2013/07/24 02:39:25 riastradh Exp $ */
+/* $NetBSD: drm_memory.c,v 1.1.2.3 2013/07/24 02:47:19 riastradh 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.1.2.2 2013/07/24 02:39:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.1.2.3 2013/07/24 02:47:19 riastradh Exp $");
/* XXX Cargo-culted from the old drm_memory.c. */
@@ -111,8 +111,9 @@
error = bus_space_map(bst, bm->bm_base,
bm->bm_size, bm->bm_flags, &bm->bm_bsh);
if (error) {
- if (drm_bus_borrow(map->offset, &map->bsh)) {
- map->bus_map = NULL;
+ if (drm_bus_borrow(map->offset,
+ &map->lm_data.bus_space.bsh)) {
+ map->lm_data.bus_space.bus_map = NULL;
goto win;
}
return NULL;
@@ -122,7 +123,8 @@
/* Mark it used and make a subregion just for the request. */
bm->bm_mapped++;
error = bus_space_subregion(bst, bm->bm_bsh,
- map->offset - bm->bm_base, map->size, &map->bsh);
+ map->offset - bm->bm_base, map->size,
+ &map->lm_data.bus_space.bsh);
if (error) {
/*
* Back out: unmark it and, if nobody else was
@@ -135,7 +137,7 @@
}
/* Got it! */
- map->bus_map = bm;
+ map->lm_data.bus_space.bus_map = bm;
goto win;
}
@@ -169,8 +171,8 @@
/* XXX size is an input/output parameter too...? */
map->size = bm->bm_size;
- map->bsh = bm->bm_bsh;
- map->bus_map = bm;
+ map->lm_data.bus_space.bsh = bm->bm_bsh;
+ map->lm_data.bus_space.bus_map = bm;
goto win;
} else {
const int flags = BUS_SPACE_MAP_PREFETCHABLE |
@@ -188,8 +190,8 @@
bm->bm_size = map->size;
bm->bm_flags = flags; /* XXX What for? */
- map->bsh = bm->bm_bsh;
- map->bus_map = bm;
+ map->lm_data.bus_space.bsh = bm->bm_bsh;
+ map->lm_data.bus_space.bus_map = bm;
goto win;
}
}
@@ -197,14 +199,15 @@
return NULL;
win:
- return bus_space_vaddr(bst, map->bsh);
+ map->lm_data.bus_space.bst = bst;
+ return bus_space_vaddr(bst, map->lm_data.bus_space.bsh);
}
void
drm_iounmap(struct drm_device *dev, struct drm_local_map *map)
{
const bus_space_tag_t bst = dev->bst;
- struct drm_bus_map *const bm = map->bus_map;
+ struct drm_bus_map *const bm = map->lm_data.bus_space.bus_map;
/*
* bm may be null if we have committed the horrible deed of
Home |
Main Index |
Thread Index |
Old Index