1 #ifndef __NV50_KMS_CORE_H__ 2 #define __NV50_KMS_CORE_H__ 3 #include "disp.h" 4 #include "atom.h" 5 #include <nouveau_encoder.h> 6 7 struct nv50_core { 8 const struct nv50_core_func *func; 9 struct nv50_dmac chan; 10 bool assign_windows; 11 }; 12 13 int nv50_core_new(struct nouveau_drm *, struct nv50_core **); 14 void nv50_core_del(struct nv50_core **); 15 16 struct nv50_core_func { 17 void (*init)(struct nv50_core *); 18 void (*ntfy_init)(struct nouveau_bo *, u32 offset); 19 int (*caps_init)(struct nouveau_drm *, struct nv50_disp *); 20 int (*ntfy_wait_done)(struct nouveau_bo *, u32 offset, 21 struct nvif_device *); 22 void (*update)(struct nv50_core *, u32 *interlock, bool ntfy); 23 24 struct { 25 void (*owner)(struct nv50_core *); 26 } wndw; 27 28 const struct nv50_head_func *head; 29 const struct nv50_outp_func { 30 void (*ctrl)(struct nv50_core *, int or, u32 ctrl, 31 struct nv50_head_atom *); 32 /* XXX: Only used by SORs and PIORs for now */ 33 void (*get_caps)(struct nv50_disp *, 34 struct nouveau_encoder *, int or); 35 } *dac, *pior, *sor; 36 }; 37 38 int core507d_new(struct nouveau_drm *, s32, struct nv50_core **); 39 int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32, 40 struct nv50_core **); 41 void core507d_init(struct nv50_core *); 42 void core507d_ntfy_init(struct nouveau_bo *, u32); 43 int core507d_caps_init(struct nouveau_drm *, struct nv50_disp *); 44 int core507d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *); 45 void core507d_update(struct nv50_core *, u32 *, bool); 46 47 extern const struct nv50_outp_func dac507d; 48 extern const struct nv50_outp_func sor507d; 49 extern const struct nv50_outp_func pior507d; 50 51 int core827d_new(struct nouveau_drm *, s32, struct nv50_core **); 52 53 int core907d_new(struct nouveau_drm *, s32, struct nv50_core **); 54 extern const struct nv50_outp_func dac907d; 55 extern const struct nv50_outp_func sor907d; 56 57 int core917d_new(struct nouveau_drm *, s32, struct nv50_core **); 58 59 int corec37d_new(struct nouveau_drm *, s32, struct nv50_core **); 60 int corec37d_caps_init(struct nouveau_drm *, struct nv50_disp *); 61 int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *); 62 void corec37d_update(struct nv50_core *, u32 *, bool); 63 void corec37d_wndw_owner(struct nv50_core *); 64 extern const struct nv50_outp_func sorc37d; 65 66 int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **); 67 #endif 68