forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/gpu/drm/nouveau/dispnv50/core.h
....@@ -2,36 +2,52 @@
22 #define __NV50_KMS_CORE_H__
33 #include "disp.h"
44 #include "atom.h"
5
+#include "crc.h"
6
+#include <nouveau_encoder.h>
57
68 struct nv50_core {
79 const struct nv50_core_func *func;
810 struct nv50_dmac chan;
11
+ bool assign_windows;
912 };
1013
1114 int nv50_core_new(struct nouveau_drm *, struct nv50_core **);
1215 void nv50_core_del(struct nv50_core **);
1316
1417 struct nv50_core_func {
15
- void (*init)(struct nv50_core *);
18
+ int (*init)(struct nv50_core *);
1619 void (*ntfy_init)(struct nouveau_bo *, u32 offset);
20
+ int (*caps_init)(struct nouveau_drm *, struct nv50_disp *);
1721 int (*ntfy_wait_done)(struct nouveau_bo *, u32 offset,
1822 struct nvif_device *);
19
- void (*update)(struct nv50_core *, u32 *interlock, bool ntfy);
23
+ int (*update)(struct nv50_core *, u32 *interlock, bool ntfy);
24
+
25
+ struct {
26
+ int (*owner)(struct nv50_core *);
27
+ } wndw;
2028
2129 const struct nv50_head_func *head;
30
+#if IS_ENABLED(CONFIG_DEBUG_FS)
31
+ const struct nv50_crc_func *crc;
32
+#endif
2233 const struct nv50_outp_func {
23
- void (*ctrl)(struct nv50_core *, int or, u32 ctrl,
34
+ int (*ctrl)(struct nv50_core *, int or, u32 ctrl,
2435 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);
2539 } *dac, *pior, *sor;
2640 };
2741
2842 int core507d_new(struct nouveau_drm *, s32, struct nv50_core **);
2943 int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32,
3044 struct nv50_core **);
31
-void core507d_init(struct nv50_core *);
45
+int core507d_init(struct nv50_core *);
3246 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 *);
3349 int core507d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
34
-void core507d_update(struct nv50_core *, u32 *, bool);
50
+int core507d_update(struct nv50_core *, u32 *, bool);
3551
3652 extern const struct nv50_outp_func dac507d;
3753 extern const struct nv50_outp_func sor507d;
....@@ -40,11 +56,18 @@
4056 int core827d_new(struct nouveau_drm *, s32, struct nv50_core **);
4157
4258 int core907d_new(struct nouveau_drm *, s32, struct nv50_core **);
59
+int core907d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp);
4360 extern const struct nv50_outp_func dac907d;
4461 extern const struct nv50_outp_func sor907d;
4562
4663 int core917d_new(struct nouveau_drm *, s32, struct nv50_core **);
4764
4865 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 *);
4970 extern const struct nv50_outp_func sorc37d;
71
+
72
+int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **);
5073 #endif