summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorJakob Bornecrantz2011-10-04 20:13:16 +0200
committerDave Airlie2011-10-05 11:17:10 +0200
commit6070e9fa6d12d465c65a172a2b1c752ebedc5937 (patch)
tree5a4383c2d52895009b90a4276724ed3b5602b3e3 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parentvmwgfx: Make sure the reserved area is at the start of vram (diff)
downloadkernel-qcow2-linux-6070e9fa6d12d465c65a172a2b1c752ebedc5937.tar.gz
kernel-qcow2-linux-6070e9fa6d12d465c65a172a2b1c752ebedc5937.tar.xz
kernel-qcow2-linux-6070e9fa6d12d465c65a172a2b1c752ebedc5937.zip
vmwgfx: Some comments and BUG_ON
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index fa26e647f488..cc8c08b35102 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -681,6 +681,9 @@ static int vmw_resize_cmd_bounce(struct vmw_sw_context *sw_context,
* Creates a fence object and submits a command stream marker.
* If this fails for some reason, We sync the fifo and return NULL.
* It is then safe to fence buffers with a NULL pointer.
+ *
+ * If @p_handle is not NULL @file_priv must also not be NULL. Creates
+ * a userspace handle if @p_handle is not NULL, otherwise not.
*/
int vmw_execbuf_fence_commands(struct drm_file *file_priv,
@@ -692,6 +695,8 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv,
int ret;
bool synced = false;
+ /* p_handle implies file_priv. */
+ BUG_ON(p_handle != NULL && file_priv == NULL);
ret = vmw_fifo_send_fence(dev_priv, &sequence);
if (unlikely(ret != 0)) {