Deleted Added
full compact
drm_vm.c (183573) drm_vm.c (189914)
1/*-
2 * Copyright 2003 Eric Anholt
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,

--- 8 unchanged lines hidden (view full) ---

17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * ERIC ANHOLT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24#include <sys/cdefs.h>
1/*-
2 * Copyright 2003 Eric Anholt
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,

--- 8 unchanged lines hidden (view full) ---

17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * ERIC ANHOLT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/drm/drm_vm.c 183573 2008-10-03 16:59:11Z rnoland $");
25__FBSDID("$FreeBSD: head/sys/dev/drm/drm_vm.c 189914 2009-03-17 03:50:35Z rnoland $");
26
27/** @file drm_vm.c
28 * Support code for mmaping of DRM maps.
29 */
30
31#include "dev/drm/drmP.h"
32#include "dev/drm/drm.h"
33

--- 47 unchanged lines hidden (view full) ---

81 bit longer. */
82 DRM_LOCK();
83 TAILQ_FOREACH(map, &dev->maplist, link) {
84 if (offset >= map->offset && offset < map->offset + map->size)
85 break;
86 }
87
88 if (map == NULL) {
26
27/** @file drm_vm.c
28 * Support code for mmaping of DRM maps.
29 */
30
31#include "dev/drm/drmP.h"
32#include "dev/drm/drm.h"
33

--- 47 unchanged lines hidden (view full) ---

81 bit longer. */
82 DRM_LOCK();
83 TAILQ_FOREACH(map, &dev->maplist, link) {
84 if (offset >= map->offset && offset < map->offset + map->size)
85 break;
86 }
87
88 if (map == NULL) {
89 DRM_DEBUG("Can't find map, requested offset = %016lx\n",
90 offset);
91 TAILQ_FOREACH(map, &dev->maplist, link) {
92 DRM_DEBUG("map offset = %016lx, handle = %016lx\n",
93 map->offset, (unsigned long)map->handle);
94 }
89 DRM_UNLOCK();
95 DRM_UNLOCK();
90 DRM_DEBUG("can't find map\n");
91 return -1;
92 }
93 if (((map->flags&_DRM_RESTRICTED) && !DRM_SUSER(DRM_CURPROC))) {
94 DRM_UNLOCK();
95 DRM_DEBUG("restricted map\n");
96 return -1;
97 }
98 type = map->type;

--- 24 unchanged lines hidden ---
96 return -1;
97 }
98 if (((map->flags&_DRM_RESTRICTED) && !DRM_SUSER(DRM_CURPROC))) {
99 DRM_UNLOCK();
100 DRM_DEBUG("restricted map\n");
101 return -1;
102 }
103 type = map->type;

--- 24 unchanged lines hidden ---