This source file includes following definitions.
- drm_connector_to_writeback
1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __DRM_WRITEBACK_H__
13 #define __DRM_WRITEBACK_H__
14 #include <drm/drm_connector.h>
15 #include <drm/drm_encoder.h>
16 #include <linux/workqueue.h>
17
18 struct drm_writeback_connector {
19 struct drm_connector base;
20
21
22
23
24
25
26
27
28 struct drm_encoder encoder;
29
30
31
32
33
34
35
36
37 struct drm_property_blob *pixel_formats_blob_ptr;
38
39
40 spinlock_t job_lock;
41
42
43
44
45
46
47
48
49
50
51
52 struct list_head job_queue;
53
54
55
56
57
58
59 unsigned int fence_context;
60
61
62
63
64
65 spinlock_t fence_lock;
66
67
68
69
70
71
72 unsigned long fence_seqno;
73
74
75
76
77
78 char timeline_name[32];
79 };
80
81 struct drm_writeback_job {
82
83
84
85
86
87 struct drm_writeback_connector *connector;
88
89
90
91
92
93
94 bool prepared;
95
96
97
98
99
100
101
102 struct work_struct cleanup_work;
103
104
105
106
107
108
109 struct list_head list_entry;
110
111
112
113
114
115
116
117 struct drm_framebuffer *fb;
118
119
120
121
122
123
124 struct dma_fence *out_fence;
125
126
127
128
129
130
131 void *priv;
132 };
133
134 static inline struct drm_writeback_connector *
135 drm_connector_to_writeback(struct drm_connector *connector)
136 {
137 return container_of(connector, struct drm_writeback_connector, base);
138 }
139
140 int drm_writeback_connector_init(struct drm_device *dev,
141 struct drm_writeback_connector *wb_connector,
142 const struct drm_connector_funcs *con_funcs,
143 const struct drm_encoder_helper_funcs *enc_helper_funcs,
144 const u32 *formats, int n_formats);
145
146 int drm_writeback_set_fb(struct drm_connector_state *conn_state,
147 struct drm_framebuffer *fb);
148
149 int drm_writeback_prepare_job(struct drm_writeback_job *job);
150
151 void drm_writeback_queue_job(struct drm_writeback_connector *wb_connector,
152 struct drm_connector_state *conn_state);
153
154 void drm_writeback_cleanup_job(struct drm_writeback_job *job);
155
156 void
157 drm_writeback_signal_completion(struct drm_writeback_connector *wb_connector,
158 int status);
159
160 struct dma_fence *
161 drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector);
162 #endif