From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gloria.sntech.de ([95.129.55.99]:52442 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbeFRJis (ORCPT ); Mon, 18 Jun 2018 05:38:48 -0400 From: Heiko Stuebner To: Tomasz Figa Cc: dri-devel , "open list:ARM/Rockchip SoC..." , Ezequiel Garcia , Robin Murphy , marc.zyngier@arm.com, Jeffy , Sandy Huang , enric.balletbo@collabora.co.uk, Tomeu Vizoso , stable@vger.kernel.org Subject: Re: [PATCH v3 2/2] drm/rockchip: vop: fix irq disabled after vop driver probed Date: Mon, 18 Jun 2018 11:38:32 +0200 Message-ID: <84967793.QqIqAsAVEt@phil> In-Reply-To: References: <20180612121537.31223-1-heiko@sntech.de> <20180612121537.31223-3-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: stable-owner@vger.kernel.org List-ID: Am Montag, 18. Juni 2018, 10:44:58 CEST schrieb Tomasz Figa: > Hi Heiko, > > On Tue, Jun 12, 2018 at 9:15 PM Heiko Stuebner wrote: > > > > From: Sandy Huang > > > > The vop irq is shared between vop and iommu and irq probing in the > > iommu driver moved to the probe function recently. This can in some > > cases lead to a stall if the irq is triggered while the vop driver > > still has it disabled, but the vop irq handler gets called. > > > > But there is no real need to disable the irq, as the vop can simply > > also track its enabled state and ignore irqs in that case. > > For this we can simply check the power-domain state of the vop, > > similar to how the iommu driver does it. > > > > So remove the enable/disable handling and add appropriate condition > > to the irq handler. > > > > changes in v2: > > - move to just check the power-domain state > > - add clock handling > > changes in v3: > > - clarify comment to speak of runtime-pm not power-domain > [snip] > > @@ -1209,8 +1215,11 @@ static irqreturn_t vop_isr(int irq, void *data) > > spin_unlock(&vop->irq_lock); > > > > /* This is expected for vop iommu irqs, since the irq is shared */ > > - if (!active_irqs) > > - return IRQ_NONE; > > + if (!active_irqs) { > > + ret = IRQ_NONE; > > + vop_core_clks_disable(vop); > > nit: If we're adding "out:", couldn't we also add "out_clks:" and move > the call to vop_core_clks_disable() there? > > > + goto out; > > + } > > > > if (active_irqs & DSP_HOLD_VALID_INTR) { > > complete(&vop->dsp_hold_completion); > > @@ -1236,6 +1245,10 @@ static irqreturn_t vop_isr(int irq, void *data) > > DRM_DEV_ERROR(vop->dev, "Unknown VOP IRQs: %#02x\n", > > active_irqs); > > > > + vop_core_clks_disable(vop); > > + > > +out: > > + pm_runtime_put(vop->dev); > > return ret; > > } > > Other than that: > > Reviewed-by: Tomasz Figa That's similar to what Marc suggested and thus already part of v4 posted last tuesday, so I'll just carry over your Reviewed-by. Could you possibly also give patch1 a nod of approval? So I can honor the strong suggestion in the drm-misc documentation? ;-) Thanks Heiko