From 43e043868fbd74e28cd392a3665b36abdfe87de0 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 21 May 2014 11:54:48 +0200 Subject: [PATCH] vmware/vmwgfx: A bit more error logging when handling cursors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakob Bornecrantz Reviewed-by: Thomas Hellström --- vmwgfx/vmwgfx_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vmwgfx/vmwgfx_crtc.c b/vmwgfx/vmwgfx_crtc.c index 3bc3b21..5fce5f7 100644 --- a/vmwgfx/vmwgfx_crtc.c +++ b/vmwgfx/vmwgfx_crtc.c @@ -300,8 +300,11 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image) if (!crtcp->cursor_bo) { size_t size = 64*64*4; crtcp->cursor_bo = vmwgfx_dmabuf_alloc(ms->fd, size); - if (!crtcp->cursor_bo) + if (!crtcp->cursor_bo) { + xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, + "Failed to create a dmabuf for cursor.\n"); return; + } crtcp->cursor_handle = crtcp->cursor_bo->handle; } @@ -309,6 +312,9 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image) if (ptr) { memcpy(ptr, image, 64*64*4); vmwgfx_dmabuf_unmap(crtcp->cursor_bo); + } else { + xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, + "Failed to map cursor dmabuf.\n"); } if (crtc->cursor_shown)