From: Tomasz Figa <tfiga@chromium.org> To: "Heiko Stübner" <heiko@sntech.de> Cc: dri-devel <dri-devel@lists.freedesktop.org>, "open list:ARM/Rockchip SoC..." <linux-rockchip@lists.infradead.org>, Ezequiel Garcia <ezequiel@collabora.com>, Robin Murphy <robin.murphy@arm.com>, marc.zyngier@arm.com, Jeffy <jeffy.chen@rock-chips.com>, Sandy Huang <hjc@rock-chips.com>, enric.balletbo@collabora.co.uk, Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>, 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 17:44:58 +0900 [thread overview] Message-ID: <CAAFQd5D77W8qQm9YmOtr_bpD7WpA9VokjQ+jvTo05F4BFdyrTw@mail.gmail.com> (raw) In-Reply-To: <20180612121537.31223-3-heiko@sntech.de> Hi Heiko, On Tue, Jun 12, 2018 at 9:15 PM Heiko Stuebner <heiko@sntech.de> wrote: > > From: Sandy Huang <hjc@rock-chips.com> > > 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 <tfiga@chromium.org> Best regards, Tomasz
WARNING: multiple messages have this Message-ID (diff)
From: Tomasz Figa <tfiga@chromium.org> To: "Heiko Stübner" <heiko@sntech.de> Cc: marc.zyngier@arm.com, Robin Murphy <robin.murphy@arm.com>, Jeffy <jeffy.chen@rock-chips.com>, dri-devel <dri-devel@lists.freedesktop.org>, Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>, "open list:ARM/Rockchip SoC..." <linux-rockchip@lists.infradead.org>, enric.balletbo@collabora.co.uk, stable@vger.kernel.org, Ezequiel Garcia <ezequiel@collabora.com> Subject: Re: [PATCH v3 2/2] drm/rockchip: vop: fix irq disabled after vop driver probed Date: Mon, 18 Jun 2018 17:44:58 +0900 [thread overview] Message-ID: <CAAFQd5D77W8qQm9YmOtr_bpD7WpA9VokjQ+jvTo05F4BFdyrTw@mail.gmail.com> (raw) In-Reply-To: <20180612121537.31223-3-heiko@sntech.de> Hi Heiko, On Tue, Jun 12, 2018 at 9:15 PM Heiko Stuebner <heiko@sntech.de> wrote: > > From: Sandy Huang <hjc@rock-chips.com> > > 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 <tfiga@chromium.org> Best regards, Tomasz _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-06-18 8:45 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-12 12:15 [PATCH v3 0/2] drm/rockchip: try to fix vblank hang resulting from iommu irq change Heiko Stuebner 2018-06-12 12:15 ` [PATCH v3 1/2] drm/rockchip: vop: split out core clock enablement into separate functions Heiko Stuebner 2018-06-12 12:15 ` Heiko Stuebner 2018-06-12 12:15 ` [PATCH v3 2/2] drm/rockchip: vop: fix irq disabled after vop driver probed Heiko Stuebner 2018-06-12 12:15 ` Heiko Stuebner 2018-06-12 12:39 ` Marc Zyngier 2018-06-12 13:12 ` Heiko Stuebner 2018-06-12 13:12 ` Heiko Stuebner 2018-06-12 12:50 ` JeffyChen 2018-06-12 12:50 ` JeffyChen 2018-06-18 8:44 ` Tomasz Figa [this message] 2018-06-18 8:44 ` Tomasz Figa 2018-06-18 9:38 ` Heiko Stuebner 2018-06-18 9:38 ` Heiko Stuebner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAAFQd5D77W8qQm9YmOtr_bpD7WpA9VokjQ+jvTo05F4BFdyrTw@mail.gmail.com \ --to=tfiga@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=enric.balletbo@collabora.co.uk \ --cc=ezequiel@collabora.com \ --cc=heiko@sntech.de \ --cc=hjc@rock-chips.com \ --cc=jeffy.chen@rock-chips.com \ --cc=linux-rockchip@lists.infradead.org \ --cc=marc.zyngier@arm.com \ --cc=robin.murphy@arm.com \ --cc=stable@vger.kernel.org \ --cc=tomeu.vizoso@collabora.co.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.