summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
diff options
context:
space:
mode:
authorDeepak Rawat <drawat@vmware.com>2019-02-14 16:15:39 -0800
committerDeepak Rawat <drawat@vmware.com>2019-04-08 10:29:05 -0700
commit11c454196610ae25784ac19dc3f886a4328007e4 (patch)
tree996cd55ee5eb85789184bc207756fda16d79da5c /drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
parent680360a4d3f6958f18029264bdc277e130f43ab4 (diff)
downloadlwn-11c454196610ae25784ac19dc3f886a4328007e4.tar.gz
lwn-11c454196610ae25784ac19dc3f886a4328007e4.zip
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_gmr.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index 007a0cc7f232..ae7acc6f3dda 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
@@ -51,7 +51,7 @@ static int vmw_gmr2_bind(struct vmw_private *dev_priv,
uint32_t cmd_size = define_size + remap_size;
uint32_t i;
- cmd_orig = cmd = vmw_fifo_reserve(dev_priv, cmd_size);
+ cmd_orig = cmd = VMW_FIFO_RESERVE(dev_priv, cmd_size);
if (unlikely(cmd == NULL))
return -ENOMEM;
@@ -110,11 +110,10 @@ static void vmw_gmr2_unbind(struct vmw_private *dev_priv,
uint32_t define_size = sizeof(define_cmd) + 4;
uint32_t *cmd;
- cmd = vmw_fifo_reserve(dev_priv, define_size);
- if (unlikely(cmd == NULL)) {
- DRM_ERROR("GMR2 unbind failed.\n");
+ cmd = VMW_FIFO_RESERVE(dev_priv, define_size);
+ if (unlikely(cmd == NULL))
return;
- }
+
define_cmd.gmrId = gmr_id;
define_cmd.numPages = 0;