drm_event_reserve_init — init a DRM event and reserve space for it
int drm_event_reserve_init ( | struct drm_device * dev, |
| struct drm_file * file_priv, | |
| struct drm_pending_event * p, | |
struct drm_event * e); |
devDRM device
file_privDRM file private data
ptracking structure for the pending event
eactual event data to deliver to userspace
This function prepares the passed in event for eventual delivery. If the event
doesn't get delivered (because the IOCTL fails later on, before queuing up
anything) then the even must be cancelled and freed using
drm_event_cancel_free. Successfully initialized events should be sent out
using drm_send_event or drm_send_event_locked to signal completion of the
asynchronous event to userspace.
If callers embedded p into a larger structure it must be allocated with
kmalloc and p must be the first member element.
Callers which already hold dev->event_lock should use
drm_event_reserve_init instead.