1DRMHANDLEEVENT(3)          Direct Rendering Manager          DRMHANDLEEVENT(3)
2
3
4

NAME

6       drmHandleEvent - read and process pending DRM events
7

SYNOPSIS

9       #include <xf86drm.h>
10
11       int drmHandleEvent(int fd, drmEventContextPtr evctx);
12

DESCRIPTION

14       drmHandleEvent processes outstanding DRM events on the DRM
15       file-descriptor passed as fd. This function should be called after the
16       DRM file-descriptor has polled readable; it will read the events and
17       use the passed-in evctx structure to call function pointers with the
18       parameters noted below:
19
20           typedef struct _drmEventContext {
21               int version;
22               void (*vblank_handler) (int fd,
23                                       unsigned int sequence,
24                                       unsigned int tv_sec,
25                                       unsigned int tv_usec,
26                                       void *user_data)
27               void (*page_flip_handler) (int fd,
28                                          unsigned int sequence,
29                                          unsigned int tv_sec,
30                                          unsigned int tv_usec,
31                                          void *user_data)
32           } drmEventContext, *drmEventContextPtr;
33
34

RETURN VALUE

36       drmHandleEvent returns 0 on success, or if there is no data to read
37       from the file-descriptor. Returns -1 if the read on the file-descriptor
38       fails or returns less than a full event record.
39

REPORTING BUGS

41       Bugs in this function should be reported to
42       https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
43       under the "DRI" product, component "libdrm"
44

SEE ALSO

46       drm(7), drm-kms(7), drmModePageFlip(3), drmWaitVBlank(3)
47
48
49
50libdrm                          September 2012               DRMHANDLEEVENT(3)
Impressum