• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __NVKM_DISP_PRIV_H__
2 #define __NVKM_DISP_PRIV_H__
3 
4 #include <subdev/bios.h>
5 #include <subdev/bios/dcb.h>
6 #include <subdev/bios/conn.h>
7 
8 #include <engine/disp.h>
9 
10 struct nouveau_disp_impl {
11 	struct nouveau_oclass base;
12 	struct nouveau_oclass **outp;
13 	struct nouveau_oclass **conn;
14 	const struct nvkm_event_func *vblank;
15 };
16 
17 #define nouveau_disp_create(p,e,c,h,i,x,d)                                     \
18 	nouveau_disp_create_((p), (e), (c), (h), (i), (x),                     \
19 			     sizeof(**d), (void **)d)
20 #define nouveau_disp_destroy(d) ({                                             \
21 	struct nouveau_disp *disp = (d);                                       \
22 	_nouveau_disp_dtor(nv_object(disp));                                   \
23 })
24 #define nouveau_disp_init(d) ({                                                \
25 	struct nouveau_disp *disp = (d);                                       \
26 	_nouveau_disp_init(nv_object(disp));                                   \
27 })
28 #define nouveau_disp_fini(d,s) ({                                              \
29 	struct nouveau_disp *disp = (d);                                       \
30 	_nouveau_disp_fini(nv_object(disp), (s));                              \
31 })
32 
33 int  nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *,
34 			  struct nouveau_oclass *, int heads,
35 			  const char *, const char *, int, void **);
36 void _nouveau_disp_dtor(struct nouveau_object *);
37 int  _nouveau_disp_init(struct nouveau_object *);
38 int  _nouveau_disp_fini(struct nouveau_object *, bool);
39 
40 extern struct nouveau_oclass *nvkm_output_oclass;
41 extern struct nouveau_oclass *nvkm_connector_oclass;
42 
43 int  nouveau_disp_vblank_ctor(struct nouveau_object *, void *data, u32 size,
44 			      struct nvkm_notify *);
45 void nouveau_disp_vblank(struct nouveau_disp *, int head);
46 int  nouveau_disp_ntfy(struct nouveau_object *, u32, struct nvkm_event **);
47 
48 #endif
49