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 Implement drm_getsarea in...
details: https://anonhg.NetBSD.org/src/rev/78d7a976a0a6
branches: riastradh-drm2
changeset: 788433:78d7a976a0a6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:46:37 2013 +0000
description:
Implement drm_getsarea in drm_drv.c.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 6c9d5e81da73 -r 78d7a976a0a6 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:46:22 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:46:37 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.1.2.11 2013/07/24 03:26:02 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.1.2.12 2013/07/24 03:46:37 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.11 2013/07/24 03:26:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.12 2013/07/24 03:46:37 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -607,3 +607,24 @@
return;
}
}
+
+struct drm_local_map *
+drm_getsarea(struct drm_device *dev)
+{
+ struct drm_map_list *entry;
+
+ list_for_each_entry(entry, &dev->maplist, head) {
+ struct drm_local_map *const map = entry->map;
+
+ if (map == NULL)
+ continue;
+ if (map->type != _DRM_SHM)
+ continue;
+ if (!ISSET(map->flags, _DRM_CONTAINS_LOCK))
+ continue;
+
+ return map;
+ }
+
+ return NULL;
+}
Home |
Main Index |
Thread Index |
Old Index