1 #ifndef __NVKM_DISP_PRIV_H__ 2 #define __NVKM_DISP_PRIV_H__ 3 #include <engine/disp.h> 4 5 struct nvkm_disp_impl { 6 struct nvkm_oclass base; 7 struct nvkm_oclass **outp; 8 struct nvkm_oclass **conn; 9 const struct nvkm_event_func *vblank; 10 }; 11 12 #define nvkm_disp_create(p,e,c,h,i,x,d) \ 13 nvkm_disp_create_((p), (e), (c), (h), (i), (x), \ 14 sizeof(**d), (void **)d) 15 #define nvkm_disp_destroy(d) ({ \ 16 struct nvkm_disp *disp = (d); \ 17 _nvkm_disp_dtor(nv_object(disp)); \ 18 }) 19 #define nvkm_disp_init(d) ({ \ 20 struct nvkm_disp *disp = (d); \ 21 _nvkm_disp_init(nv_object(disp)); \ 22 }) 23 #define nvkm_disp_fini(d,s) ({ \ 24 struct nvkm_disp *disp = (d); \ 25 _nvkm_disp_fini(nv_object(disp), (s)); \ 26 }) 27 28 int nvkm_disp_create_(struct nvkm_object *, struct nvkm_object *, 29 struct nvkm_oclass *, int heads, 30 const char *, const char *, int, void **); 31 void _nvkm_disp_dtor(struct nvkm_object *); 32 int _nvkm_disp_init(struct nvkm_object *); 33 int _nvkm_disp_fini(struct nvkm_object *, bool); 34 35 extern struct nvkm_oclass *nvkm_output_oclass; 36 extern struct nvkm_oclass *nvkm_connector_oclass; 37 38 int nvkm_disp_vblank_ctor(struct nvkm_object *, void *data, u32 size, 39 struct nvkm_notify *); 40 void nvkm_disp_vblank(struct nvkm_disp *, int head); 41 int nvkm_disp_ntfy(struct nvkm_object *, u32, struct nvkm_event **); 42 #endif 43