From 3be3b54162e2c95c400870e74dff6028a8387d20 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 1 Nov 2013 16:44:10 +0000 Subject: [PATCH] st/xorg: handle updates to DamageUnregister API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xserver 1.14.99.2 simplified the DamageUnregister API, by dropping the drawable argument. Follow xf86-video-intel and xf86-video-vmware approach and handle the new API by checking XORG_VERSION_CURRENT. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71110 Reported-by: Michał Górny Reported-by: Vinson Lee Signed-off-by: Emil Velikov --- src/gallium/state_trackers/xorg/xorg_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index 097c354..d252545 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -1027,7 +1027,11 @@ drv_close_screen(CLOSE_SCREEN_ARGS_DECL) #ifdef DRM_MODE_FEATURE_DIRTYFB if (ms->damage) { +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0) + DamageUnregister(ms->damage); +#else DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, ms->damage); +#endif DamageDestroy(ms->damage); ms->damage = NULL; } -- 1.8.4.2