1 #ifndef __NV50_KMS_CORE_H__
2 #define __NV50_KMS_CORE_H__
6 #include <nouveau_encoder.h>
9 const struct nv50_core_func
*func
;
10 struct nv50_dmac chan
;
14 int nv50_core_new(struct nouveau_drm
*, struct nv50_core
**);
15 void nv50_core_del(struct nv50_core
**);
17 struct nv50_core_func
{
18 int (*init
)(struct nv50_core
*);
19 void (*ntfy_init
)(struct nouveau_bo
*, u32 offset
);
20 int (*caps_init
)(struct nouveau_drm
*, struct nv50_disp
*);
21 int (*ntfy_wait_done
)(struct nouveau_bo
*, u32 offset
,
22 struct nvif_device
*);
23 int (*update
)(struct nv50_core
*, u32
*interlock
, bool ntfy
);
26 int (*owner
)(struct nv50_core
*);
29 const struct nv50_head_func
*head
;
30 #if IS_ENABLED(CONFIG_DEBUG_FS)
31 const struct nv50_crc_func
*crc
;
33 const struct nv50_outp_func
{
34 int (*ctrl
)(struct nv50_core
*, int or, u32 ctrl
,
35 struct nv50_head_atom
*);
36 /* XXX: Only used by SORs and PIORs for now */
37 void (*get_caps
)(struct nv50_disp
*,
38 struct nouveau_encoder
*, int or);
42 int core507d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);
43 int core507d_new_(const struct nv50_core_func
*, struct nouveau_drm
*, s32
,
45 int core507d_init(struct nv50_core
*);
46 void core507d_ntfy_init(struct nouveau_bo
*, u32
);
47 int core507d_read_caps(struct nv50_disp
*disp
);
48 int core507d_caps_init(struct nouveau_drm
*, struct nv50_disp
*);
49 int core507d_ntfy_wait_done(struct nouveau_bo
*, u32
, struct nvif_device
*);
50 int core507d_update(struct nv50_core
*, u32
*, bool);
52 extern const struct nv50_outp_func dac507d
;
53 extern const struct nv50_outp_func sor507d
;
54 extern const struct nv50_outp_func pior507d
;
56 int core827d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);
58 int core907d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);
59 int core907d_caps_init(struct nouveau_drm
*drm
, struct nv50_disp
*disp
);
60 extern const struct nv50_outp_func dac907d
;
61 extern const struct nv50_outp_func sor907d
;
63 int core917d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);
65 int corec37d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);
66 int corec37d_caps_init(struct nouveau_drm
*, struct nv50_disp
*);
67 int corec37d_ntfy_wait_done(struct nouveau_bo
*, u32
, struct nvif_device
*);
68 int corec37d_update(struct nv50_core
*, u32
*, bool);
69 int corec37d_wndw_owner(struct nv50_core
*);
70 extern const struct nv50_outp_func sorc37d
;
72 int corec57d_new(struct nouveau_drm
*, s32
, struct nv50_core
**);