]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/core/include/subdev/bar.h
Merge tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / core / include / subdev / bar.h
1 #ifndef __NOUVEAU_BAR_H__
2 #define __NOUVEAU_BAR_H__
3
4 #include <core/subdev.h>
5 #include <core/device.h>
6
7 struct nouveau_mem;
8 struct nouveau_vma;
9
10 struct nouveau_bar {
11         struct nouveau_subdev base;
12
13         int (*alloc)(struct nouveau_bar *, struct nouveau_object *,
14                      struct nouveau_mem *, struct nouveau_object **);
15         void __iomem *iomem;
16
17         int (*kmap)(struct nouveau_bar *, struct nouveau_mem *,
18                     u32 flags, struct nouveau_vma *);
19         int (*umap)(struct nouveau_bar *, struct nouveau_mem *,
20                     u32 flags, struct nouveau_vma *);
21         void (*unmap)(struct nouveau_bar *, struct nouveau_vma *);
22         void (*flush)(struct nouveau_bar *);
23 };
24
25 static inline struct nouveau_bar *
26 nouveau_bar(void *obj)
27 {
28         return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_BAR];
29 }
30
31 extern struct nouveau_oclass nv50_bar_oclass;
32 extern struct nouveau_oclass nvc0_bar_oclass;
33
34 #endif