summaryrefslogtreecommitdiff
path: root/src/uxa/intel_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-20 11:16:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-20 11:29:20 +0100
commit24ab9145c7748cb344b69d70b4f8eccb0c90db76 (patch)
tree375e6ad49e81c2727e45eae13b9590ad93c4ede3 /src/uxa/intel_driver.c
parentdf0b2ce823e8bc9e994875ce349cf1da4cf8e402 (diff)
Update to ABI 22 and NotifyFd
ABI 22 brings in a new BlockHandler/WakeupHandler interface (SetNotifyFd) and throws out the current interface (albeit without delivering any improvements). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/uxa/intel_driver.c')
-rw-r--r--src/uxa/intel_driver.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index 62abdd2f..3703c412 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -652,8 +652,9 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
}
static void
-intel_dirty_update(ScreenPtr screen)
+intel_dirty_update(intel_screen_private *intel)
{
+ ScreenPtr screen = xf86ScrnToScreen(intel->scrn);
RegionPtr region;
PixmapDirtyUpdatePtr ent;
@@ -670,6 +671,7 @@ intel_dirty_update(ScreenPtr screen)
}
#endif
+#if !HAVE_NOTIFY_FD
static void
I830BlockHandler(BLOCKHANDLER_ARGS_DECL)
{
@@ -687,9 +689,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)
@@ -947,8 +962,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;