wok-current view xorg-xf86-video-intel/stuff/patch-src_uxa_intel__display.c @ rev 25653

lzo needed from fsarchiver
author Hans-G?nter Theisgen
date Tue Feb 13 07:22:29 2024 +0100 (6 months ago)
parents
children
line source
1 $NetBSD$
3 --- a/src/uxa/intel_display.c 2014-12-09 20:43:16.000000000 +0000
4 +++ b/src/uxa/intel_display.c
5 @@ -2072,6 +2072,7 @@ intel_pageflip_abort(ScrnInfoPtr scrn, x
6 /*
7 * Check for pending DRM events and process them.
8 */
9 +#if !HAVE_NOTIFY_FD
10 static void
11 drm_wakeup_handler(pointer data, int err, pointer p)
12 {
13 @@ -2086,6 +2087,14 @@ drm_wakeup_handler(pointer data, int err
14 if (FD_ISSET(mode->fd, read_mask))
15 drmHandleEvent(mode->fd, &mode->event_context);
16 }
17 +#else
18 +static void
19 +drm_notify_fd(int fd, int ready, void *data)
20 +{
21 + struct intel_mode *mode = data;
22 + drmHandleEvent(mode->fd, &mode->event_context);
23 +}
24 +#endif
26 /*
27 * If there are any available, read drm_events
28 @@ -2250,9 +2259,11 @@ intel_mode_init(struct intel_screen_priv
29 * registration within ScreenInit and not PreInit.
30 */
31 mode->flip_count = 0;
32 - AddGeneralSocket(mode->fd);
33 + SetNotifyFd(mode->fd, drm_notify_fd, X_NOTIFY_READ, mode);
34 +#if !HAVE_NOTIFY_FD
35 RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
36 drm_wakeup_handler, mode);
37 +#endif
38 }
40 void
41 @@ -2276,9 +2287,11 @@ intel_mode_close(intel_screen_private *i
43 intel_drm_abort_scrn(intel->scrn);
45 +#if !HAVE_NOTIFY_FD
46 RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
47 drm_wakeup_handler, mode);
48 - RemoveGeneralSocket(mode->fd);
49 +#endif
50 + RemoveNotifyFd(mode->fd);
51 }
53 void