diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-07-18 08:15:33 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-02 23:12:53 -0400 |
commit | 66f247234d1c47da480f687b8104d8935d05b404 (patch) | |
tree | 845c01a9c28aa99a840f87edbd3d6eaa334a1160 | |
parent | 8be21a6402baa502cd6475e137760afdb2b5dba8 (diff) |
drm/nouveau: pull nouveau_gem definitions into their own header
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 34 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.h | 43 |
2 files changed, 44 insertions, 33 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 2374bb6f3c91..290b7c2e2f79 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -105,15 +105,7 @@ struct nouveau_mem; | |||
105 | #define NOUVEAU_MAX_TILE_NR 15 | 105 | #define NOUVEAU_MAX_TILE_NR 15 |
106 | 106 | ||
107 | #include "nouveau_bo.h" | 107 | #include "nouveau_bo.h" |
108 | 108 | #include "nouveau_gem.h" | |
109 | #define nouveau_bo_tile_layout(nvbo) \ | ||
110 | ((nvbo)->tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) | ||
111 | |||
112 | static inline struct nouveau_bo * | ||
113 | nouveau_gem_object(struct drm_gem_object *gem) | ||
114 | { | ||
115 | return gem ? gem->driver_private : NULL; | ||
116 | } | ||
117 | 109 | ||
118 | /* TODO: submit equivalent to TTM generic API upstream? */ | 110 | /* TODO: submit equivalent to TTM generic API upstream? */ |
119 | static inline void __iomem * | 111 | static inline void __iomem * |
@@ -874,30 +866,6 @@ void nvd0_display_flip_stop(struct drm_crtc *); | |||
874 | int nvd0_display_flip_next(struct drm_crtc *, struct drm_framebuffer *, | 866 | int nvd0_display_flip_next(struct drm_crtc *, struct drm_framebuffer *, |
875 | struct nouveau_channel *, u32 swap_interval); | 867 | struct nouveau_channel *, u32 swap_interval); |
876 | 868 | ||
877 | /* nouveau_gem.c */ | ||
878 | extern int nouveau_gem_new(struct drm_device *, int size, int align, | ||
879 | uint32_t domain, uint32_t tile_mode, | ||
880 | uint32_t tile_flags, struct nouveau_bo **); | ||
881 | extern int nouveau_gem_object_new(struct drm_gem_object *); | ||
882 | extern void nouveau_gem_object_del(struct drm_gem_object *); | ||
883 | extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *); | ||
884 | extern void nouveau_gem_object_close(struct drm_gem_object *, | ||
885 | struct drm_file *); | ||
886 | extern int nouveau_gem_ioctl_new(struct drm_device *, void *, | ||
887 | struct drm_file *); | ||
888 | extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *, | ||
889 | struct drm_file *); | ||
890 | extern int nouveau_gem_ioctl_cpu_prep(struct drm_device *, void *, | ||
891 | struct drm_file *); | ||
892 | extern int nouveau_gem_ioctl_cpu_fini(struct drm_device *, void *, | ||
893 | struct drm_file *); | ||
894 | extern int nouveau_gem_ioctl_info(struct drm_device *, void *, | ||
895 | struct drm_file *); | ||
896 | |||
897 | extern struct dma_buf *nouveau_gem_prime_export(struct drm_device *dev, | ||
898 | struct drm_gem_object *obj, int flags); | ||
899 | extern struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev, | ||
900 | struct dma_buf *dma_buf); | ||
901 | 869 | ||
902 | /* nouveau_display.c */ | 870 | /* nouveau_display.c */ |
903 | int nouveau_display_create(struct drm_device *dev); | 871 | int nouveau_display_create(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.h b/drivers/gpu/drm/nouveau/nouveau_gem.h new file mode 100644 index 000000000000..085ece91c395 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nouveau_gem.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef __NOUVEAU_GEM_H__ | ||
2 | #define __NOUVEAU_GEM_H__ | ||
3 | |||
4 | #include "drmP.h" | ||
5 | |||
6 | #include <nouveau_drm.h> | ||
7 | #include "nouveau_bo.h" | ||
8 | |||
9 | #define nouveau_bo_tile_layout(nvbo) \ | ||
10 | ((nvbo)->tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) | ||
11 | |||
12 | static inline struct nouveau_bo * | ||
13 | nouveau_gem_object(struct drm_gem_object *gem) | ||
14 | { | ||
15 | return gem ? gem->driver_private : NULL; | ||
16 | } | ||
17 | |||
18 | /* nouveau_gem.c */ | ||
19 | extern int nouveau_gem_new(struct drm_device *, int size, int align, | ||
20 | uint32_t domain, uint32_t tile_mode, | ||
21 | uint32_t tile_flags, struct nouveau_bo **); | ||
22 | extern int nouveau_gem_object_new(struct drm_gem_object *); | ||
23 | extern void nouveau_gem_object_del(struct drm_gem_object *); | ||
24 | extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *); | ||
25 | extern void nouveau_gem_object_close(struct drm_gem_object *, | ||
26 | struct drm_file *); | ||
27 | extern int nouveau_gem_ioctl_new(struct drm_device *, void *, | ||
28 | struct drm_file *); | ||
29 | extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *, | ||
30 | struct drm_file *); | ||
31 | extern int nouveau_gem_ioctl_cpu_prep(struct drm_device *, void *, | ||
32 | struct drm_file *); | ||
33 | extern int nouveau_gem_ioctl_cpu_fini(struct drm_device *, void *, | ||
34 | struct drm_file *); | ||
35 | extern int nouveau_gem_ioctl_info(struct drm_device *, void *, | ||
36 | struct drm_file *); | ||
37 | |||
38 | extern struct dma_buf *nouveau_gem_prime_export(struct drm_device *dev, | ||
39 | struct drm_gem_object *obj, int flags); | ||
40 | extern struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev, | ||
41 | struct dma_buf *dma_buf); | ||
42 | |||
43 | #endif | ||