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 file-de‐
15       scriptor passed as fd. This function should be  called  after  the  DRM
16       file-descriptor  has  polled  readable; it will read the events and use
17       the passed-in evctx structure to call function pointers with the param‐
18       eters 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

RETURN VALUE

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

REPORTING BUGS

40       Bugs     in     this     function     should     be     reported     to
41       https://gitlab.freedesktop.org/mesa/drm/-/issues
42

SEE ALSO

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