@@ -1202,25 +1202,50 @@ extern "C" {
1202
1202
#define DRM_COMMAND_BASE 0x40
1203
1203
#define DRM_COMMAND_END 0xA0
1204
1204
1205
- /*
1206
- * Header for events written back to userspace on the drm fd. The
1207
- * type defines the type of event, the length specifies the total
1208
- * length of the event (including the header), and user_data is
1209
- * typically a 64 bit value passed with the ioctl that triggered the
1210
- * event. A read on the drm fd will always only return complete
1211
- * events, that is, if for example the read buffer is 100 bytes, and
1212
- * there are two 64 byte events pending, only one will be returned.
1205
+ /**
1206
+ * struct drm_event - Header for DRM events
1207
+ * @type: event type.
1208
+ * @length: total number of payload bytes (including header).
1213
1209
*
1214
- * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and
1215
- * up are chipset specific.
1210
+ * This struct is a header for events written back to user-space on the DRM FD.
1211
+ * A read on the DRM FD will always only return complete events: e.g. if the
1212
+ * read buffer is 100 bytes large and there are two 64 byte events pending,
1213
+ * only one will be returned.
1214
+ *
1215
+ * Event types 0 - 0x7fffffff are generic DRM events, 0x80000000 and
1216
+ * up are chipset specific. Generic DRM events include &DRM_EVENT_VBLANK,
1217
+ * &DRM_EVENT_FLIP_COMPLETE and &DRM_EVENT_CRTC_SEQUENCE.
1216
1218
*/
1217
1219
struct drm_event {
1218
1220
__u32 type ;
1219
1221
__u32 length ;
1220
1222
};
1221
1223
1224
+ /**
1225
+ * DRM_EVENT_VBLANK - vertical blanking event
1226
+ *
1227
+ * This event is sent in response to &DRM_IOCTL_WAIT_VBLANK with the
1228
+ * &_DRM_VBLANK_EVENT flag set.
1229
+ *
1230
+ * The event payload is a struct drm_event_vblank.
1231
+ */
1222
1232
#define DRM_EVENT_VBLANK 0x01
1233
+ /**
1234
+ * DRM_EVENT_FLIP_COMPLETE - page-flip completion event
1235
+ *
1236
+ * This event is sent in response to an atomic commit or legacy page-flip with
1237
+ * the &DRM_MODE_PAGE_FLIP_EVENT flag set.
1238
+ *
1239
+ * The event payload is a struct drm_event_vblank.
1240
+ */
1223
1241
#define DRM_EVENT_FLIP_COMPLETE 0x02
1242
+ /**
1243
+ * DRM_EVENT_CRTC_SEQUENCE - CRTC sequence event
1244
+ *
1245
+ * This event is sent in response to &DRM_IOCTL_CRTC_QUEUE_SEQUENCE.
1246
+ *
1247
+ * The event payload is a struct drm_event_crtc_sequence.
1248
+ */
1224
1249
#define DRM_EVENT_CRTC_SEQUENCE 0x03
1225
1250
1226
1251
struct drm_event_vblank {
0 commit comments