drm/vmwgfx: Add a parameter to get max MOB memory size
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 21 Nov 2012 11:34:47 +0000 (12:34 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 17 Jan 2014 06:52:34 +0000 (07:52 +0100)
Also bump minor to signal a GB-aware kernel module

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
include/uapi/drm/vmwgfx_drm.h

index fe3c2e3e1cbe12e1e535686f7ea118b895e2e7aa..76751e953834a1af3fa45ab5b6f1432dfae04c92 100644 (file)
@@ -40,9 +40,9 @@
 #include <drm/ttm/ttm_module.h>
 #include "vmwgfx_fence.h"
 
-#define VMWGFX_DRIVER_DATE "20120209"
+#define VMWGFX_DRIVER_DATE "20121114"
 #define VMWGFX_DRIVER_MAJOR 2
-#define VMWGFX_DRIVER_MINOR 4
+#define VMWGFX_DRIVER_MINOR 5
 #define VMWGFX_DRIVER_PATCHLEVEL 0
 #define VMWGFX_FILE_PAGE_OFFSET 0x00100000
 #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
index 641908e06eab3b0d6b30def5f689ebc7a2ecfbd4..116c49736763ee81a4b4d664bfba2ab0a5e3d5cd 100644 (file)
@@ -79,6 +79,9 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
                                        SVGA_FIFO_3D_CAPS + 1);
                param->value *= sizeof(uint32_t);
                break;
+       case DRM_VMW_PARAM_MAX_MOB_MEMORY:
+               param->value = dev_priv->max_mob_pages * PAGE_SIZE;
+               break;
        default:
                DRM_ERROR("Illegal vmwgfx get param request: %d\n",
                          param->param);
index adb7e0d0d3b674bbcfd25402c599ccec75e79ad4..9971c560ed9aa42dc841e76b9586f05e25225d96 100644 (file)
@@ -86,6 +86,7 @@
 #define DRM_VMW_PARAM_FIFO_HW_VERSION  6
 #define DRM_VMW_PARAM_MAX_SURF_MEMORY  7
 #define DRM_VMW_PARAM_3D_CAPS_SIZE     8
+#define DRM_VMW_PARAM_MAX_MOB_MEMORY   9
 
 /**
  * struct drm_vmw_getparam_arg