]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/gpu/drm/nouveau/core/include/engine/disp.h
Merge branch 'x86/nuke386' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[mirror_ubuntu-artful-kernel.git] / drivers / gpu / drm / nouveau / core / include / engine / disp.h
1 #ifndef __NOUVEAU_DISP_H__
2 #define __NOUVEAU_DISP_H__
3
4 #include <core/object.h>
5 #include <core/engine.h>
6 #include <core/device.h>
7
8 struct nouveau_disp {
9 struct nouveau_engine base;
10
11 struct {
12 struct list_head list;
13 spinlock_t lock;
14 void (*notify)(void *, int);
15 void (*get)(void *, int);
16 void (*put)(void *, int);
17 void *data;
18 } vblank;
19 };
20
21 static inline struct nouveau_disp *
22 nouveau_disp(void *obj)
23 {
24 return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_DISP];
25 }
26
27 #define nouveau_disp_create(p,e,c,i,x,d) \
28 nouveau_engine_create((p), (e), (c), true, (i), (x), (d))
29 #define nouveau_disp_destroy(d) \
30 nouveau_engine_destroy(&(d)->base)
31 #define nouveau_disp_init(d) \
32 nouveau_engine_init(&(d)->base)
33 #define nouveau_disp_fini(d,s) \
34 nouveau_engine_fini(&(d)->base, (s))
35
36 #define _nouveau_disp_dtor _nouveau_engine_dtor
37 #define _nouveau_disp_init _nouveau_engine_init
38 #define _nouveau_disp_fini _nouveau_engine_fini
39
40 extern struct nouveau_oclass nv04_disp_oclass;
41 extern struct nouveau_oclass nv50_disp_oclass;
42 extern struct nouveau_oclass nv84_disp_oclass;
43 extern struct nouveau_oclass nva0_disp_oclass;
44 extern struct nouveau_oclass nv94_disp_oclass;
45 extern struct nouveau_oclass nva3_disp_oclass;
46 extern struct nouveau_oclass nvd0_disp_oclass;
47 extern struct nouveau_oclass nve0_disp_oclass;
48
49 #endif