Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8081981rwi; Tue, 25 Oct 2022 02:08:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nC0/t6C8Fh2akdtVJPgR+W0iKOYguKHwLsy/hyZg4s5ZMaxeFFETxK7T1PMX2ZAIoI3wi X-Received: by 2002:a05:6402:28b5:b0:461:c6e9:8cc with SMTP id eg53-20020a05640228b500b00461c6e908ccmr8729262edb.170.1666688922342; Tue, 25 Oct 2022 02:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666688922; cv=none; d=google.com; s=arc-20160816; b=nOTk8t5JuJJLg9rv6+i6yAw5NAHjOei5goWhqVDFxhigVtEEL2GuXp3tR0Xjz+fFp4 McTgq7j749aTi3dtpbjwpPXLomt9T+ggW/DuwuK/odrmbp0Rq+urNK1hOI1kRPD1p9I+ PViFtaqzI/iucE47NJkdYYFuChwhSNE6OPIuv7d9Xb+wQ2tkUynBSWhVnuio4zDlqoag rUdjsTZX0dGuABvRyPhkUC8n74bq5BtsxQe7jNlHh8tRXVXaNpXfYpOM9Wpr9yzAogdp opL748duYcQVbat3O1HrIMbMz8oD+7TuNz+21lXXiHwhc51JGBTojSTnQe51Xb+wEphT Ivmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=sQK9rH8o6g/AMHRD7orvGDC56KA7Yk6ucUgL40v+u+s=; b=OTRgHy1jzCAWodf+UkcvuXK8uZPuVP5XFnku5zD38ajEY5uquvvBMm+uU7SC8fYspk 7zYc4pCshgKOIcSn28/G1SI7CB3UeR0MGZKt+BM8olWBwxbAkkAMY4mC/U2j3TpEQSHB pZsJ9cJfA+1k57FzUolz4DwwO5bNQkB6yJVzuj2bqz6UopiYJU1uOTpTJWPO4bUiAhHa EQ5rxlK1NRqr1EGnu81gB5aVH4IH7jeW1zS2G2Ew8r6Hhi4rBmhzrreDx1u7PqePzKJc nYclZOUrZKydHwdIf5haMaae8TkwApnAOV2bp4G7YU4XtT57uSJAsksQaDiUDi8UBJus y33A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js5-20020a17090797c500b0078d27c1c8f4si2643105ejc.696.2022.10.25.02.08.17; Tue, 25 Oct 2022 02:08:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbiJYJFR (ORCPT + 99 others); Tue, 25 Oct 2022 05:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231888AbiJYJEU (ORCPT ); Tue, 25 Oct 2022 05:04:20 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 855EB160225; Tue, 25 Oct 2022 02:03:46 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 29P8dHbx031240; Tue, 25 Oct 2022 16:39:18 +0800 (GMT-8) (envelope-from jammy_huang@aspeedtech.com) Received: from JammyHuang-PC.aspeed.com (192.168.2.115) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Oct 2022 17:02:03 +0800 From: Jammy Huang To: , , , , , , , , , , , , , , , , , Subject: [PATCH v10 5/5] media: aspeed: Extend debug message Date: Tue, 25 Oct 2022 17:02:03 +0800 Message-ID: <20221025090203.5623-6-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025090203.5623-1-jammy_huang@aspeedtech.com> References: <20221025090203.5623-1-jammy_huang@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.115] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 29P8dHbx031240 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org updated as below: Capture: Mode : Direct fetch VGA bpp mode : 32 Signal : lock Width : 1920 Height : 1080 FRC : 0 Compression: Format : JPEG Subsampling : 444 Quality : 4 Performance: Frame# : 4 Frame Duration(ms) : Now : 22 Min : 21 Max : 22 FPS : 45 Signed-off-by: Jammy Huang --- v10: - no update v9: - no update v8: - no update v7: - update debugfs message. Aspeed-jpeg's compression parameters only shown if it's aspeed jpeg now v6: - no update v5: - no update v4: - update debugfs log v3: - no update v2: - update commit message --- drivers/media/platform/aspeed/aspeed-video.c | 38 +++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c index 0b3605ebefc3..cf76aeee8cb6 100644 --- a/drivers/media/platform/aspeed/aspeed-video.c +++ b/drivers/media/platform/aspeed/aspeed-video.c @@ -1905,9 +1905,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; seq_puts(s, "\n"); + seq_puts(s, "Capture:\n"); + val08 = aspeed_video_read(v, VE_CTRL); + 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); @@ -1916,13 +1936,29 @@ 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", format_str[v->format]); + seq_printf(s, " %-20s:\t%s\n", "Subsampling", + v->yuv420 ? "420" : "444"); + seq_printf(s, " %-20s:\t%d\n", "Quality", v->jpeg_quality); + if (v->format == VIDEO_FMT_ASPEED) { + seq_printf(s, " %-20s:\t%s\n", "HQ Mode", + v->hq_mode ? "on" : "off"); + seq_printf(s, " %-20s:\t%d\n", "HQ Quality", + v->hq_mode ? v->jpeg_hq_quality : 0); + } + + 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)"); seq_printf(s, " %-18s:\t%d\n", "Now", v->perf.duration); seq_printf(s, " %-18s:\t%d\n", "Min", v->perf.duration_min); 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)); + seq_printf(s, " %-20s:\t%d\n", "FPS", + (v->perf.totaltime && v->sequence) ? + 1000/(v->perf.totaltime/v->sequence) : 0); return 0; } -- 2.25.1