diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-08-29 06:12:35 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-10 03:40:51 -0400 |
commit | d6db6564457c5ad617c3bcf44bed58a227f4c702 (patch) | |
tree | 70bd4e5b7d3d1f26949c451576370c4cd6077e3a | |
parent | 32abc552bc869edcfa7b1c6ee365e0b58a134ec6 (diff) |
drm: merge drm_memory.h into drm_memory.c
The drm_memory.h header is only used to define PAGE_AGP, which is only
used in drm_memory.c. Fold the header into drm_memory.c and drop it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_memory.c | 11 | ||||
-rw-r--r-- | include/drm/drmP.h | 6 | ||||
-rw-r--r-- | include/drm/drm_memory.h | 59 |
3 files changed, 13 insertions, 63 deletions
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 7888dad5ab74..62fda6aaad90 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c | |||
@@ -39,6 +39,17 @@ | |||
39 | #include "drm_legacy.h" | 39 | #include "drm_legacy.h" |
40 | 40 | ||
41 | #if __OS_HAS_AGP | 41 | #if __OS_HAS_AGP |
42 | |||
43 | #ifdef HAVE_PAGE_AGP | ||
44 | # include <asm/agp.h> | ||
45 | #else | ||
46 | # ifdef __powerpc__ | ||
47 | # define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) | ||
48 | # else | ||
49 | # define PAGE_AGP PAGE_KERNEL | ||
50 | # endif | ||
51 | #endif | ||
52 | |||
42 | static void *agp_remap(unsigned long offset, unsigned long size, | 53 | static void *agp_remap(unsigned long offset, unsigned long size, |
43 | struct drm_device * dev) | 54 | struct drm_device * dev) |
44 | { | 55 | { |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d3504c6ff15e..294f7daf543e 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -58,6 +58,8 @@ | |||
58 | #include <linux/agp_backend.h> | 58 | #include <linux/agp_backend.h> |
59 | #include <linux/workqueue.h> | 59 | #include <linux/workqueue.h> |
60 | #include <linux/poll.h> | 60 | #include <linux/poll.h> |
61 | #include <linux/highmem.h> | ||
62 | #include <linux/vmalloc.h> | ||
61 | #include <asm/pgalloc.h> | 63 | #include <asm/pgalloc.h> |
62 | #include <drm/drm.h> | 64 | #include <drm/drm.h> |
63 | #include <drm/drm_sarea.h> | 65 | #include <drm/drm_sarea.h> |
@@ -1127,10 +1129,6 @@ extern void drm_vm_open_locked(struct drm_device *dev, struct vm_area_struct *vm | |||
1127 | extern void drm_vm_close_locked(struct drm_device *dev, struct vm_area_struct *vma); | 1129 | extern void drm_vm_close_locked(struct drm_device *dev, struct vm_area_struct *vma); |
1128 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); | 1130 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); |
1129 | 1131 | ||
1130 | /* Memory management support (drm_memory.h) */ | ||
1131 | #include <drm/drm_memory.h> | ||
1132 | |||
1133 | |||
1134 | /* Misc. IOCTL support (drm_ioctl.h) */ | 1132 | /* Misc. IOCTL support (drm_ioctl.h) */ |
1135 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, | 1133 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, |
1136 | struct drm_file *file_priv); | 1134 | struct drm_file *file_priv); |
diff --git a/include/drm/drm_memory.h b/include/drm/drm_memory.h deleted file mode 100644 index 4baf57a207e7..000000000000 --- a/include/drm/drm_memory.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /** | ||
2 | * \file drm_memory.h | ||
3 | * Memory management wrappers for DRM | ||
4 | * | ||
5 | * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||
6 | * \author Gareth Hughes <gareth@valinux.com> | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com | ||
11 | * | ||
12 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | ||
13 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | ||
14 | * All Rights Reserved. | ||
15 | * | ||
16 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
17 | * copy of this software and associated documentation files (the "Software"), | ||
18 | * to deal in the Software without restriction, including without limitation | ||
19 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
20 | * and/or sell copies of the Software, and to permit persons to whom the | ||
21 | * Software is furnished to do so, subject to the following conditions: | ||
22 | * | ||
23 | * The above copyright notice and this permission notice (including the next | ||
24 | * paragraph) shall be included in all copies or substantial portions of the | ||
25 | * Software. | ||
26 | * | ||
27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
28 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
29 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
30 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
31 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
32 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
33 | * OTHER DEALINGS IN THE SOFTWARE. | ||
34 | */ | ||
35 | |||
36 | #include <linux/highmem.h> | ||
37 | #include <linux/vmalloc.h> | ||
38 | #include <drm/drmP.h> | ||
39 | |||
40 | /** | ||
41 | * Cut down version of drm_memory_debug.h, which used to be called | ||
42 | * drm_memory.h. | ||
43 | */ | ||
44 | |||
45 | #if __OS_HAS_AGP | ||
46 | |||
47 | #ifdef HAVE_PAGE_AGP | ||
48 | #include <asm/agp.h> | ||
49 | #else | ||
50 | # ifdef __powerpc__ | ||
51 | # define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) | ||
52 | # else | ||
53 | # define PAGE_AGP PAGE_KERNEL | ||
54 | # endif | ||
55 | #endif | ||
56 | |||
57 | #else /* __OS_HAS_AGP */ | ||
58 | |||
59 | #endif | ||