summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/svga3d_reg.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2014-01-31 10:21:10 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2014-02-05 08:41:44 +0100
commita6fc955ff9fc60dcffc80003410a85d874e4f1e3 (patch)
tree9e3bddfba6274eaeb8f109c422d987d20e4463f0 /drivers/gpu/drm/vmwgfx/svga3d_reg.h
parentd5bde956630b86462ee22055f5816a04290aed57 (diff)
downloadblackbird-op-linux-a6fc955ff9fc60dcffc80003410a85d874e4f1e3.tar.gz
blackbird-op-linux-a6fc955ff9fc60dcffc80003410a85d874e4f1e3.zip
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/svga3d_reg.h')
-rw-r--r--drivers/gpu/drm/vmwgfx/svga3d_reg.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/svga3d_reg.h b/drivers/gpu/drm/vmwgfx/svga3d_reg.h
index d95335cb90bd..b645647b7776 100644
--- a/drivers/gpu/drm/vmwgfx/svga3d_reg.h
+++ b/drivers/gpu/drm/vmwgfx/svga3d_reg.h
@@ -2583,4 +2583,28 @@ typedef union {
float f;
} SVGA3dDevCapResult;
+typedef enum {
+ SVGA3DCAPS_RECORD_UNKNOWN = 0,
+ SVGA3DCAPS_RECORD_DEVCAPS_MIN = 0x100,
+ SVGA3DCAPS_RECORD_DEVCAPS = 0x100,
+ SVGA3DCAPS_RECORD_DEVCAPS_MAX = 0x1ff,
+} SVGA3dCapsRecordType;
+
+typedef
+struct SVGA3dCapsRecordHeader {
+ uint32 length;
+ SVGA3dCapsRecordType type;
+}
+SVGA3dCapsRecordHeader;
+
+typedef
+struct SVGA3dCapsRecord {
+ SVGA3dCapsRecordHeader header;
+ uint32 data[1];
+}
+SVGA3dCapsRecord;
+
+
+typedef uint32 SVGA3dCapPair[2];
+
#endif /* _SVGA3D_REG_H_ */
OpenPOWER on IntegriCloud