| .. | .. |
|---|
| 2 | 2 | #define __NV50_KMS_CORE_H__ |
|---|
| 3 | 3 | #include "disp.h" |
|---|
| 4 | 4 | #include "atom.h" |
|---|
| 5 | +#include "crc.h" |
|---|
| 6 | +#include <nouveau_encoder.h> |
|---|
| 5 | 7 | |
|---|
| 6 | 8 | struct nv50_core { |
|---|
| 7 | 9 | const struct nv50_core_func *func; |
|---|
| 8 | 10 | struct nv50_dmac chan; |
|---|
| 11 | + bool assign_windows; |
|---|
| 9 | 12 | }; |
|---|
| 10 | 13 | |
|---|
| 11 | 14 | int nv50_core_new(struct nouveau_drm *, struct nv50_core **); |
|---|
| 12 | 15 | void nv50_core_del(struct nv50_core **); |
|---|
| 13 | 16 | |
|---|
| 14 | 17 | struct nv50_core_func { |
|---|
| 15 | | - void (*init)(struct nv50_core *); |
|---|
| 18 | + int (*init)(struct nv50_core *); |
|---|
| 16 | 19 | void (*ntfy_init)(struct nouveau_bo *, u32 offset); |
|---|
| 20 | + int (*caps_init)(struct nouveau_drm *, struct nv50_disp *); |
|---|
| 17 | 21 | int (*ntfy_wait_done)(struct nouveau_bo *, u32 offset, |
|---|
| 18 | 22 | 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; |
|---|
| 20 | 28 | |
|---|
| 21 | 29 | const struct nv50_head_func *head; |
|---|
| 30 | +#if IS_ENABLED(CONFIG_DEBUG_FS) |
|---|
| 31 | + const struct nv50_crc_func *crc; |
|---|
| 32 | +#endif |
|---|
| 22 | 33 | 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, |
|---|
| 24 | 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); |
|---|
| 25 | 39 | } *dac, *pior, *sor; |
|---|
| 26 | 40 | }; |
|---|
| 27 | 41 | |
|---|
| 28 | 42 | int core507d_new(struct nouveau_drm *, s32, struct nv50_core **); |
|---|
| 29 | 43 | int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32, |
|---|
| 30 | 44 | struct nv50_core **); |
|---|
| 31 | | -void core507d_init(struct nv50_core *); |
|---|
| 45 | +int core507d_init(struct nv50_core *); |
|---|
| 32 | 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 *); |
|---|
| 33 | 49 | 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); |
|---|
| 35 | 51 | |
|---|
| 36 | 52 | extern const struct nv50_outp_func dac507d; |
|---|
| 37 | 53 | extern const struct nv50_outp_func sor507d; |
|---|
| .. | .. |
|---|
| 40 | 56 | int core827d_new(struct nouveau_drm *, s32, struct nv50_core **); |
|---|
| 41 | 57 | |
|---|
| 42 | 58 | int core907d_new(struct nouveau_drm *, s32, struct nv50_core **); |
|---|
| 59 | +int core907d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp); |
|---|
| 43 | 60 | extern const struct nv50_outp_func dac907d; |
|---|
| 44 | 61 | extern const struct nv50_outp_func sor907d; |
|---|
| 45 | 62 | |
|---|
| 46 | 63 | int core917d_new(struct nouveau_drm *, s32, struct nv50_core **); |
|---|
| 47 | 64 | |
|---|
| 48 | 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 *); |
|---|
| 49 | 70 | extern const struct nv50_outp_func sorc37d; |
|---|
| 71 | + |
|---|
| 72 | +int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **); |
|---|
| 50 | 73 | #endif |
|---|