Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4742636rwb; Tue, 20 Sep 2022 20:01:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BBdP2y89yjzYLteYNOvnSpX0vwsq8IMGsXglrLvpdDLI3m01k0/8GhsdfR/qzmXVR3set X-Received: by 2002:a05:6a00:16d6:b0:53b:3e58:1c6f with SMTP id l22-20020a056a0016d600b0053b3e581c6fmr26557187pfc.7.1663729284943; Tue, 20 Sep 2022 20:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663729284; cv=none; d=google.com; s=arc-20160816; b=JR/o+3QqBENSZsauv9e+b8KAKmQKz3Pv90+TRNf/OT4UQwHcr2ZZeL7oBZ2hH69Lop yQmzRlu3MY/7wXeOVR2N7dhZ0OvYB5k2OHB2qjbBXhXw0EFGESKn2H5YPXQqNKVV9Pth uj14RL+g/w9IBLwL4Vrxv0Tfsh13tDtZ4x4kLodKVxG8LJvlJPJ+Ld2kjlWJ/whtZRau 0l0YFcGvAFc9m90zBBOVI0qEOT9+2+j9DxSoswJ7/94IFLECQA3YXgkZ9FYw3xENQIlU QHgfc7h2RNptEiZXrN6Ka6gnmG+T39Zfz6yfb8aQb6sbp/eNECOiPESF1cMS3qNRTRr1 DEoQ== 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=YY+ugsy7rzyOihxuIXvQnE3PtAcctYvqofczlYAmp9Y=; b=k0h2EUG3kqIll6uu6DnormMe6JZ9TbmdYBXCSN4pJHVol/F9FW4YYQtdJleNLmkDw7 3tPemN38tfauRLRZOncTkXUj1fBfs6Qry5T73BcLG3+y+S7U9oh3IhgMmUAcdH/xzn8n 69BgE8H/8wn4HUI7FF6L58VHzJGWWe2M9Vl4SwNRSb5HbCgePS5ytEZ2zmBHw97B7VJy okR7AAmN0k8kNU71+1kAwudFLmiIcwv4nK9IVPHXlqUETYEs8U9B11gVOeQOlPJIDar5 kzhSbkDFA1FCVMBBSBkFZf+QEza9Xljg0kmKEHvl/vzGYeI2uXeJuaoMT51lD+q96lYP wfdg== 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 6-20020a630f46000000b00438ce2800fcsi1588534pgp.579.2022.09.20.20.01.09; Tue, 20 Sep 2022 20:01:24 -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 S230513AbiIUCwq (ORCPT + 99 others); Tue, 20 Sep 2022 22:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbiIUCwn (ORCPT ); Tue, 20 Sep 2022 22:52:43 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FB5F7DF76; Tue, 20 Sep 2022 19:52:39 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 28L2U5Vv024711; Wed, 21 Sep 2022 10:30:07 +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; Wed, 21 Sep 2022 10:50:55 +0800 From: Jammy Huang To: , , , , , , , , , , , , , , , Subject: [PATCH v9 4/4] media: aspeed: Extend debug message Date: Wed, 21 Sep 2022 10:51:12 +0800 Message-ID: <20220921025112.13150-5-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220921025112.13150-1-jammy_huang@aspeedtech.com> References: <20220921025112.13150-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 28L2U5Vv024711 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 --- 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 739288026418..dc61dfa4228b 100644 --- a/drivers/media/platform/aspeed/aspeed-video.c +++ b/drivers/media/platform/aspeed/aspeed-video.c @@ -1907,9 +1907,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); @@ -1918,13 +1938,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