From patchwork Thu Apr 2 15:29:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 6149391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A78D0BFFA8 for ; Thu, 2 Apr 2015 15:31:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED397203AE for ; Thu, 2 Apr 2015 15:31:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 00DFD203B5 for ; Thu, 2 Apr 2015 15:31:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8A186EAA3; Thu, 2 Apr 2015 08:31:02 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gabe.freedesktop.org (Postfix) with ESMTP id 3335F6EA41 for ; Thu, 2 Apr 2015 08:30:57 -0700 (PDT) Received: from dude.hi.4.pengutronix.de ([10.1.0.7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Ydh56-0005OD-Dr; Thu, 02 Apr 2015 17:30:56 +0200 From: Lucas Stach To: dri-devel@lists.freedesktop.org Subject: [PATCH RFC 023/111] staging: etnaviv: quieten down submission debugging Date: Thu, 2 Apr 2015 17:29:25 +0200 Message-Id: <1427988653-754-24-git-send-email-l.stach@pengutronix.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427988653-754-1-git-send-email-l.stach@pengutronix.de> References: <1427988653-754-1-git-send-email-l.stach@pengutronix.de> X-SA-Exim-Connect-IP: 10.1.0.7 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org Cc: Russell King , kernel@pengutronix.de X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Russell King 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 --- 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); }