Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
To: Tomeu Vizoso <tomeu@tomeuvizoso.net>, Oded Gabbay <ogabbay@kernel.org>
Cc: "Heiko Stuebner" <heiko@sntech.de>,
	"Jeff Hugo" <jeff.hugo@oss.qualcomm.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Philipp Stanner" <phasta@kernel.org>,
	"Midgy BALON" <midgy971@gmail.com>,
	"Jiaxing Hu" <gahing@gahingwoo.com>,
	dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
	stable@vger.kernel.org, "Arun Iyengar" <aiyengar1990@gmail.com>
Subject: [PATCH v2 3/4] accel/rocket: Stop the scheduler before releasing the IOMMU group
Date: Fri, 04 Dec 2026 06:35:06 +0000	[thread overview]
Message-ID: <20261204-rocket-fixes-v2-3-e9f9bb6f1304@gmail.com> (raw)
In-Reply-To: <20261204-rocket-fixes-v2-0-e9f9bb6f1304@gmail.com>

From: Arun Iyengar <aiyengar1990@gmail.com>

rocket_core_fini() disables runtime PM and drops the IOMMU group before
it stops the scheduler. A job that times out in between runs
rocket_reset(), which detaches a NULL group and drops a runtime PM
reference of a disabled device.

Stop the scheduler first.

Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
Cc: stable@vger.kernel.org
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
 drivers/accel/rocket/rocket_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/rocket/rocket_core.c b/drivers/accel/rocket/rocket_core.c
index d4c06ad4ba95..e51b64845a8b 100644
--- a/drivers/accel/rocket/rocket_core.c
+++ b/drivers/accel/rocket/rocket_core.c
@@ -100,11 +100,11 @@ int rocket_core_init(struct rocket_core *core)
 
 void rocket_core_fini(struct rocket_core *core)
 {
+	rocket_job_fini(core);
 	pm_runtime_dont_use_autosuspend(core->dev);
 	pm_runtime_disable(core->dev);
 	iommu_group_put(core->iommu_group);
 	core->iommu_group = NULL;
-	rocket_job_fini(core);
 }
 
 void rocket_core_reset(struct rocket_core *core)

-- 
2.55.0



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2026-12-04  6:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  6:35 [PATCH v2 0/4] accel/rocket: Fix teardown with a job on the NPU Arun Iyengar via B4 Relay
2026-12-04  6:35 ` [PATCH v2 1/4] accel/rocket: Wait for in-flight jobs before releasing the file's BOs Arun Iyengar via B4 Relay
2026-12-04  6:35 ` [PATCH v2 2/4] accel/rocket: Reset the core before detaching its IOMMU Arun Iyengar via B4 Relay
2026-12-04  6:35 ` Arun Iyengar via B4 Relay [this message]
2026-12-04  6:35 ` [PATCH v2 4/4] accel/rocket: Reset the core at unbind Arun Iyengar via B4 Relay

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=20261204-rocket-fixes-v2-3-e9f9bb6f1304@gmail.com \
    --to=devnull+aiyengar1990.gmail.com@kernel.org \
    --cc=aiyengar1990@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gahing@gahingwoo.com \
    --cc=heiko@sntech.de \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=midgy971@gmail.com \
    --cc=ogabbay@kernel.org \
    --cc=phasta@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tomeu@tomeuvizoso.net \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox