[PATCH xf86-video-ati] Check for xf86CursorResetCursor

Michel Dänzer michel at daenzer.net
Fri Mar 18 07:47:17 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

If it's available, Xorg calls it on each mode configuration change. It
does what xf86_reload_cursors does (and more), so we don't need to call
the latter anymore.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 configure.ac          | 6 ++++++
 src/drmmode_display.c | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index f2bf57c..eb97a6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,12 @@ AC_CHECK_DECL(fbGlyphs,
 	       #include <glyphstr.h>
 	       #include <fbpict.h>])
 
+AC_CHECK_DECL(xf86CursorResetCursor,
+	      [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1,
+	      [Have xf86CursorResetCursor API])], [],
+	      [#include <xorg-server.h>
+	       #include <xf86Cursor.h>])
+
 AC_CHECK_DECL(xorg_list_init,
 	      [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [],
 	      [#include <X11/Xdefs.h>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 635f71c..3e0bf25 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -870,8 +870,10 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		break;
 	}
 
+#ifndef HAVE_XF86_CURSOR_RESET_CURSOR
 	if (!info->hwcursor_disabled)
 		xf86_reload_cursors(pScreen);
+#endif
 
 done:
 	if (!ret) {
-- 
2.7.0



More information about the xorg-driver-ati mailing list