xf86-video-ati: Branch 'master'
Michel Dänzer
daenzer at kemper.freedesktop.org
Tue Nov 18 01:02:47 PST 2014
src/drmmode_display.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit c9f8f642fd495937400618a4fc25ecae3f8888fc
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Mon Nov 17 12:32:29 2014 +0900
Prefer drmModeSetCursor2 over drmModeSetCursor
The former includes information about the position of the hotspot within
the cursor image.
Copied from xf86-video-modesetting.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a7b75f0..72e13a4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -32,6 +32,7 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <time.h>
+#include "cursorstr.h"
#include "micmap.h"
#include "xf86cmap.h"
#include "radeon.h"
@@ -634,6 +635,22 @@ drmmode_show_cursor (xf86CrtcPtr crtc)
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
uint32_t handle = drmmode_crtc->cursor_bo->handle;
+ static Bool use_set_cursor2 = TRUE;
+
+ if (use_set_cursor2) {
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ CursorPtr cursor = xf86_config->cursor;
+ int ret;
+
+ ret =
+ drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ handle, info->cursor_w, info->cursor_h,
+ cursor->bits->xhot, cursor->bits->yhot);
+ if (ret == -EINVAL)
+ use_set_cursor2 = FALSE;
+ else
+ return;
+ }
drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
info->cursor_w, info->cursor_h);
More information about the xorg-commit
mailing list