pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/51687: x11/xf86-video-intel fix build post xserver 1.19



>Number:         51687
>Category:       pkg
>Synopsis:       x11/xf86-video-intel fix build post xserver 1.19
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 03 23:20:00 +0000 2016
>Originator:     David Shao
>Release:        current pkgsrc
>Organization:
>Environment:
DragonFly  4.7-DEVELOPMENT DragonFly v4.7.0.945.gcac153-DEVELOPMENT #4: Sat Dec  3 10:39:18 PST 2016     xxxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64
>Description:
Post update to xserver 1.19, x11/xf86-video-intel does not build.  Upstream has not released for over a year, so it necessary to apply patches.

The following patches, with modifications, from

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/

at least allow xf86-video-intel to build.  

Update to ABI 22 and NotifyFd

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=24ab9145c7748cb344b69d70b4f8eccb0c90db76

(But do not apply the part of this patch for src/sna/sna_display.c, because previous patches for sw / hw cursor are needed.

Also replace sna_accel_block() by sna_accel_block_handler() in sna_driver.c)

Adapt to libXfont2 ABI changes

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=4eaab17aec8ea66428087065901324f56df9020e

legacy/i810: Fix compilation with Video ABI 23 changes

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=d39197bb10b7d88cb4c456e7a5e8d34c1dc6eeaf

sna: Unregister the BlockHandler on close

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=6988b873b041130d88dd0aae70c10f86550ee2b3

There is an additional earlier patch that seems to apply to this older version of xf86-video-intel:

compat: Add OsBlockSIGIO/OsReleaseSIGIO wrappers

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=000378a801d627687a34906193c9f75b5041c7da


>How-To-Repeat:

>Fix:
diff -Nur x11/xf86-video-intel.prev/distinfo x11/xf86-video-intel/distinfo
--- x11/xf86-video-intel.prev/distinfo	2016-01-07 10:44:00.000000000 -0800
+++ x11/xf86-video-intel/distinfo	2016-12-03 14:51:14.611088000 -0800
@@ -5,9 +5,17 @@
 SHA512 (xf86-video-intel-2.99.917.tar.bz2) = cbf4d46ad1ad5e5587c0f1f620ff534ef0645270517b60056b9f03e83d8216e2f456de46352a06c37c0c46963cc4ed20b71b815b20ec1bf680ff046e535f580f
 Size (xf86-video-intel-2.99.917.tar.bz2) = 2259040 bytes
 SHA1 (patch-src_backlight.c) = 39537a3233613c777f0475343f0be615bff3c3ca
+SHA1 (patch-src_compat-api.h) = 3a82e11d6fa9af1c3a5cb77f34b1823842844279
 SHA1 (patch-src_intel__device.c) = 6c87a7ca7b9ca77fef17a65faf1497022b0de25d
 SHA1 (patch-src_legacy_i810_i810__dri.c) = fb963b994d51c9db48457106048226214a2d986c
+SHA1 (patch-src_legacy_i810_i810__video.c) = 281906e391e399f892a2b616b95dd2aa246c5883
 SHA1 (patch-src_sna_kgem.c) = 2d260b5ebe216fd308c11cb59b5d553457c498a2
+SHA1 (patch-src_sna_sna.h) = dc4f3076588e77d042a25f5bc9e5e9231dc810bf
+SHA1 (patch-src_sna_sna__accel.c) = 9dbe4fa1c32e0b012c12cd85361e6ca79acfb3e2
+SHA1 (patch-src_sna_sna__acpi.c) = 1c4a225a83c8434a48683c2a079ec14259ae6d5d
 SHA1 (patch-src_sna_sna__display.c) = 1f17739c37d887ff8dc0ca4e5f6c1c9dfd7b55cb
 SHA1 (patch-src_sna_sna__dri2.c) = 4bcc7e5c502a340954073386dad88fd6cebcc7b1
-SHA1 (patch-src_uxa_intel__driver.c) = 15ec83bf05b377764d1721c7a79ae9c6b1e7a0e6
+SHA1 (patch-src_sna_sna__driver.c) = 75caa09dd20a6b3c4f4c736921cf0e0138ffcca9
+SHA1 (patch-src_uxa_intel.h) = f7954d50214a9780eb40adbaecd10d62e1332f1c
+SHA1 (patch-src_uxa_intel__display.c) = 774f367ebabd782d0b4dc6259e4d15101ab27837
+SHA1 (patch-src_uxa_intel__driver.c) = 84f833b87ef08b7aa5c95764ba8f33f665732045
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_compat-api.h x11/xf86-video-intel/patches/patch-src_compat-api.h
--- x11/xf86-video-intel.prev/patches/patch-src_compat-api.h	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_compat-api.h	2016-12-03 14:32:58.377651000 -0800
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- src/compat-api.h.orig	2014-11-18 21:50:39.000000000 +0000
++++ src/compat-api.h
+@@ -30,6 +30,7 @@
+ 
+ #include <xorg-server.h>
+ #include <xorgVersion.h>
++#include <xf86Module.h>
+ 
+ #include <picturestr.h>
+ #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
+@@ -42,6 +43,10 @@
+ #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
+ #endif
+ 
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 22
++#define HAVE_NOTIFY_FD 1
++#endif
++
+ #ifndef XF86_SCRN_INTERFACE
+ 
+ #define SCRN_ARG_TYPE int
+@@ -223,4 +228,14 @@ static inline void FreePixmap(PixmapPtr
+ 			  dstx, dsty)
+ #endif
+ 
++#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(22, 0)
++#define OsBlockSIGIO()
++#define OsReleaseSIGIO()
++#endif
++
++#if !HAVE_NOTIFY_FD
++#define SetNotifyFd(fd, cb, mode, data) AddGeneralSocket(fd);
++#define RemoveNotifyFd(fd) RemoveGeneralSocket(fd)
++#endif
++
+ #endif
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_legacy_i810_i810__video.c x11/xf86-video-intel/patches/patch-src_legacy_i810_i810__video.c
--- x11/xf86-video-intel.prev/patches/patch-src_legacy_i810_i810__video.c	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_legacy_i810_i810__video.c	2016-12-03 13:38:57.788327000 -0800
@@ -0,0 +1,86 @@
+$NetBSD$
+
+--- src/legacy/i810/i810_video.c.orig	2014-08-29 09:33:11.000000000 +0000
++++ src/legacy/i810/i810_video.c
+@@ -77,7 +77,11 @@ static int I810PutImage( ScrnInfoPtr,
+ static int I810QueryImageAttributes(ScrnInfoPtr, 
+ 	int, unsigned short *, unsigned short *,  int *, int *);
+ 
++#if !HAVE_NOTIFY_FD
+ static void I810BlockHandler(BLOCKHANDLER_ARGS_DECL);
++#else
++static void I810BlockHandler(void *data, void *_timeout);
++#endif
+ 
+ #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
+ 
+@@ -418,8 +422,14 @@ I810SetupImageVideo(ScreenPtr screen)
+ 
+     pI810->adaptor = adapt;
+ 
++#if !HAVE_NOTIFY_FD
+     pI810->BlockHandler = screen->BlockHandler;
+     screen->BlockHandler = I810BlockHandler;
++#else
++    RegisterBlockAndWakeupHandlers(I810BlockHandler,
++				   (ServerWakeupHandlerProcPtr)NoopDDA,
++				   pScrn);
++#endif
+ 
+     xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
+     xvContrast   = MAKE_ATOM("XV_CONTRAST");
+@@ -1135,6 +1145,7 @@ I810QueryImageAttributes(
+     return size;
+ }
+ 
++#if !HAVE_NOTIFY_FD
+ static void
+ I810BlockHandler (BLOCKHANDLER_ARGS_DECL)
+ {
+@@ -1172,7 +1183,38 @@ I810BlockHandler (BLOCKHANDLER_ARGS_DECL
+         }
+     }
+ }
++#else
++static void
++I810BlockHandler(void *data, void *_timeout)
++{
++    ScrnInfoPtr pScrn = data;
++    I810Ptr      pI810 = I810PTR(pScrn);
++    I810PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
++    I810OverlayRegPtr overlay = (I810OverlayRegPtr) (pI810->FbBase + pI810->OverlayStart);
+ 
++    if(pPriv->videoStatus & TIMER_MASK) {
++	UpdateCurrentTime();
++	if(pPriv->videoStatus & OFF_TIMER) {
++	    if(pPriv->offTime < currentTime.milliseconds) {
++		/* Turn off the overlay */
++		overlay->OV0CMD &= 0xFFFFFFFE;
++		OVERLAY_UPDATE(pI810->OverlayPhysical);
++
++		pPriv->videoStatus = FREE_TIMER;
++		pPriv->freeTime = currentTime.milliseconds + FREE_DELAY;
++	    }
++	} else {  /* FREE_TIMER */
++	    if(pPriv->freeTime < currentTime.milliseconds) {
++		if(pPriv->linear) {
++		   xf86FreeOffscreenLinear(pPriv->linear);
++		   pPriv->linear = NULL;
++		}
++		pPriv->videoStatus = 0;
++	    }
++        }
++    }
++}
++#endif
+ 
+ /***************************************************************************
+  * Offscreen Images
+@@ -1373,7 +1415,6 @@ I810DisplaySurface(
+       UpdateCurrentTime();
+       pI810Priv->videoStatus = FREE_TIMER;
+       pI810Priv->freeTime = currentTime.milliseconds + FREE_DELAY;
+-      pScrn->pScreen->BlockHandler = I810BlockHandler;
+     }
+ 
+     return Success;
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_sna_sna.h x11/xf86-video-intel/patches/patch-src_sna_sna.h
--- x11/xf86-video-intel.prev/patches/patch-src_sna_sna.h	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_sna_sna.h	2016-12-03 13:38:57.848328000 -0800
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- src/sna/sna.h.orig	2014-12-20 13:29:05.000000000 +0000
++++ src/sna/sna.h
+@@ -364,8 +364,10 @@ struct sna {
+ 	EntityInfoPtr pEnt;
+ 	const struct intel_device_info *info;
+ 
++#if !HAVE_NOTIFY_FD
+ 	ScreenBlockHandlerProcPtr BlockHandler;
+ 	ScreenWakeupHandlerProcPtr WakeupHandler;
++#endif
+ 	CloseScreenProcPtr CloseScreen;
+ 
+ 	PicturePtr clear;
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_sna_sna__accel.c x11/xf86-video-intel/patches/patch-src_sna_sna__accel.c
--- x11/xf86-video-intel.prev/patches/patch-src_sna_sna__accel.c	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_sna_sna__accel.c	2016-12-03 13:38:57.888329000 -0800
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- src/sna/sna_accel.c.orig	2014-12-20 13:29:27.000000000 +0000
++++ src/sna/sna_accel.c
+@@ -115,6 +115,11 @@
+ #define RECTILINEAR	0x4
+ #define OVERWRITES	0x8
+ 
++#if XFONT2_CLIENT_FUNCS_VERSION >= 1
++#define AllocateFontPrivateIndex() xfont2_allocate_font_private_index()
++#define FontSetPrivate(font, idx, data) xfont2_font_set_private(font, idx, data)
++#endif
++
+ #if 0
+ static void __sna_fallback_flush(DrawablePtr d)
+ {
+@@ -17811,6 +17816,13 @@ static bool sna_option_accel_blt(struct
+ 	return strcasecmp(s, "blt") == 0;
+ }
+ 
++#if HAVE_NOTIFY_FD
++static void sna_accel_notify(int fd, int ready, void *data)
++{
++	sna_mode_wakeup(data);
++}
++#endif
++
+ bool sna_accel_init(ScreenPtr screen, struct sna *sna)
+ {
+ 	const char *backend;
+@@ -17822,7 +17834,7 @@ bool sna_accel_init(ScreenPtr screen, st
+ 	list_init(&sna->flush_pixmaps);
+ 	list_init(&sna->active_pixmaps);
+ 
+-	AddGeneralSocket(sna->kgem.fd);
++	SetNotifyFd(sna->kgem.fd, sna_accel_notify, X_NOTIFY_READ, sna);
+ 
+ #ifdef DEBUG_MEMORY
+ 	sna->timer_expire[DEBUG_MEMORY_TIMER] = GetTimeInMillis()+ 10 * 1000;
+@@ -17998,7 +18010,7 @@ void sna_accel_close(struct sna *sna)
+ 	sna_pixmap_expire(sna);
+ 
+ 	DeleteCallback(&FlushCallback, sna_accel_flush_callback, sna);
+-	RemoveGeneralSocket(sna->kgem.fd);
++	RemoveNotifyFd(sna->kgem.fd);
+ 
+ 	kgem_cleanup_cache(&sna->kgem);
+ }
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_sna_sna__acpi.c x11/xf86-video-intel/patches/patch-src_sna_sna__acpi.c
--- x11/xf86-video-intel.prev/patches/patch-src_sna_sna__acpi.c	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_sna_sna__acpi.c	2016-12-03 13:38:57.918329000 -0800
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- src/sna/sna_acpi.c.orig	2014-08-29 09:33:11.000000000 +0000
++++ src/sna/sna_acpi.c
+@@ -92,7 +92,7 @@ void _sna_acpi_wakeup(struct sna *sna)
+ 		DBG(("%s: error [%d], detaching from acpid\n", __FUNCTION__, n));
+ 
+ 		/* XXX reattach later? */
+-		RemoveGeneralSocket(sna->acpi.fd);
++		RemoveNotifyFd(sna->acpi.fd);
+ 		sna_acpi_fini(sna);
+ 		return;
+ 	}
+@@ -136,6 +136,13 @@ void _sna_acpi_wakeup(struct sna *sna)
+ 	} while (n);
+ }
+ 
++#if HAVE_NOTIFY_FD
++static void sna_acpi_notify(int fd, int read, void *data)
++{
++	_sna_acpi_wakeup(data);
++}
++#endif
++
+ static int read_power_state(const char *path)
+ {
+ 	DIR *dir;
+@@ -200,7 +207,7 @@ void sna_acpi_init(struct sna *sna)
+ 
+ 	DBG(("%s: attaching to acpid\n", __FUNCTION__));
+ 
+-	AddGeneralSocket(sna->acpi.fd);
++	SetNotifyFd(sna->acpi.fd, sna_acpi_notify, X_NOTIFY_READ, sna);
+ 	sna->acpi.remain = sizeof(sna->acpi.event) - 1;
+ 	sna->acpi.offset = 0;
+ 
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_sna_sna__driver.c x11/xf86-video-intel/patches/patch-src_sna_sna__driver.c
--- x11/xf86-video-intel.prev/patches/patch-src_sna_sna__driver.c	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_sna_sna__driver.c	2016-12-03 14:40:03.446741000 -0800
@@ -0,0 +1,75 @@
+$NetBSD$
+
+--- src/sna/sna_driver.c.orig	2014-12-11 13:52:11.000000000 +0000
++++ src/sna/sna_driver.c
+@@ -732,6 +732,7 @@ static bool has_shadow(struct sna *sna)
+ 	return sna->mode.flip_active == 0;
+ }
+ 
++#if !HAVE_NOTIFY_FD
+ static void
+ sna_block_handler(BLOCKHANDLER_ARGS_DECL)
+ {
+@@ -778,6 +779,31 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DE
+ 		FD_CLR(sna->kgem.fd, (fd_set*)read_mask);
+ 	}
+ }
++#else
++static void
++sna_block_handler(void *data, void *_timeout)
++{
++	struct sna *sna = data;
++	int *timeout = _timeout;
++	struct timeval tv, *tvp;
++
++	DBG(("%s (timeout=%d)\n", __FUNCTION__, *timeout));
++	if (*timeout == 0)
++		return;
++
++	if (*timeout < 0) {
++		tvp = NULL;
++	} else {
++		tv.tv_sec = *timeout / 1000;
++		tv.tv_usec = (*timeout % 1000) * 1000;
++		tvp = &tv;
++	}
++
++	sna_accel_block_handler(sna, &tvp);
++	if (tvp)
++		*timeout = tvp->tv_sec * 1000 + tvp->tv_usec / 1000;
++}
++#endif
+ 
+ #if HAVE_UDEV
+ static void
+@@ -948,6 +974,12 @@ static Bool sna_early_close_screen(CLOSE
+ 
+ 	/* XXX Note that we will leak kernel resources if !vtSema */
+ 
++#if HAVE_NOTIFY_FD
++	RemoveBlockAndWakeupHandlers(sna_block_handler,
++				     (ServerWakeupHandlerProcPtr)NoopDDA,
++				     sna);
++#endif
++
+ 	sna_uevent_fini(sna);
+ 	sna_mode_close(sna);
+ 
+@@ -1166,11 +1198,17 @@ sna_screen_init(SCREEN_INIT_ARGS_DECL)
+ 	 * later memory should be bound when allocating, e.g rotate_mem */
+ 	scrn->vtSema = TRUE;
+ 
++#if !HAVE_NOTIFY_FD
+ 	sna->BlockHandler = screen->BlockHandler;
+ 	screen->BlockHandler = sna_block_handler;
+ 
+ 	sna->WakeupHandler = screen->WakeupHandler;
+ 	screen->WakeupHandler = sna_wakeup_handler;
++#else
++	RegisterBlockAndWakeupHandlers(sna_block_handler,
++				       (ServerWakeupHandlerProcPtr)NoopDDA,
++				       sna);
++#endif
+ 
+ 	screen->SaveScreen = sna_save_screen;
+ 	screen->CreateScreenResources = sna_create_screen_resources;
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_uxa_intel.h x11/xf86-video-intel/patches/patch-src_uxa_intel.h
--- x11/xf86-video-intel.prev/patches/patch-src_uxa_intel.h	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_uxa_intel.h	2016-12-03 13:38:58.038332000 -0800
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- src/uxa/intel.h.orig	2014-12-09 20:41:25.000000000 +0000
++++ src/uxa/intel.h
+@@ -196,7 +196,10 @@ typedef struct intel_screen_private {
+ 
+ 	int colorKey;
+ 	XF86VideoAdaptorPtr adaptor;
++
++#if !HAVE_NOTIFY_FD
+ 	ScreenBlockHandlerProcPtr BlockHandler;
++#endif
+ 	Bool overlayOn;
+ 
+ 	struct {
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_uxa_intel__display.c x11/xf86-video-intel/patches/patch-src_uxa_intel__display.c
--- x11/xf86-video-intel.prev/patches/patch-src_uxa_intel__display.c	1969-12-31 16:00:00.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_uxa_intel__display.c	2016-12-03 13:38:58.068332000 -0800
@@ -0,0 +1,53 @@
+$NetBSD$
+
+--- src/uxa/intel_display.c.orig	2014-12-09 20:43:16.000000000 +0000
++++ src/uxa/intel_display.c
+@@ -2072,6 +2072,7 @@ intel_pageflip_abort(ScrnInfoPtr scrn, x
+ /*
+  * Check for pending DRM events and process them.
+  */
++#if !HAVE_NOTIFY_FD
+ static void
+ drm_wakeup_handler(pointer data, int err, pointer p)
+ {
+@@ -2086,6 +2087,14 @@ drm_wakeup_handler(pointer data, int err
+ 	if (FD_ISSET(mode->fd, read_mask))
+ 		drmHandleEvent(mode->fd, &mode->event_context);
+ }
++#else
++static void
++drm_notify_fd(int fd, int ready, void *data)
++{
++	struct intel_mode *mode = data;
++	drmHandleEvent(mode->fd, &mode->event_context);
++}
++#endif
+ 
+ /*
+  * If there are any available, read drm_events
+@@ -2250,9 +2259,11 @@ intel_mode_init(struct intel_screen_priv
+ 	 * registration within ScreenInit and not PreInit.
+ 	 */
+ 	mode->flip_count = 0;
+-	AddGeneralSocket(mode->fd);
++	SetNotifyFd(mode->fd, drm_notify_fd, X_NOTIFY_READ, mode);
++#if !HAVE_NOTIFY_FD
+ 	RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+ 				       drm_wakeup_handler, mode);
++#endif
+ }
+ 
+ void
+@@ -2276,9 +2287,11 @@ intel_mode_close(intel_screen_private *i
+ 
+         intel_drm_abort_scrn(intel->scrn);
+ 
++#if !HAVE_NOTIFY_FD
+ 	RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+ 				     drm_wakeup_handler, mode);
+-	RemoveGeneralSocket(mode->fd);
++#endif
++	RemoveNotifyFd(mode->fd);
+ }
+ 
+ void
diff -Nur x11/xf86-video-intel.prev/patches/patch-src_uxa_intel__driver.c x11/xf86-video-intel/patches/patch-src_uxa_intel__driver.c
--- x11/xf86-video-intel.prev/patches/patch-src_uxa_intel__driver.c	2016-01-05 05:05:37.000000000 -0800
+++ x11/xf86-video-intel/patches/patch-src_uxa_intel__driver.c	2016-12-03 13:38:58.098333000 -0800
@@ -1,6 +1,4 @@
-$NetBSD: patch-src_uxa_intel__driver.c,v 1.1 2016/01/05 13:05:37 tnn Exp $
-
-fix build with xorg-server-1.18
+$NetBSD$
 
 --- src/uxa/intel_driver.c.orig	2014-12-09 20:43:22.000000000 +0000
 +++ src/uxa/intel_driver.c
@@ -16,3 +14,61 @@
  	RegionUninit(&pixregion);
  
          intel_flush(intel);
+@@ -659,8 +663,9 @@ redisplay_dirty(ScreenPtr screen, Pixmap
+ }
+ 
+ static void
+-intel_dirty_update(ScreenPtr screen)
++intel_dirty_update(intel_screen_private *intel)
+ {
++	ScreenPtr screen = xf86ScrnToScreen(intel->scrn);
+ 	RegionPtr region;
+ 	PixmapDirtyUpdatePtr ent;
+ 
+@@ -677,6 +682,7 @@ intel_dirty_update(ScreenPtr screen)
+ }
+ #endif
+ 
++#if !HAVE_NOTIFY_FD
+ static void
+ I830BlockHandler(BLOCKHANDLER_ARGS_DECL)
+ {
+@@ -694,9 +700,22 @@ I830BlockHandler(BLOCKHANDLER_ARGS_DECL)
+ 	intel_uxa_block_handler(intel);
+ 	intel_video_block_handler(intel);
+ #ifdef INTEL_PIXMAP_SHARING
+-	intel_dirty_update(screen);
++	intel_dirty_update(intel);
+ #endif
+ }
++#else
++static void
++I830BlockHandler(void *data, void *timeout)
++{
++	intel_screen_private *intel = data;
++
++	intel_uxa_block_handler(intel);
++	intel_video_block_handler(intel);
++#ifdef INTEL_PIXMAP_SHARING
++	intel_dirty_update(intel);
++#endif
++}
++#endif
+ 
+ static Bool
+ intel_init_initial_framebuffer(ScrnInfoPtr scrn)
+@@ -939,8 +958,14 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL)
+ 			   "Hardware cursor initialization failed\n");
+ 	}
+ 
++#if !HAVE_NOTIFY_FD
+ 	intel->BlockHandler = screen->BlockHandler;
+ 	screen->BlockHandler = I830BlockHandler;
++#else
++	RegisterBlockAndWakeupHandlers(I830BlockHandler,
++				       (ServerWakeupHandlerProcPtr)NoopDDA,
++				       intel);
++#endif
+ 
+ #ifdef INTEL_PIXMAP_SHARING
+ 	screen->StartPixmapTracking = PixmapStartDirtyTracking;



Home | Main Index | Thread Index | Old Index