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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 95742C433E0 for ; Wed, 23 Dec 2020 03:55:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 DE868224D4 for ; Wed, 23 Dec 2020 03:55:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE868224D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bewilderbeest.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4D0zrq5cN5zDqB3 for ; Wed, 23 Dec 2020 14:55:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=bewilderbeest.net (client-ip=2605:2700:0:5::4713:9cab; helo=thorn.bewilderbeest.net; envelope-from=zev@bewilderbeest.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=bewilderbeest.net Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=bewilderbeest.net header.i=@bewilderbeest.net header.a=rsa-sha256 header.s=thorn header.b=EuqG2WVF; dkim-atps=neutral Received: from thorn.bewilderbeest.net (thorn.bewilderbeest.net [IPv6:2605:2700:0:5::4713:9cab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4D0zpm1XbqzDqSk; Wed, 23 Dec 2020 14:54:06 +1100 (AEDT) Received: from hatter.bewilderbeest.net (unknown [IPv6:2600:6c44:7f:ba20:1c66:ab2d:5a3:5a9e]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id B2D99806F7; Tue, 22 Dec 2020 19:53:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 thorn.bewilderbeest.net B2D99806F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1608695639; bh=UkEGylhrdt8z9hX+GY1d6wW/RLqoqo23ET3G6KBW12A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EuqG2WVFsZMIebMeVg+hIzhIuIBAWpjuaouck7qEvF+MZ4Knw2bS2SxoWuw+Gf2pF Lpc901GW0brm5cmwHVKXs+GqZuK+BLqwsmWLZ0EVI7umLbp5Vl6x5e4oRCIpjSposk NYe/dao6uzh8gknvwxu/Bo3+7Lx1mioJfQ4hVIBo= Date: Tue, 22 Dec 2020 21:53:53 -0600 From: Zev Weiss To: Ryan Chen Subject: Re: [PATCH 2/3] aspeed-video: clear spurious interrupt bits unconditionally Message-ID: <20201223035353.omn5ebut62sb7mxh@hatter.bewilderbeest.net> References: <20201215024542.18888-1-zev@bewilderbeest.net> <20201215024542.18888-3-zev@bewilderbeest.net> <20201222191433.3dgnfwyrod4tnvaf@hatter.bewilderbeest.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jae Hyun Yoo , linux-aspeed , Andrew Jeffery , OpenBMC Maillist , Eddie James , Linux Kernel Mailing List , Mauro Carvalho Chehab , Linux ARM , "linux-media@vger.kernel.org" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Tue, Dec 22, 2020 at 08:53:33PM CST, Ryan Chen wrote: >> -----Original Message----- >> From: Joel Stanley >> Sent: Wednesday, December 23, 2020 9:07 AM >> To: Zev Weiss ; Ryan Chen >> >> Cc: Eddie James ; Mauro Carvalho Chehab >> ; Andrew Jeffery ; >> linux-media@vger.kernel.org; OpenBMC Maillist ; >> Linux ARM ; linux-aspeed >> ; Linux Kernel Mailing List >> ; Jae Hyun Yoo >> Subject: Re: [PATCH 2/3] aspeed-video: clear spurious interrupt bits >> unconditionally >> >> On Tue, 22 Dec 2020 at 19:14, Zev Weiss wrote: >> > >> > On Mon, Dec 21, 2020 at 10:47:37PM CST, Joel Stanley wrote: >> > >On Tue, 15 Dec 2020 at 02:46, Zev Weiss wrote: >> > >> >> > >> Instead of testing and conditionally clearing them one by one, we >> > >> can instead just unconditionally clear them all at once. >> > >> >> > >> Signed-off-by: Zev Weiss >> > > >> > >I had a poke at the assembly and it looks like GCC is clearing the >> > >bits unconditionally anyway, so removing the tests provides no change. >> > > >> > >Combining them is a good further optimization. >> > > >> > >Reviewed-by: Joel Stanley >> > > >> > >A question unrelated to this patch: Do you know why the driver >> > >doesn't clear the status bits in the interrupt handler? I would >> > >expect it to write the value of sts back to the register to ack the >> > >pending interrupt. >> > > >> > >> > No, I don't, and I was sort of wondering the same thing actually -- >> > I'm not deeply familiar with this hardware or driver though, so I was >> > a bit hesitant to start messing with things. (Though maybe doing so >> > would address the "stickiness" aspect when it does manifest.) Perhaps >> > Eddie or Jae can shed some light here? >> >> I think you're onto something here - this would be why the status bits seem to >> stick until the device is reset. >> >> Until Aspeed can clarify if this is a hardware or software issue, I suggest we ack >> the bits and log a message when we see them, instead of always ignoring them >> without taking any action. >> >> Can you write a patch that changes the interrupt handler to ack status bits as it >> handles each of them? >> >Hello Zev, before the patch, do you met issue with irq handler? [continuous incoming?] > >In aspeed_video_irq handler should only handle enable interrupt expected. > u32 sts = aspeed_video_read(video, VE_INTERRUPT_STATUS); > + sts &= aspeed_video_read(video, VE_INTERRUPT_CTRL); > >Ryan > Hi Ryan, Prior to any of these patches I encountered a problem pretty much exactly like what Jae described in his commit message in 65d270acb2d (but the kernel I was running included that patch). Adding the diagnostic in patch #1 of this series showed that it was apparently the same problem, just with a different interrupt that Jae's patch didn't include. From what you wrote above, I gather that it is in fact expected for the hardware to assert interrupts that aren't enabled in VE_INTERRUPT_CTRL? If so, I guess something like that would obviate the need for both Jae's earlier patch and this whole series. I think the question Joel raised is somewhat independent though -- if the VE_INTERRUPT_STATUS register asserts interrupts we're not actually using, should the driver acknowledge them anyway or just leave them alone? (Though if we're just going to ignore them anyway maybe it doesn't ultimately matter very much.) Zev