Linux Audio

Check our new training course

Loading...
 1#ifndef __NV50_KMS_CORE_H__
 2#define __NV50_KMS_CORE_H__
 3#include "disp.h"
 4#include "atom.h"
 5#include "crc.h"
 6#include <nouveau_encoder.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	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);
24
25	struct {
26		int (*owner)(struct nv50_core *);
27	} wndw;
28
29	const struct nv50_head_func *head;
30#if IS_ENABLED(CONFIG_DEBUG_FS)
31	const struct nv50_crc_func *crc;
32#endif
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);
39	} *dac, *pior, *sor;
40};
41
42int core507d_new(struct nouveau_drm *, s32, struct nv50_core **);
43int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32,
44		  struct nv50_core **);
45int core507d_init(struct nv50_core *);
46void core507d_ntfy_init(struct nouveau_bo *, u32);
47int core507d_read_caps(struct nv50_disp *disp);
48int core507d_caps_init(struct nouveau_drm *, struct nv50_disp *);
49int core507d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
50int core507d_update(struct nv50_core *, u32 *, bool);
51
52extern const struct nv50_outp_func dac507d;
53extern const struct nv50_outp_func sor507d;
54extern const struct nv50_outp_func pior507d;
55
56int core827d_new(struct nouveau_drm *, s32, struct nv50_core **);
57
58int core907d_new(struct nouveau_drm *, s32, struct nv50_core **);
59int core907d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp);
60extern const struct nv50_outp_func dac907d;
61extern const struct nv50_outp_func sor907d;
62
63int core917d_new(struct nouveau_drm *, s32, struct nv50_core **);
64
65int corec37d_new(struct nouveau_drm *, s32, struct nv50_core **);
66int corec37d_caps_init(struct nouveau_drm *, struct nv50_disp *);
67int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
68int corec37d_update(struct nv50_core *, u32 *, bool);
69int corec37d_wndw_owner(struct nv50_core *);
70extern const struct nv50_outp_func sorc37d;
71
72int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **);
73#endif