Commit 6070e9fa authored by Jakob Bornecrantz's avatar Jakob Bornecrantz Committed by Dave Airlie

vmwgfx: Some comments and BUG_ON

Signed-off-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 5f898d99
...@@ -681,6 +681,9 @@ static int vmw_resize_cmd_bounce(struct vmw_sw_context *sw_context, ...@@ -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. * Creates a fence object and submits a command stream marker.
* If this fails for some reason, We sync the fifo and return NULL. * If this fails for some reason, We sync the fifo and return NULL.
* It is then safe to fence buffers with a NULL pointer. * 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, int vmw_execbuf_fence_commands(struct drm_file *file_priv,
...@@ -692,6 +695,8 @@ 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; int ret;
bool synced = false; bool synced = false;
/* p_handle implies file_priv. */
BUG_ON(p_handle != NULL && file_priv == NULL);
ret = vmw_fifo_send_fence(dev_priv, &sequence); ret = vmw_fifo_send_fence(dev_priv, &sequence);
if (unlikely(ret != 0)) { if (unlikely(ret != 0)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment