@@ -38,6 +38,7 @@ struct drmdev {
38
38
int fd ;
39
39
40
40
pthread_mutex_t mutex ;
41
+ bool supports_atomic_modesetting ;
41
42
42
43
size_t n_connectors ;
43
44
struct drm_connector * connectors ;
@@ -88,6 +89,11 @@ int drmdev_configure(
88
89
const drmModeModeInfo * mode
89
90
);
90
91
92
+ int drmdev_plane_get_type (
93
+ struct drmdev * drmdev ,
94
+ uint32_t plane_id
95
+ );
96
+
91
97
int drmdev_plane_supports_setting_rotation_value (
92
98
struct drmdev * drmdev ,
93
99
uint32_t plane_id ,
@@ -166,6 +172,61 @@ int drmdev_atomic_req_commit(
166
172
void * userdata
167
173
);
168
174
175
+ int drmdev_legacy_set_mode_and_fb (
176
+ struct drmdev * drmdev ,
177
+ uint32_t fb_id
178
+ );
179
+
180
+ /**
181
+ * @brief Do a nonblocking, vblank-synced framebuffer swap.
182
+ */
183
+ int drmdev_legacy_primary_plane_pageflip (
184
+ struct drmdev * drmdev ,
185
+ uint32_t fb_id ,
186
+ void * userdata
187
+ );
188
+
189
+ /**
190
+ * @brief Do a blocking, vblank-synced framebuffer swap.
191
+ * Using this in combination with @ref drmdev_legacy_primary_plane_pageflip
192
+ * is not a good idea, since it will block until the primary plane pageflip is complete,
193
+ * and then block even longer till the overlay plane pageflip completes the vblank after.
194
+ */
195
+ int drmdev_legacy_overlay_plane_pageflip (
196
+ struct drmdev * drmdev ,
197
+ uint32_t plane_id ,
198
+ uint32_t fb_id ,
199
+ int32_t crtc_x ,
200
+ int32_t crtc_y ,
201
+ int32_t crtc_w ,
202
+ int32_t crtc_h ,
203
+ uint32_t src_x ,
204
+ uint32_t src_y ,
205
+ uint32_t src_w ,
206
+ uint32_t src_h
207
+ );
208
+
209
+ int drmdev_legacy_set_connector_property (
210
+ struct drmdev * drmdev ,
211
+ const char * name ,
212
+ uint64_t value
213
+ );
214
+
215
+ int drmdev_legacy_set_crtc_property (
216
+ struct drmdev * drmdev ,
217
+ const char * name ,
218
+ uint64_t value
219
+ );
220
+
221
+ int drmdev_legacy_set_plane_property (
222
+ struct drmdev * drmdev ,
223
+ uint32_t plane_id ,
224
+ const char * name ,
225
+ uint64_t value
226
+ );
227
+
228
+ float mode_get_vrefresh (const drmModeModeInfo * mode );
229
+
169
230
inline static struct drm_connector * __next_connector (const struct drmdev * drmdev , const struct drm_connector * connector ) {
170
231
bool found = connector == NULL ;
171
232
for (int i = 0 ; i < drmdev -> n_connectors ; i ++ ) {
0 commit comments