[{"id":1777031,"web_url":"http://patchwork.ozlabs.org/comment/1777031/","msgid":"<1506605396.29089.22.camel@perches.com>","list_archive_url":null,"date":"2017-09-28T13:29:56","subject":"Re: [PATCH v3 3/6] gpu: host1x: Improve debug disassembly formatting","submitter":{"id":771,"url":"http://patchwork.ozlabs.org/api/people/771/","name":"Joe Perches","email":"joe@perches.com"},"content":"On Thu, 2017-09-28 at 15:50 +0300, Mikko Perttunen wrote:\n> The host1x driver prints out \"disassembly\" dumps of the command FIFO\n> and gather contents on submission timeouts. However, the output has\n> been quite difficult to read with unnecessary newlines and occasional\n> missing parentheses.\n\nI think it would be cleaner/simpler to change\nthis by adding a line initiator with just a\nKERN_<LEVEL> at the few places that actually\nstart a newline.\n\nThen change the write_to_seqfile to skip any\noutput that starts with KERN_<LEVEL>\n\n> diff --git a/drivers/gpu/host1x/hw/debug_hw_1x01.c b/drivers/gpu/host1x/hw/debug_hw_1x01.c\n[]\n> @@ -111,11 +111,11 @@ static void host1x_debug_show_channel_fifo(struct host1x *host,\n>  \t\tval = host1x_sync_readl(host, HOST1X_SYNC_CFPEEK_READ);\n>  \n>  \t\tif (!data_count) {\n> -\t\t\thost1x_debug_output(o, \"%08x:\", val);\n> +\t\t\thost1x_debug_output(o, \"%08x: \", val);\n\nie: change this and the other start of lines to prepend KERN_INFO\n\n\t\t\thost_x_debug_putput(o, KERN_INFO \"%08x \", val);\n\n>  \t\t\tdata_count = show_channel_command(o, val);\n>  \t\t} else {\n> -\t\t\thost1x_debug_output(o, \"%08x%s\", val,\n> -\t\t\t\t\t    data_count > 0 ? \", \" : \"])\\n\");\n\nAnd don't change all the other continuation lines\n\nAnd change the write_to_ functions to\n\nstatic inline void write_to_seqfile(void *ctx, const char *str, size_t len)\n{\n\tconst char *output = printk_skip_level(str);\n\n\tseq_write(ctx, output, len - (str - output)); \n}\n\nstatic inline void write_to_printk(void *ctx, const char *str, size_t len)\n{\n\tconst char *output = printk_skip_level(str);\n\n\tif (output == str)\n\t\tpr_cont(\"%s\", str);\n\telse\n\t\tprintk(\"s\", str);\n}\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-tegra\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2why3Ny9z9t48\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 23:37:06 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752965AbdI1NhF (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 28 Sep 2017 09:37:05 -0400","from smtprelay0169.hostedemail.com ([216.40.44.169]:52398 \"EHLO\n\tsmtprelay.hostedemail.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1752859AbdI1NhF (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tThu, 28 Sep 2017 09:37:05 -0400","from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com\n\t[10.5.19.251])\n\tby smtpgrave02.hostedemail.com (Postfix) with ESMTP id 346E818008A27\n\tfor <linux-tegra@vger.kernel.org>;\n\tThu, 28 Sep 2017 13:30:02 +0000 (UTC)","from filter.hostedemail.com (clb03-v110.bra.tucows.net\n\t[216.40.38.60])\n\tby smtprelay01.hostedemail.com (Postfix) with ESMTP id EA30D100E801A; \n\tThu, 28 Sep 2017 13:30:00 +0000 (UTC)","from XPS-9350 (unknown [47.151.132.55])\n\t(Authenticated sender: joe@perches.com)\n\tby omf06.hostedemail.com (Postfix) with ESMTPA;\n\tThu, 28 Sep 2017 13:29:58 +0000 (UTC)"],"X-Greylist":"delayed 424 seconds by postgrey-1.27 at vger.kernel.org;\n\tThu, 28 Sep 2017 09:37:05 EDT","X-Session-Marker":"6A6F6540706572636865732E636F6D","X-Spam-Summary":"2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::::::::,\n\tRULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3872:3874:4321:5007:6119:7875:7903:10004:10400:10848:11026:11232:11473:11657:11658:11914:12043:12296:12438:12740:12760:12895:13069:13161:13229:13311:13357:13439:14659:14721:21080:21451:21627:30054:30070:30091,\n\t0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5,\n\tNetcheck:none, DomainCache:0, MSF:not bulk, SPF:, MSBL:0,\n\tDNSBL:none, Custom_rules:0:0:0, LFtime:1, LUA_SUMMARY:none","X-HE-Tag":"basin54_39f7794248754","X-Filterd-Recvd-Size":"2595","Message-ID":"<1506605396.29089.22.camel@perches.com>","Subject":"Re: [PATCH v3 3/6] gpu: host1x: Improve debug disassembly formatting","From":"Joe Perches <joe@perches.com>","To":"Mikko Perttunen <mperttunen@nvidia.com>, thierry.reding@gmail.com,\n\tjonathanh@nvidia.com","Cc":"digetx@gmail.com, dri-devel@lists.freedesktop.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org","Date":"Thu, 28 Sep 2017 06:29:56 -0700","In-Reply-To":"<20170928125044.32516-4-mperttunen@nvidia.com>","References":"<20170928125044.32516-1-mperttunen@nvidia.com>\n\t<20170928125044.32516-4-mperttunen@nvidia.com>","Content-Type":"text/plain; charset=\"ISO-8859-1\"","X-Mailer":"Evolution 3.22.6-1ubuntu1 ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}}]