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 09/11] drm/vmwgfx: Use VMW_DEBUG_USER for device command buffer errors
Date: Fri, 5 Apr 2019 18:40:47 +0000	[thread overview]
Message-ID: <20190405184024.4452-9-drawat@vmware.com> (raw)
In-Reply-To: <20190405184024.4452-1-drawat@vmware.com>

DRM_ERROR overwhelms dmesgi so use VMW_DEBUG_USER instead. Any malformed
command should not really go to device so WARN_ONCE to spot this.

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

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index ed15655eacd2..56979e412ca8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -393,6 +393,7 @@ static void vmw_cmdbuf_ctx_process(struct vmw_cmdbuf_man *man,
 			__vmw_cmdbuf_header_free(entry);
 			break;
 		case SVGA_CB_STATUS_COMMAND_ERROR:
+			WARN_ONCE(true, "Command buffer error.\n");
 			entry->cb_header->status = SVGA_CB_STATUS_NONE;
 			list_add_tail(&entry->list, &man->error);
 			schedule_work(&man->work);
@@ -533,19 +534,20 @@ static void vmw_cmdbuf_work_func(struct work_struct *work)
 		global_block = true;
 
 		if (!vmw_cmd_describe(header, &error_cmd_size, &cmd_name)) {
-			DRM_ERROR("Unknown command causing device error.\n");
-			DRM_ERROR("Command buffer offset is %lu\n",
-				  (unsigned long) cb_hdr->errorOffset);
+			VMW_DEBUG_USER("Unknown command causing device error.\n");
+			VMW_DEBUG_USER("Command buffer offset is %lu\n",
+				       (unsigned long) cb_hdr->errorOffset);
 			__vmw_cmdbuf_header_free(entry);
 			send_fence = true;
 			continue;
 		}
 
-		DRM_ERROR("Command \"%s\" causing device error.\n", cmd_name);
-		DRM_ERROR("Command buffer offset is %lu\n",
-			  (unsigned long) cb_hdr->errorOffset);
-		DRM_ERROR("Command size is %lu\n",
-			  (unsigned long) error_cmd_size);
+		VMW_DEBUG_USER("Command \"%s\" causing device error.\n",
+			       cmd_name);
+		VMW_DEBUG_USER("Command buffer offset is %lu\n",
+			       (unsigned long) cb_hdr->errorOffset);
+		VMW_DEBUG_USER("Command size is %lu\n",
+			       (unsigned long) error_cmd_size);
 
 		new_start_offset = cb_hdr->errorOffset + error_cmd_size;
 
-- 
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 ` [PATCH 08/11] drm/vmwgfx: Clean up some debug messages in vmwgfx_execbuf.c Deepak Singh Rawat
2019-04-05 18:40 ` Deepak Singh Rawat [this message]
2019-04-05 18:40 ` [PATCH 10/11] drm/vmwgfx: Fix formatting and spaces " 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-9-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).