From patchwork Tue Dec 15 02:45:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zev Weiss X-Patchwork-Id: 11973587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F532C2BB40 for ; Tue, 15 Dec 2020 02:47:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DA27207A2 for ; Tue, 15 Dec 2020 02:47:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DA27207A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bewilderbeest.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ojCdaYZ2KcJ5CkMaqzQl19L2qqhAN40FNZYGp6EagWY=; b=SRSsYvyHx8REirmW3TUm5bxlR m/BszzUsIIlTC+g1cdI15W18ZtjTtz0+8m5AiNnKdrAVgmHDhsVy0yJNNR6neH5Y7D0pQGGeaFcMk EbB/p0NT95oQCbeJ2fLOtfOwcWf97X8BTP4SpSV5ZfKSjr+eruiaA/Yw06AH9ozTWjbhLK425Y1GB kz5CJyz2YSiVKB+76KhrYdQtyldBzrdOMhmIyb3D6t5MKuFD0brbCYU+8YPGwmrlxjyNFeguM0okG YduzandB4lOxZpzgIW3DMTLdj4qlcBHhXOjUbENLdZvb52+Vg9+Skm1kEDbhOX1bKkdEK8l5l+vaL XMs0dg3Yw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp0Lz-0003s9-As; Tue, 15 Dec 2020 02:46:19 +0000 Received: from thorn.bewilderbeest.net ([2605:2700:0:5::4713:9cab]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp0Lo-0003pn-0c for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 02:46:11 +0000 Received: from hatter.bewilderbeest.net (unknown [IPv6:2600:6c44:7f:ba20:1c66:ab2d:5a3:5a9e]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 6D3E5806F8; Mon, 14 Dec 2020 18:46:00 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 thorn.bewilderbeest.net 6D3E5806F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1608000361; bh=xR8CLmhYhW7l9AVRInyVC7PTJeDKCJBNFlHVTPgUQAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PgdqqfbXNy4kDvfuNujcew/oE4ykMgotbUQZD640u/xW+xSgkjvUrhwSy2IFYIAw5 n26ZJP8lr5i/iRccf0ndGIWxFaV62XCB2xKQ0La7ICWRgPBR+Z6MLlLSW8xuzXdBBR eB3gNUYRsk91y4I4wyVfGtIY7sjP7rVJIxJC2JIQ= From: Zev Weiss To: Eddie James , Mauro Carvalho Chehab , Joel Stanley , Andrew Jeffery , linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] aspeed-video: add error message for unhandled interrupts Date: Mon, 14 Dec 2020 20:45:40 -0600 Message-Id: <20201215024542.18888-2-zev@bewilderbeest.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201215024542.18888-1-zev@bewilderbeest.net> References: <20201215024542.18888-1-zev@bewilderbeest.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201214_214608_439692_B94015B4 X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jae Hyun Yoo , Zev Weiss Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This device seems to have a propensity for asserting interrupts that aren't enabled -- in addition to the CAPTURE_COMPLETE and FRAME_COMPLETE interrupts squashed in commit 65d270acb2d662c3346793663ac3a759eb4491b8, COMP_READY has also been observed. Adding a message diagnosing what happened in the event of unhandled interrupt status bits should hopefully make the debugging process simpler for any others that pop up in the future. Signed-off-by: Zev Weiss --- drivers/media/platform/aspeed-video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c index 7d98db1d9b52..eb02043532e3 100644 --- a/drivers/media/platform/aspeed-video.c +++ b/drivers/media/platform/aspeed-video.c @@ -562,6 +562,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg) { struct aspeed_video *video = arg; u32 sts = aspeed_video_read(video, VE_INTERRUPT_STATUS); + u32 orig_sts = sts; /* * Resolution changed or signal was lost; reset the engine and @@ -639,6 +640,10 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg) if (sts & VE_INTERRUPT_FRAME_COMPLETE) sts &= ~VE_INTERRUPT_FRAME_COMPLETE; + if (sts) + dev_err_ratelimited(video->dev, "unexpected interrupt asserted:" + " sts=%08x, orig_sts=%08x", sts, orig_sts); + return sts ? IRQ_NONE : IRQ_HANDLED; }