wndw.h (9d6c2fe1917fc5ba6a9e8586ca16d007410baf42) wndw.h (53e0a3e70de69dc9f498d26c6b5495b2771ee374)
1#ifndef __NV50_KMS_WNDW_H__
2#define __NV50_KMS_WNDW_H__
3#define nv50_wndw(p) container_of((p), struct nv50_wndw, plane)
4#include "disp.h"
5#include "atom.h"
6
7#include <nvif/notify.h>
8
9struct nv50_wndw_ctxdma {
10 struct list_head head;
11 struct nvif_object object;
12};
13
14struct nv50_wndw {
15 const struct nv50_wndw_func *func;
16 const struct nv50_wimm_func *immd;
17 int id;
1#ifndef __NV50_KMS_WNDW_H__
2#define __NV50_KMS_WNDW_H__
3#define nv50_wndw(p) container_of((p), struct nv50_wndw, plane)
4#include "disp.h"
5#include "atom.h"
6
7#include <nvif/notify.h>
8
9struct nv50_wndw_ctxdma {
10 struct list_head head;
11 struct nvif_object object;
12};
13
14struct nv50_wndw {
15 const struct nv50_wndw_func *func;
16 const struct nv50_wimm_func *immd;
17 int id;
18 struct nv50_disp_interlock interlock;
18
19 struct {
20 struct nvif_object *parent;
21 struct list_head list;
22 } ctxdma;
23
24 struct drm_plane plane;
25
26 struct nv50_dmac wndw;
27 struct nv50_dmac wimm;
28
29 struct nvif_notify notify;
30 u16 ntfy;
31 u16 sema;
32 u32 data;
33};
34
35int nv50_wndw_new_(const struct nv50_wndw_func *, struct drm_device *,
36 enum drm_plane_type, const char *name, int index,
19
20 struct {
21 struct nvif_object *parent;
22 struct list_head list;
23 } ctxdma;
24
25 struct drm_plane plane;
26
27 struct nv50_dmac wndw;
28 struct nv50_dmac wimm;
29
30 struct nvif_notify notify;
31 u16 ntfy;
32 u16 sema;
33 u32 data;
34};
35
36int nv50_wndw_new_(const struct nv50_wndw_func *, struct drm_device *,
37 enum drm_plane_type, const char *name, int index,
37 const u32 *format, u32 heads, struct nv50_wndw **);
38 const u32 *format, enum nv50_disp_interlock_type,
39 u32 interlock_data, u32 heads, struct nv50_wndw **);
38void nv50_wndw_init(struct nv50_wndw *);
39void nv50_wndw_fini(struct nv50_wndw *);
40void nv50_wndw_init(struct nv50_wndw *);
41void nv50_wndw_fini(struct nv50_wndw *);
40u32 nv50_wndw_flush_set(struct nv50_wndw *, u32 interlock,
41 struct nv50_wndw_atom *);
42u32 nv50_wndw_flush_clr(struct nv50_wndw *, u32 interlock, bool flush,
43 struct nv50_wndw_atom *);
42void nv50_wndw_flush_set(struct nv50_wndw *, u32 *interlock,
43 struct nv50_wndw_atom *);
44void nv50_wndw_flush_clr(struct nv50_wndw *, u32 *interlock, bool flush,
45 struct nv50_wndw_atom *);
44void nv50_wndw_ntfy_enable(struct nv50_wndw *, struct nv50_wndw_atom *);
45int nv50_wndw_wait_armed(struct nv50_wndw *, struct nv50_wndw_atom *);
46
47struct nv50_wndw_func {
48 int (*acquire)(struct nv50_wndw *, struct nv50_wndw_atom *asyw,
49 struct nv50_head_atom *asyh);
50 void (*release)(struct nv50_wndw *, struct nv50_wndw_atom *asyw,
51 struct nv50_head_atom *asyh);

--- 6 unchanged lines hidden (view full) ---

58 void (*ntfy_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
59 void (*ntfy_clr)(struct nv50_wndw *);
60 int (*ntfy_wait_begun)(struct nouveau_bo *, u32 offset,
61 struct nvif_device *);
62 void (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
63 void (*image_clr)(struct nv50_wndw *);
64 void (*lut)(struct nv50_wndw *, struct nv50_wndw_atom *);
65
46void nv50_wndw_ntfy_enable(struct nv50_wndw *, struct nv50_wndw_atom *);
47int nv50_wndw_wait_armed(struct nv50_wndw *, struct nv50_wndw_atom *);
48
49struct nv50_wndw_func {
50 int (*acquire)(struct nv50_wndw *, struct nv50_wndw_atom *asyw,
51 struct nv50_head_atom *asyh);
52 void (*release)(struct nv50_wndw *, struct nv50_wndw_atom *asyw,
53 struct nv50_head_atom *asyh);

--- 6 unchanged lines hidden (view full) ---

60 void (*ntfy_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
61 void (*ntfy_clr)(struct nv50_wndw *);
62 int (*ntfy_wait_begun)(struct nouveau_bo *, u32 offset,
63 struct nvif_device *);
64 void (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
65 void (*image_clr)(struct nv50_wndw *);
66 void (*lut)(struct nv50_wndw *, struct nv50_wndw_atom *);
67
66 u32 (*update)(struct nv50_wndw *, u32 interlock);
68 void (*update)(struct nv50_wndw *, u32 *interlock);
67};
68
69extern const struct drm_plane_funcs nv50_wndw;
70
71struct nv50_wimm_func {
72 void (*point)(struct nv50_wndw *, struct nv50_wndw_atom *);
73
69};
70
71extern const struct drm_plane_funcs nv50_wndw;
72
73struct nv50_wimm_func {
74 void (*point)(struct nv50_wndw *, struct nv50_wndw_atom *);
75
74 u32 (*update)(struct nv50_wndw *, u32 interlock);
76 void (*update)(struct nv50_wndw *, u32 *interlock);
75};
76#endif
77};
78#endif