diff options
author | Deepak Rawat <drawat@vmware.com> | 2019-02-15 03:15:39 +0300 |
---|---|---|
committer | Deepak Rawat <drawat@vmware.com> | 2019-04-08 20:29:05 +0300 |
commit | 11c454196610ae25784ac19dc3f886a4328007e4 (patch) | |
tree | 996cd55ee5eb85789184bc207756fda16d79da5c /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |
parent | 680360a4d3f6958f18029264bdc277e130f43ab4 (diff) | |
download | linux-11c454196610ae25784ac19dc3f886a4328007e4.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 0d703f431f1f..6cc9837b10ec 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -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); |