]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Detect old user-space drivers and set up legacy emulation v2
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 31 Jan 2014 09:21:10 +0000 (10:21 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 5 Feb 2014 07:41:44 +0000 (08:41 +0100)
commitdf15ce84745ddc3b737600d9d35b2c19a6463246
tree9e3bddfba6274eaeb8f109c422d987d20e4463f0
parent83afb14645b2b5b03e46c38f14fde4ae7b2bfc5e
drm/vmwgfx: Detect old user-space drivers and set up legacy emulation v2

GB aware mesa userspace drivers are detected by the fact that they are
calling the vmw getparam ioctl querying DRM_VMW_PARAM_HW_CAPS to detect
whether the device is Guest-backed object capable. For other drivers,
lie about hardware version and send the 3D capabilities in a format they
expect.

v2:
Use DRM_VMW_PARAM_MAX_MOB_MEMORY to detect gb awareness,
Make sure we don't ovwerwrite bounce buffer or write past user-space buffer
indicated size.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
drivers/gpu/drm/vmwgfx/svga3d_reg.h
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c