From: Jakob Bornecrantz Date: Wed, 9 Nov 2011 09:25:28 +0000 (+0100) Subject: vmwgfx: Only allow 64x64 cursors X-Git-Tag: v3.2-rc2~10^2~19 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=baa91d640034dd8d0b58a9088f5fefe5cec3c8c4;p=cascardo%2Flinux.git vmwgfx: Only allow 64x64 cursors Snooping code expects this to be the case. Signed-off-by: Jakob Bornecrantz Reviewed-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 40c7e617e28b..880e285d7578 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -105,6 +105,10 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, struct vmw_dma_buffer *dmabuf = NULL; int ret; + /* A lot of the code assumes this */ + if (handle && (width != 64 || height != 64)) + return -EINVAL; + if (handle) { ret = vmw_user_surface_lookup_handle(dev_priv, tfile, handle, &surface);