drm/vmwgfx: Use preprocessor macro for FIFO allocation
Whenever FIFO allocation fails an error message is printed to dmesg. Since this is common operation a lot of similar messages are scattered everywhere. Use preprocessor macro to remove this cluttering. Signed-off-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
@@ -720,8 +720,7 @@ static int vmw_rebind_all_dx_query(struct vmw_resource *ctx_res)
|
||||
if (!dx_query_mob || dx_query_mob->dx_query_ctx)
|
||||
return 0;
|
||||
|
||||
cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), ctx_res->id);
|
||||
|
||||
cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), ctx_res->id);
|
||||
if (cmd == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -3468,14 +3467,13 @@ static int vmw_execbuf_submit_fifo(struct vmw_private *dev_priv,
|
||||
void *cmd;
|
||||
|
||||
if (sw_context->dx_ctx_node)
|
||||
cmd = vmw_fifo_reserve_dx(dev_priv, command_size,
|
||||
cmd = VMW_FIFO_RESERVE_DX(dev_priv, command_size,
|
||||
sw_context->dx_ctx_node->ctx->id);
|
||||
else
|
||||
cmd = vmw_fifo_reserve(dev_priv, command_size);
|
||||
if (!cmd) {
|
||||
VMW_DEBUG_USER("Failed reserving fifo space for commands.\n");
|
||||
cmd = VMW_FIFO_RESERVE(dev_priv, command_size);
|
||||
|
||||
if (!cmd)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
vmw_apply_relocations(sw_context);
|
||||
memcpy(cmd, kernel_commands, command_size);
|
||||
|
Reference in New Issue
Block a user