Skip to contentSkip to conversation

drm/vmwgfx: Add max surface memory param

PATCH New Thomas Hellstrom 1 participant 1 message Dec 9, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: Add max surface memory param

From: Jakob Bornecrantz <[email protected]>

Userspace uses this to workaround overcommit issues by flushing the command stream early.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c |    3 +++
 include/uapi/drm/vmwgfx_drm.h         |    1 +
 2 files changed, 4 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +3 -0
index a51f48e..45d5b5a 100644
@@ -68,6 +68,9 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
 				  SVGA_FIFO_3D_HWVERSION));
 		break;
 	}
+	case DRM_VMW_PARAM_MAX_SURF_MEMORY:
+		param->value = dev_priv->memory_size;
+		break;
 	default:
 		DRM_ERROR("Illegal vmwgfx get param request: %d\n",
 			  param->param);
include/uapi/drm/vmwgfx_drm.h +1 -0
index bcb0912..f854ca4 100644
@@ -75,6 +75,7 @@
 #define DRM_VMW_PARAM_FIFO_CAPS        4
 #define DRM_VMW_PARAM_MAX_FB_SIZE      5
 #define DRM_VMW_PARAM_FIFO_HW_VERSION  6
+#define DRM_VMW_PARAM_MAX_SURF_MEMORY  7
 
 /**
  * struct drm_vmw_getparam_arg
Signature · 1 line
1.7.10.4