[PATCH RFC 023/111] staging: etnaviv: quieten down submission debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>

The submission debug was always being printed, and printed at error
level.  Contain this debug within DRM_UT_DRIVER, and reduce it down
to info level.

Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
---
 drivers/staging/etnaviv/etnaviv_buffer.c | 37 +++++++++++++++++---------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/etnaviv/etnaviv_buffer.c b/drivers/staging/etnaviv/etnaviv_buffer.c
index 38b103543cce..945af22db3f1 100644
--- a/drivers/staging/etnaviv/etnaviv_buffer.c
+++ b/drivers/staging/etnaviv/etnaviv_buffer.c
@@ -151,7 +151,8 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, struct et
 	u32 back;
 	u32 i;
 
-	etnaviv_buffer_dump(gpu, buffer, 0, 0x50);
+	if (drm_debug & DRM_UT_DRIVER)
+		etnaviv_buffer_dump(gpu, buffer, 0, 0x50);
 
 	/* save offset back into main buffer */
 	back = buffer->offset;
@@ -179,24 +180,25 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, struct et
 		submit->cmd[i].size = submit->cmd[i].obj->offset -
 				      submit->cmd[i].offset;
 
-	printk(KERN_ERR "stream link @ 0x%08x\n", cmd->paddr + ((cmd->offset - 1) * 4));
-	printk(KERN_ERR "stream link @ %p\n", cmd->vaddr + ((cmd->offset - 1) * 4));
+	if (drm_debug & DRM_UT_DRIVER) {
+		pr_info("stream link @ 0x%08x\n",
+			cmd->paddr + ((cmd->offset - 1) * 4));
+		pr_info("stream link @ %p\n",
+			cmd->vaddr + ((cmd->offset - 1) * 4));
 
-	for (i = 0; i < submit->nr_cmds; i++) {
-		struct etnaviv_gem_object *obj = submit->cmd[i].obj;
+		for (i = 0; i < submit->nr_cmds; i++) {
+			struct etnaviv_gem_object *obj = submit->cmd[i].obj;
 
-		/* TODO: remove later */
-		if (unlikely(drm_debug & DRM_UT_CORE))
-			etnaviv_buffer_dump(gpu, obj, submit->cmd[i].offset * 4,
-					    submit->cmd[i].size);
-	}
+			etnaviv_buffer_dump(gpu, obj, submit->cmd[i].offset,
+					submit->cmd[i].size);
+		}
 
-	/* change ll to NOP */
-	printk(KERN_ERR "link op: %p\n", lw);
-	printk(KERN_ERR "link addr: %p\n", lw + 1);
-	printk(KERN_ERR "addr: 0x%08x\n", submit->cmd[0].obj->paddr);
-	printk(KERN_ERR "back: 0x%08x\n", buffer->paddr + (back * 4));
-	printk(KERN_ERR "event: %d\n", event);
+		pr_info("link op: %p\n", lw);
+		pr_info("link addr: %p\n", lw + 1);
+		pr_info("addr: 0x%08x\n", submit->cmd[0].obj->paddr);
+		pr_info("back: 0x%08x\n", buffer->paddr + (back * 4));
+		pr_info("event: %d\n", event);
+	}
 
 	/* Change WAIT into a LINK command; write the address first. */
 	i = VIV_FE_LINK_HEADER_OP_LINK | VIV_FE_LINK_HEADER_PREFETCH(submit->cmd[0].size * 2);
@@ -205,5 +207,6 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, struct et
 	*(lw)= i;
 	mb();
 
-	etnaviv_buffer_dump(gpu, buffer, 0, 0x50);
+	if (drm_debug & DRM_UT_DRIVER)
+		etnaviv_buffer_dump(gpu, buffer, 0, 0x50);
 }
-- 
2.1.4

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





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux