From patchwork Thu Nov 10 09:56:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jammy Huang X-Patchwork-Id: 18042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp52975wru; Thu, 10 Nov 2022 02:03:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf62gsQyvW5w7/EX2my/n2y2FM5h6rX1Ci5TNUUNkNG6iflWPrqIp81BUkwofKogDFsYQ0tm X-Received: by 2002:a17:906:d8d8:b0:7ae:7bef:39ec with SMTP id re24-20020a170906d8d800b007ae7bef39ecmr9458803ejb.662.1668074621268; Thu, 10 Nov 2022 02:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668074621; cv=none; d=google.com; s=arc-20160816; b=hXdqM5Yo1zADVGyHaTBo7eDtETfufAbsbV6+hkSYYOI8Lrr6cuCH6Aa6v577mIQkCd doimSGzY13jSisTCbV+5/VUHoyhe8r+XhxWjlTzRDKP3Um8pW3KAowCj9hZQWDgG3DuX sLV54KJ5q6IdWdv9jT3zsh678jgXpsgd80kNtPi3OOlXYVYE/0BIPVNnyPV/qsPUFuYq fVZlOWqYBDcir16MQyIknRbOZ40ZPn+qexOXo5KDSZtOIU+174hjH+j0eRB7IB6mj9kV vK/ps5yW2OYiW9NmZwKeQonKXS9jn/4F7tGS8OQrc8hIqq94Bs/FG+DyX45AEKh55aWg W5EA== 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 :message-id:date:subject:to:from; bh=SYfYybO/ZYg8cB3R70nKb1KbW9lYP3NioYaAIxICW1o=; b=EYF/oQR79ialvY3WP0I5UsL8HlIujSulV/vwsIaajXmLSvnj6woUq6l/ykRHNO3OXv vVUEcE8cZGhMEuNSycM8ga5k/jGUwINhcI7gPfWsb2jFG+xTj6HXuHVXm+pMW6Pq1OWB +1pfe3eO+xlR9VYorgLZki/jWgsdAkGcAJQmX3tVtXGJ8FG12jaXL2PVhGtc7ccHJ7s6 ZXZ3LIGUbbrLWWi9O0Hs5o1NPl7f4ee/mB6Nmo+cFNkorpOfG/juDeUp0PzLgNEgU68l 8v6hhvZUoKLrjI4yjD8Scwb0BARhbMRf4DIIjqz8Mns0lujpfVsoP10qC4DYZQVHiMy3 kuxw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qq10-20020a17090720ca00b0078cc8a2cf4bsi14073920ejb.614.2022.11.10.02.03.13; Thu, 10 Nov 2022 02:03:41 -0800 (PST) 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 S229611AbiKJJ57 (ORCPT + 99 others); Thu, 10 Nov 2022 04:57:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiKJJ56 (ORCPT ); Thu, 10 Nov 2022 04:57:58 -0500 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE9FA6AED5; Thu, 10 Nov 2022 01:57:56 -0800 (PST) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2AA9WgmQ047730; Thu, 10 Nov 2022 17:32:42 +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; Thu, 10 Nov 2022 17:56:21 +0800 From: Jammy Huang To: , , , , , , , , , , Subject: [PATCH] media: aspeed: Use v4l2_dbg to replace v4l2_warn to avoid log spam Date: Thu, 10 Nov 2022 17:56:11 +0800 Message-ID: <20221110095611.522-1-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 2AA9WgmQ047730 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749103014082482785?= X-GMAIL-MSGID: =?utf-8?q?1749103014082482785?= If the host is powered off, there will be many warning log. To avoid the log spam in this condition, replace v4l2_warn with v4l2_dbg. Signed-off-by: Jammy Huang --- drivers/media/platform/aspeed/aspeed-video.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) base-commit: aae703b02f92bde9264366c545e87cec451de471 prerequisite-patch-id: bf47e8ab2998acfbc32be5a4b7b5ae8a3ae4218b prerequisite-patch-id: bf82715983e08f2e810ff1a82ce644f5f9006cd9 prerequisite-patch-id: 28a2040ef0235e5765f05d2fc5529bce2a0f4c6f prerequisite-patch-id: 7e761c779730536db8baf50db5fc8caf058e95af prerequisite-patch-id: c48ea20973fa35938a7d33a0e20d2900df48755f diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c index cf76aeee8cb6..662465d13a0e 100644 --- a/drivers/media/platform/aspeed/aspeed-video.c +++ b/drivers/media/platform/aspeed/aspeed-video.c @@ -586,13 +586,13 @@ static int aspeed_video_start_frame(struct aspeed_video *video) bool bcd_buf_need = (video->format != VIDEO_FMT_STANDARD); if (video->v4l2_input_status) { - v4l2_warn(&video->v4l2_dev, "No signal; don't start frame\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "No signal; don't start frame\n"); return 0; } if (!(seq_ctrl & VE_SEQ_CTRL_COMP_BUSY) || !(seq_ctrl & VE_SEQ_CTRL_CAP_BUSY)) { - v4l2_warn(&video->v4l2_dev, "Engine busy; don't start frame\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "Engine busy; don't start frame\n"); return -EBUSY; } @@ -615,7 +615,7 @@ static int aspeed_video_start_frame(struct aspeed_video *video) struct aspeed_video_buffer, link); if (!buf) { spin_unlock_irqrestore(&video->lock, flags); - v4l2_warn(&video->v4l2_dev, "No buffers; don't start frame\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "No buffers; don't start frame\n"); return -EPROTO; } @@ -796,7 +796,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg) if (video->format == VIDEO_FMT_STANDARD && list_is_last(&buf->link, &video->buffers)) { empty = false; - v4l2_warn(&video->v4l2_dev, "skip to keep last frame updated\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "skip to keep last frame updated\n"); } else { buf->vb.vb2_buf.timestamp = ktime_get_ns(); buf->vb.sequence = video->sequence++; @@ -1060,7 +1060,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video) res_check(video), MODE_DETECT_TIMEOUT); if (!rc) { - v4l2_warn(&video->v4l2_dev, "Timed out; first mode detect\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "Timed out; first mode detect\n"); clear_bit(VIDEO_RES_DETECT, &video->flags); return; } @@ -1081,7 +1081,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video) MODE_DETECT_TIMEOUT); clear_bit(VIDEO_RES_DETECT, &video->flags); if (!rc) { - v4l2_warn(&video->v4l2_dev, "Timed out; second mode detect\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "Timed out; second mode detect\n"); return; } @@ -1104,7 +1104,7 @@ static void aspeed_video_get_resolution(struct aspeed_video *video) } while (invalid_resolution && (tries++ < INVALID_RESOLUTION_RETRIES)); if (invalid_resolution) { - v4l2_warn(&video->v4l2_dev, "Invalid resolution detected\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "Invalid resolution detected\n"); return; } @@ -1856,7 +1856,7 @@ static void aspeed_video_stop_streaming(struct vb2_queue *q) !test_bit(VIDEO_FRAME_INPRG, &video->flags), STOP_TIMEOUT); if (!rc) { - v4l2_warn(&video->v4l2_dev, "Timed out when stopping streaming\n"); + v4l2_dbg(1, debug, &video->v4l2_dev, "Timed out when stopping streaming\n"); /* * Need to force stop any DMA and try and get HW into a good