Skip to content

Commit 11e6a09

Browse files
Jakob Bornecrantzthomashvmw
authored andcommitted
drm/vmwgfx: Add max surface memory param
Userspace uses this to workaround overcommit issues by flushing the command stream early. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
1 parent 9255ce8 commit 11e6a09

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
6868
SVGA_FIFO_3D_HWVERSION));
6969
break;
7070
}
71+
case DRM_VMW_PARAM_MAX_SURF_MEMORY:
72+
param->value = dev_priv->memory_size;
73+
break;
7174
default:
7275
DRM_ERROR("Illegal vmwgfx get param request: %d\n",
7376
param->param);

‎include/uapi/drm/vmwgfx_drm.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
#define DRM_VMW_PARAM_FIFO_CAPS 4
7676
#define DRM_VMW_PARAM_MAX_FB_SIZE 5
7777
#define DRM_VMW_PARAM_FIFO_HW_VERSION 6
78+
#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
7879

7980
/**
8081
* struct drm_vmw_getparam_arg

0 commit comments

Comments
 (0)