1/* $NetBSD: core.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */ 2 3#ifndef __NV50_KMS_CORE_H__ 4#define __NV50_KMS_CORE_H__ 5#include "disp.h" 6#include "atom.h" 7 8struct nv50_core { 9 const struct nv50_core_func *func; 10 struct nv50_dmac chan; 11 bool assign_windows; 12}; 13 14int nv50_core_new(struct nouveau_drm *, struct nv50_core **); 15void nv50_core_del(struct nv50_core **); 16 17struct nv50_core_func { 18 void (*init)(struct nv50_core *); 19 void (*ntfy_init)(struct nouveau_bo *, u32 offset); 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 } *dac, *pior, *sor; 33}; 34 35int core507d_new(struct nouveau_drm *, s32, struct nv50_core **); 36int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32, 37 struct nv50_core **); 38void core507d_init(struct nv50_core *); 39void core507d_ntfy_init(struct nouveau_bo *, u32); 40int core507d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *); 41void core507d_update(struct nv50_core *, u32 *, bool); 42 43extern const struct nv50_outp_func dac507d; 44extern const struct nv50_outp_func sor507d; 45extern const struct nv50_outp_func pior507d; 46 47int core827d_new(struct nouveau_drm *, s32, struct nv50_core **); 48 49int core907d_new(struct nouveau_drm *, s32, struct nv50_core **); 50extern const struct nv50_outp_func dac907d; 51extern const struct nv50_outp_func sor907d; 52 53int core917d_new(struct nouveau_drm *, s32, struct nv50_core **); 54 55int corec37d_new(struct nouveau_drm *, s32, struct nv50_core **); 56int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *); 57void corec37d_update(struct nv50_core *, u32 *, bool); 58void corec37d_wndw_owner(struct nv50_core *); 59extern const struct nv50_outp_func sorc37d; 60 61int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **); 62#endif 63