From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48A24C43217 for ; Thu, 10 Nov 2022 09:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiKJJ6B (ORCPT ); Thu, 10 Nov 2022 04:58:01 -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 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 2AA9WgmQ047730 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) 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 base-commit: aae703b02f92bde9264366c545e87cec451de471 prerequisite-patch-id: bf47e8ab2998acfbc32be5a4b7b5ae8a3ae4218b prerequisite-patch-id: bf82715983e08f2e810ff1a82ce644f5f9006cd9 prerequisite-patch-id: 28a2040ef0235e5765f05d2fc5529bce2a0f4c6f prerequisite-patch-id: 7e761c779730536db8baf50db5fc8caf058e95af prerequisite-patch-id: c48ea20973fa35938a7d33a0e20d2900df48755f -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F11F5C43217 for ; Thu, 10 Nov 2022 12:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9xKFfuiZ3X/yoz0nZNguE7dec0R/OqLoL3hHZGIhoqQ=; b=apUDGrONtrZTGP pPW1ZOV6zASDCd2zhfw6Ux9xM0HK5Sb/W53tuwKIBHNrXUMWUNdEm5sjBoeMbeT2ege5ezWu0Qwqx mmoJlyPk5qBRkEGMdO7535X6rZ1s3rUyaqfUAQzEuo09QYsiQAhb1Jvly7pXK1Qz5JNA/jrJ9TtSa FhYZQooMI67qXX+qKgLauI+JY7luzJRmmt6GcqbLl7dNjOFWHoaRqqfIJIFnOIHFNE75gkWg/6oW9 vqa0NrZvvCoFs8hUM5kRSVpkDOBYVROVt1n4OqzN0qDjDY9jSDCz8+fbhbq+JQxqDEHLCZHuGsYMH BHevbHrrB6kAzQwnFcuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot6Dj-005b2v-Fu; Thu, 10 Nov 2022 11:59:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot69N-005Yqg-Ai for linux-arm-kernel@bombadil.infradead.org; Thu, 10 Nov 2022 11:55:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:In-Reply-To:References; bh=SYfYybO/ZYg8cB3R70nKb1KbW9lYP3NioYaAIxICW1o=; b=m/Fm05NW31WL5nYhQgWw0wCEZm bItTIOmt52w9wIO0Fw+uxly+2EYvdrd3Js24E53djGiRGcfrcTUNXwk7pAVcPUOfaPaj1/t+fsmXs 4hQWBbuu585xj9NxFqcjBHaQI3Uu1G1AOmHNrfb7TI5a+rhzT4qK6+Ko3h9h2Uthb7NrF+EkpeYLy 7ru+76h5AZV0R1+C4EqhrvumVmdEuTfCC6OLz8L9tdsNQnHg56DxUdnAjygMum4EZ5rQUQhQ/clpn JvIksrO6jta7qsAAxhP/bo51FnQ66HZsOHYdvTwCQToceYKi9rP+L0NvECbmpZ5K/dujqN/+lJiFn Xj12eJYQ==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot4Je-00BxkM-Ki for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 09:57:49 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_095747_202803_4A1105C4 X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-) 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 base-commit: aae703b02f92bde9264366c545e87cec451de471 prerequisite-patch-id: bf47e8ab2998acfbc32be5a4b7b5ae8a3ae4218b prerequisite-patch-id: bf82715983e08f2e810ff1a82ce644f5f9006cd9 prerequisite-patch-id: 28a2040ef0235e5765f05d2fc5529bce2a0f4c6f prerequisite-patch-id: 7e761c779730536db8baf50db5fc8caf058e95af prerequisite-patch-id: c48ea20973fa35938a7d33a0e20d2900df48755f -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel