Deleted Added
full compact
drm_pci.c (259237) drm_pci.c (280353)
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 THE
19 * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 * 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 THE
19 * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: stable/10/sys/dev/drm2/drm_pci.c 259237 2013-12-11 23:15:19Z dumbbell $");
25__FBSDID("$FreeBSD: stable/10/sys/dev/drm2/drm_pci.c 280353 2015-03-22 18:32:37Z jah $");
26
27/**
28 * \file drm_pci.h
29 * \brief PCI consistent, DMA-accessible memory allocation.
30 *
31 * \author Eric Anholt <anholt@FreeBSD.org>
32 */
33

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

71 if (dmah == NULL)
72 return NULL;
73
74 /* Make sure we aren't holding mutexes here */
75 mtx_assert(&dev->dma_lock, MA_NOTOWNED);
76 if (mtx_owned(&dev->dma_lock))
77 DRM_ERROR("called while holding dma_lock\n");
78
26
27/**
28 * \file drm_pci.h
29 * \brief PCI consistent, DMA-accessible memory allocation.
30 *
31 * \author Eric Anholt <anholt@FreeBSD.org>
32 */
33

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

71 if (dmah == NULL)
72 return NULL;
73
74 /* Make sure we aren't holding mutexes here */
75 mtx_assert(&dev->dma_lock, MA_NOTOWNED);
76 if (mtx_owned(&dev->dma_lock))
77 DRM_ERROR("called while holding dma_lock\n");
78
79 ret = bus_dma_tag_create(NULL, align, 0, /* tag, align, boundary */
79 ret = bus_dma_tag_create(
80 bus_get_dma_tag(dev->device), /* parent */
81 align, 0, /* align, boundary */
80 maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */
81 NULL, NULL, /* filtfunc, filtfuncargs */
82 size, 1, size, /* maxsize, nsegs, maxsegsize */
83 0, NULL, NULL, /* flags, lockfunc, lockfuncargs */
84 &dmah->tag);
85 if (ret != 0) {
86 free(dmah, DRM_MEM_DMA);
87 return NULL;

--- 92 unchanged lines hidden ---
82 maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */
83 NULL, NULL, /* filtfunc, filtfuncargs */
84 size, 1, size, /* maxsize, nsegs, maxsegsize */
85 0, NULL, NULL, /* flags, lockfunc, lockfuncargs */
86 &dmah->tag);
87 if (ret != 0) {
88 free(dmah, DRM_MEM_DMA);
89 return NULL;

--- 92 unchanged lines hidden ---