2014-02-20 11:33:34 +00:00
|
|
|
#ifndef __NVKM_DISP_PRIV_H__
|
|
|
|
#define __NVKM_DISP_PRIV_H__
|
|
|
|
|
2014-05-16 04:36:15 +00:00
|
|
|
#include <subdev/bios.h>
|
|
|
|
#include <subdev/bios/dcb.h>
|
|
|
|
#include <subdev/bios/conn.h>
|
|
|
|
|
2014-02-20 11:33:34 +00:00
|
|
|
#include <engine/disp.h>
|
|
|
|
|
|
|
|
struct nouveau_disp_impl {
|
|
|
|
struct nouveau_oclass base;
|
2014-05-16 04:36:15 +00:00
|
|
|
struct nouveau_oclass **outp;
|
|
|
|
struct nouveau_oclass **conn;
|
2014-08-09 18:10:20 +00:00
|
|
|
const struct nvkm_event_func *vblank;
|
2014-02-20 11:33:34 +00:00
|
|
|
};
|
|
|
|
|
2014-05-14 00:26:02 +00:00
|
|
|
#define nouveau_disp_create(p,e,c,h,i,x,d) \
|
|
|
|
nouveau_disp_create_((p), (e), (c), (h), (i), (x), \
|
|
|
|
sizeof(**d), (void **)d)
|
|
|
|
#define nouveau_disp_destroy(d) ({ \
|
|
|
|
struct nouveau_disp *disp = (d); \
|
|
|
|
_nouveau_disp_dtor(nv_object(disp)); \
|
|
|
|
})
|
|
|
|
#define nouveau_disp_init(d) ({ \
|
|
|
|
struct nouveau_disp *disp = (d); \
|
|
|
|
_nouveau_disp_init(nv_object(disp)); \
|
|
|
|
})
|
|
|
|
#define nouveau_disp_fini(d,s) ({ \
|
|
|
|
struct nouveau_disp *disp = (d); \
|
|
|
|
_nouveau_disp_fini(nv_object(disp), (s)); \
|
|
|
|
})
|
|
|
|
|
|
|
|
int nouveau_disp_create_(struct nouveau_object *, struct nouveau_object *,
|
|
|
|
struct nouveau_oclass *, int heads,
|
|
|
|
const char *, const char *, int, void **);
|
|
|
|
void _nouveau_disp_dtor(struct nouveau_object *);
|
|
|
|
int _nouveau_disp_init(struct nouveau_object *);
|
|
|
|
int _nouveau_disp_fini(struct nouveau_object *, bool);
|
|
|
|
|
2014-05-16 04:36:15 +00:00
|
|
|
extern struct nouveau_oclass *nvkm_output_oclass;
|
|
|
|
extern struct nouveau_oclass *nvkm_connector_oclass;
|
|
|
|
|
2014-08-11 03:56:56 +00:00
|
|
|
int nouveau_disp_vblank_ctor(struct nouveau_object *, void *data, u32 size,
|
|
|
|
struct nvkm_notify *);
|
2014-08-09 18:10:20 +00:00
|
|
|
void nouveau_disp_vblank(struct nouveau_disp *, int head);
|
2014-08-09 18:10:28 +00:00
|
|
|
int nouveau_disp_ntfy(struct nouveau_object *, u32, struct nvkm_event **);
|
2014-08-09 18:10:20 +00:00
|
|
|
|
2014-02-20 11:33:34 +00:00
|
|
|
#endif
|