Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4199623pxb; Wed, 13 Oct 2021 23:59:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxpmbFyham5FtrG0w/tloSJZWeNpzgrjErPw1CY6kn807QjIi8rxmLnw7mYmfded/kYV2t X-Received: by 2002:a05:6a00:230e:b0:44c:4f2d:9b00 with SMTP id h14-20020a056a00230e00b0044c4f2d9b00mr3838510pfh.24.1634194797094; Wed, 13 Oct 2021 23:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634194797; cv=none; d=google.com; s=arc-20160816; b=JdpexGWHup3QQT+RZVlUHDIhmL476deLaaPNtkuQdmTLgtE4o4q2bSjpaojCh8u4x6 ODKehNPeFsfnbphyaU6A4zEqQOCxcXDnvyatwe5j8K8K+YslSuvBOt6ve6FF4nDuHcml lEapX42yALO6kuB5fyqMB5wd2WXTKozqm4hwnvu6vvqdP8kWMaYSFqBlGD0SR1yd+7pX XfOrv6py/TY+VyoA0VspHyhvR/fafPaGLjMud8+6eL+Ls5xZhVr4qEf7jqWaGMI9qAia izzRrebeM8ay17qCtBYh3cP4Tyg2wnd8AoAiv534JndK62ZIYnO6xMUeOukClHwv7kUI 9BuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=tcYIivUYaY2CRbjFTB8Rz16T6VkK5Vv7F0P26avQKS8=; b=P5bWsAkKBt3dC36okw7XjPVZ1P7Haugkw3VsMvnSV85Xkd+BKNoQyczS5sawtj9HuI TRl5tyVhnOtahfcBPZhIxieLi3HLp6YCuXLrlh3CUZv1Lh65r6C9WXLw3NUPXxn9BC1D tbzdRNrocAqhKEJob3xbYmVePf/zw0m/vLkr6TFIPfaESXexdYc/51HjGjCvHVzr6liv +rdZ03t7H4/8WsDvmxGXAnyo0yNT2QCmT3dEdq4pDvTahvEMldpCYE0nIFAE+G0f0Lvf XsRLPh+/HsskPXaPDGwW34SOqfjp/WErfYAIx8RwQOp6CcJ2WuXBRftWMETODI9hXn6I wxOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si2510246pgq.416.2021.10.13.23.59.44; Wed, 13 Oct 2021 23:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbhJNG7j (ORCPT + 99 others); Thu, 14 Oct 2021 02:59:39 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:55127 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229834AbhJNG7i (ORCPT ); Thu, 14 Oct 2021 02:59:38 -0400 Received: from [192.168.0.2] (ip5f5ae921.dynamic.kabel-deutschland.de [95.90.233.33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 782BA61E64760; Thu, 14 Oct 2021 08:57:33 +0200 (CEST) Subject: Re: [PATCH 6/6] media: aspeed: richer debugfs From: Paul Menzel To: Jammy Huang Cc: linux-aspeed@lists.ozlabs.org, andrew@aj.id.au, openbmc@lists.ozlabs.org, eajames@linux.ibm.com, linux-kernel@vger.kernel.org, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org References: <20211014034819.2283-1-jammy_huang@aspeedtech.com> <20211014034819.2283-7-jammy_huang@aspeedtech.com> Message-ID: <53fa3d1a-d75b-2fb1-a315-c6406f33289c@molgen.mpg.de> Date: Thu, 14 Oct 2021 08:57:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Jammy, Am 14.10.21 um 08:54 schrieb Paul Menzel: > Am 14.10.21 um 05:48 schrieb Jammy Huang: > media: aspeed: richer debugfs It’d be great if you used a statement by adding a verb in imperative mood [1]. Maybe: > Extend debug message or > Add more debug log messages >> updated as below: >> >> Caputre: > > Capture > >>    Mode                : Direct fetch >>    VGA bpp mode        : 32 >>    Signal              : Unlock >>    Width               : 1920 >>    Height              : 1080 >>    FRC                 : 30 >> >> Compression: >>    Format              : JPEG >>    Subsampling         : 444 >>    Quality             : 0 >>    HQ Mode             : N/A >>    HQ Quality          : 0 >>    Mode                : N/A >> >> Performance: >>    Frame#              : 0 >>    Frame Duration(ms)  : >>      Now               : 0 >>      Min               : 0 >>      Max               : 0 >>    FPS                 : 0 > > Do you have output with non-zero values? ;-) > > On what device did you test this? > >> Signed-off-by: Jammy Huang >> --- >>   drivers/media/platform/aspeed-video.c | 41 +++++++++++++++++++++++++-- >>   1 file changed, 38 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/media/platform/aspeed-video.c >> b/drivers/media/platform/aspeed-video.c >> index e1031fd09ac6..f2e5c49ee906 100644 >> --- a/drivers/media/platform/aspeed-video.c >> +++ b/drivers/media/platform/aspeed-video.c >> @@ -464,6 +464,9 @@ static const struct v4l2_dv_timings_cap >> aspeed_video_timings_cap = { >>       }, >>   }; >> +static const char * const compress_mode_str[] = {"DCT Only", >> +    "DCT VQ mix 2-color", "DCT VQ mix 4-color"}; >> + >>   static unsigned int debug; >>   static void aspeed_video_init_jpeg_table(u32 *table, bool yuv420) >> @@ -1077,8 +1080,6 @@ static void aspeed_video_set_resolution(struct >> aspeed_video *video) >>   static void aspeed_video_update_regs(struct aspeed_video *video) >>   { >> -    static const char * const compress_mode_str[] = {"DCT Only", >> -        "DCT VQ mix 2-color", "DCT VQ mix 4-color"}; >>       u32 comp_ctrl =    FIELD_PREP(VE_COMP_CTRL_DCT_LUM, >> video->jpeg_quality) | >>           FIELD_PREP(VE_COMP_CTRL_DCT_CHR, video->jpeg_quality | 0x10) | >>           FIELD_PREP(VE_COMP_CTRL_EN_HQ, video->hq_mode) | >> @@ -1795,9 +1796,29 @@ static const struct vb2_ops >> aspeed_video_vb2_ops = { >>   static int aspeed_video_debugfs_show(struct seq_file *s, void *data) >>   { >>       struct aspeed_video *v = s->private; >> +    u32 val08; > > Why does `08` refer to? > >>       seq_puts(s, "\n"); >> +    val08 = aspeed_video_read(v, VE_CTRL); >> +    seq_puts(s, "Caputre:\n"); >> +    if (FIELD_GET(VE_CTRL_DIRECT_FETCH, val08)) { >> +        seq_printf(s, "  %-20s:\tDirect fetch\n", "Mode"); >> +        seq_printf(s, "  %-20s:\t%s\n", "VGA bpp mode", >> +               FIELD_GET(VE_CTRL_INT_DE, val08) ? "16" : "32"); >> +    } else { >> +        seq_printf(s, "  %-20s:\tSync\n", "Mode"); >> +        seq_printf(s, "  %-20s:\t%s\n", "Video source", >> +               FIELD_GET(VE_CTRL_SOURCE, val08) ? >> +               "external" : "internal"); >> +        seq_printf(s, "  %-20s:\t%s\n", "DE source", >> +               FIELD_GET(VE_CTRL_INT_DE, val08) ? >> +               "internal" : "external"); >> +        seq_printf(s, "  %-20s:\t%s\n", "Cursor overlay", >> +               FIELD_GET(VE_CTRL_AUTO_OR_CURSOR, val08) ? >> +               "Without" : "With"); >> +    } >> + >>       seq_printf(s, "  %-20s:\t%s\n", "Signal", >>              v->v4l2_input_status ? "Unlock" : "Lock"); >>       seq_printf(s, "  %-20s:\t%d\n", "Width", v->pix_fmt.width); >> @@ -1806,6 +1827,21 @@ static int aspeed_video_debugfs_show(struct >> seq_file *s, void *data) >>       seq_puts(s, "\n"); >> +    seq_puts(s, "Compression:\n"); >> +    seq_printf(s, "  %-20s:\t%s\n", "Format", >> +           v->partial_jpeg ? "Aspeed" : "JPEG"); >> +    seq_printf(s, "  %-20s:\t%s\n", "Subsampling", >> +           v->yuv420 ? "420" : "444"); >> +    seq_printf(s, "  %-20s:\t%d\n", "Quality", v->jpeg_quality); >> +    seq_printf(s, "  %-20s:\t%s\n", "HQ Mode", >> +           v->partial_jpeg ? (v->hq_mode ? "on" : "off") : "N/A"); >> +    seq_printf(s, "  %-20s:\t%d\n", "HQ Quality", v->jpeg_hq_quality); >> +    seq_printf(s, "  %-20s:\t%s\n", "Mode", >> +           v->partial_jpeg ? compress_mode_str[v->compression_mode] >> +                   : "N/A"); >> + >> +    seq_puts(s, "\n"); >> + >>       seq_puts(s, "Performance:\n"); >>       seq_printf(s, "  %-20s:\t%d\n", "Frame#", v->sequence); >>       seq_printf(s, "  %-20s:\n", "Frame Duration(ms)"); > > Remove the colon, and add a space before (? > >> @@ -1814,7 +1850,6 @@ static int aspeed_video_debugfs_show(struct >> seq_file *s, void *data) >>       seq_printf(s, "    %-18s:\t%d\n", "Max", v->perf.duration_max); >>       seq_printf(s, "  %-20s:\t%d\n", "FPS", >> 1000/(v->perf.totaltime/v->sequence)); >> - >>       return 0; >>   } Kind regards, Paul [1]: https://chris.beams.io/posts/git-commit/