1 #ifndef __NVKM_DISP_PRIV_H__
2 #define __NVKM_DISP_PRIV_H__
4 #include <subdev/bios.h>
5 #include <subdev/bios/dcb.h>
6 #include <subdev/bios/conn.h>
8 #include <engine/disp.h>
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;
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)); \
24 #define nouveau_disp_init(d) ({ \
25 struct nouveau_disp *disp = (d); \
26 _nouveau_disp_init(nv_object(disp)); \
28 #define nouveau_disp_fini(d,s) ({ \
29 struct nouveau_disp *disp = (d); \
30 _nouveau_disp_fini(nv_object(disp), (s)); \
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);
40 extern struct nouveau_oclass *nvkm_output_oclass;
41 extern struct nouveau_oclass *nvkm_connector_oclass;
43 int nouveau_disp_vblank_ctor(void *data, u32 size, struct nvkm_notify *);
44 void nouveau_disp_vblank(struct nouveau_disp *, int head);
45 int nouveau_disp_ntfy(struct nouveau_object *, u32, struct nvkm_event **);