dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Deepak Singh Rawat <drawat@vmware.com>
To: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Cc: Deepak Singh Rawat <drawat@vmware.com>,
	Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>
Subject: [PATCH 08/11] drm/vmwgfx: Clean up some debug messages in vmwgfx_execbuf.c
Date: Fri, 5 Apr 2019 18:40:45 +0000	[thread overview]
Message-ID: <20190405184024.4452-8-drawat@vmware.com> (raw)
In-Reply-To: <20190405184024.4452-1-drawat@vmware.com>

Now that vmw_cmd_check prints debug message whenever a command verifier
fails, some of debug statements are unnecessary. Also rearranged some
debug print-out with this patch.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 9df334340146..e7c93f422a7e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -217,7 +217,6 @@ static int vmw_cmd_ctx_first_setup(struct vmw_private *dev_priv,
 		sw_context->staged_bindings =
 			vmw_binding_state_alloc(dev_priv);
 		if (IS_ERR(sw_context->staged_bindings)) {
-			VMW_DEBUG_USER("Failed to alloc ctx binding info.\n");
 			ret = PTR_ERR(sw_context->staged_bindings);
 			sw_context->staged_bindings = NULL;
 			goto out_err;
@@ -227,7 +226,6 @@ static int vmw_cmd_ctx_first_setup(struct vmw_private *dev_priv,
 	if (sw_context->staged_bindings_inuse) {
 		node->staged = vmw_binding_state_alloc(dev_priv);
 		if (IS_ERR(node->staged)) {
-			VMW_DEBUG_USER("Failed to alloc ctx binding info.\n");
 			ret = PTR_ERR(node->staged);
 			node->staged = NULL;
 			goto out_err;
@@ -327,8 +325,10 @@ static int vmw_execbuf_res_noref_val_add(struct vmw_sw_context *sw_context,
 	if (priv_size && first_usage) {
 		ret = vmw_cmd_ctx_first_setup(dev_priv, sw_context, res,
 					      ctx_info);
-		if (ret)
+		if (ret) {
+			VMW_DEBUG_USER("Failed first usage context setup.\n");
 			return ret;
+		}
 	}
 
 	vmw_execbuf_rcache_update(rcache, res, ctx_info);
@@ -421,10 +421,8 @@ vmw_view_id_val_add(struct vmw_sw_context *sw_context,
 	struct vmw_resource *view;
 	int ret;
 
-	if (!ctx_node) {
-		VMW_DEBUG_USER("DX Context not set.\n");
+	if (!ctx_node)
 		return ERR_PTR(-EINVAL);
-	}
 
 	view = vmw_view_lookup(sw_context->man, view_type, id);
 	if (IS_ERR(view))
@@ -723,10 +721,8 @@ static int vmw_rebind_all_dx_query(struct vmw_resource *ctx_res)
 
 	cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), ctx_res->id);
 
-	if (cmd == NULL) {
-		VMW_DEBUG_USER("Failed to rebind queries.\n");
+	if (cmd == NULL)
 		return -ENOMEM;
-	}
 
 	cmd->header.id = SVGA_3D_CMD_DX_BIND_ALL_QUERY;
 	cmd->header.size = sizeof(cmd->body);
@@ -761,8 +757,10 @@ static int vmw_rebind_contexts(struct vmw_sw_context *sw_context)
 		}
 
 		ret = vmw_rebind_all_dx_query(val->ctx);
-		if (ret != 0)
+		if (ret != 0) {
+			VMW_DEBUG_USER("Failed to rebind queries.\n");
 			return ret;
+		}
 	}
 
 	return 0;
@@ -2713,8 +2711,6 @@ static int vmw_cmd_dx_destroy_shader(struct vmw_private *dev_priv,
 
 	ret = vmw_shader_remove(sw_context->man, cmd->body.shaderId, 0,
 				&sw_context->staged_cmd_res);
-	if (ret)
-		VMW_DEBUG_USER("Could not find shader to remove.\n");
 
 	return ret;
 }
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-04-05 18:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 18:40 [PATCH 01/11] drm/vmwgfx: Be more restrictive when dirtying resources Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 02/11] drm/vmwgfx: Remove set but not used variable 'restart' Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 03/11] drm/vmwgfx: remove redundant unlikely annotation Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 04/11] drm/vmwgfx: Use preprocessor macro to get valid context node Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 05/11] drm/vmwgfx: Use preprocessor macro for cmd struct Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 06/11] drm/vmwgfx: Add a new define for vmwgfx user-space debugging Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 07/11] drm/vmwgfx: Print message when command verifier returns with error Deepak Singh Rawat
2019-04-05 18:40 ` Deepak Singh Rawat [this message]
2019-04-05 18:40 ` [PATCH 09/11] drm/vmwgfx: Use VMW_DEBUG_USER for device command buffer errors Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 10/11] drm/vmwgfx: Fix formatting and spaces in vmwgfx_execbuf.c Deepak Singh Rawat
2019-04-05 18:40 ` [PATCH 11/11] drm/vmwgfx: Use preprocessor macro for FIFO allocation Deepak Singh Rawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190405184024.4452-8-drawat@vmware.com \
    --to=drawat@vmware.com \
    --cc=Linux-graphics-maintainer@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).