From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796110090; b=nXYA26r7T+1Q1FBd+fVBqtMhhBJjumLB0JWittRj2P6VFjSLgUuTxZVpWAAZAW1WFx3Y uQC+ILkaO8A4rzbDWCPClntbUuspPLYokRBc8TDukkO+/yWAx+/atTQR9D2bI7Z5P18Vj XSTu4IoJ6nL62ggmPcztObmE2pfjp8mkqB+92U/beuD+kcoYPvq89Y/7MZztAisv/zN4K qIx3M9eTlC/Q7M5LKzSq1dAb+y6TnzIa6Q8q9RPJySmgDpIgjWNl0pecmjIWLhIDNdXwy dshKpyGjrTeRLigbRYqYdAMu5Vjdkn56RC7QxLcWSzL3aCrDuz5qLKlbWkF90IC4tOg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796110090; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=8eu4Xxg2uiRNfPHchFriRqyRr13m3xhmXKPCzVRg5K0=; b=xd30Xl6zJHvEX+rDubp/uCWeftd4h84Ij/xmNLAuc+mSqPANgtcYNKYxT3Lzdp/m4JFj L8PyPP09uyJ8izJEGTMwi+EYLwTHsFl/vc1A7W80Lk4lFaFEmpYRH5ZzGI+mKqlyEY3n/ QRvVnEU7fiasEKhd3qQO0y5JvIUve7jm/g+O+doGsdPkqjkTIt+KGN+glZAjHOKRLzpa0 1ZL50cRR8k3AFV8EE4KbEoEmoKVdCbYwlb0N70J/Mj/IU6Opr0842WvmjtHJY+ypXcchn WywMcFCsgF/zATRNVLVa3n/2XF0crxc9n0cJg2fhfi41KbqVtQ66JRffjbOhndmU0tw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q+cpd0M8; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07C55606A33B; Tue, 1 Dec 2026 07:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q+cpd0M8 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796110089; b=VM/vT9KYfOoLWpbN6inLucBVSqV0LiK8ja5LkfMjfaVdET79UiBGkUXv/iVRqMxAVFoY bUMAmi+esF7mG+e25vooPlVrio7GlDeptM/SZcbIuy0UtxdmTBR4lRQjVn6eDBVydzOhK 3BZyU/AZZjepkmS4f7PmXQ/SUU4teZcL9JH4PAJ+zEoem1re5A5hLAeDcW/ZL8jTaJlMC f5uEDNGlH/iA8ySENkKiuNfxptJPqYqzVykf6o/iShu1NUr9qI5V0guEUkGgaPWSmjIBY 6ZDjEaWusbH+RI01lBrT9Pd5PQF9A328WgrynnYwYLGPEzpLxajm0iu0/bLe1h7MYBQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796110089; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=8eu4Xxg2uiRNfPHchFriRqyRr13m3xhmXKPCzVRg5K0=; b=QPTEYBAXO1SW7tvmdTQoeo//RAoB/DqseXwmbaq5HJqPg9YHumxJrQlOyLB/dbWUv5Ll iGKk/jRDi3JwoV9eWgXMx6WrqYadMkh2ibvecaER2pWkOD3+WmdyrQYjKtay2NnK6kXXe 0hLwG4mKZOBPRM/rH6kdK401XFnHF5VdmcsT6uZUVFjc3zy4a+QNPxqNPoutdIYerXYUE 0XFxAUCP29boVuj1eZ9dgAz6dm30JBH7UFHPgHiPo0j7fPccZjPnEsOcFqVE5Gz2stgW4 4Huyj0CsAk/3sm9Na7bMzGWwDK866mdPejOXH9CMDZcHt4UZK+xBuxFfB6wYGtIohGA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0CB361F0089A; Tue, 1 Dec 2026 07:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796110089; bh=8eu4Xxg2uiRNfPHchFriRqyRr13m3xhmXKPCzVRg5K0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=Q+cpd0M83E8y4NhWSJ5IqbAodfs3VVTbgtSZhFhOkrB44D7rKxnpILictaB8943MW 3JuYUaT3U447JJ/pHjUx6pnFUGrZG+Fkn9fCzJ8294peotkD5vTrNkxsCRj8HfTzM9 Dg1a5A1qxlR5yavwr7rmfNivFnm97T2eq6vpAT08OMXOuW1xBA6bdHi/W5q0SlIuOY jVIeb7wRnKwkpmUTmktTPSBQSvZsdVBpirwEHWY9CCZ/BjilOFWfWUPm/vXHqPJINg kLX/IL5C/EnpMvjhI0WuQtzafHG4iC3K6cNKOkRAiJ/MywrqLeLOdCdazdTCpmhAG5 6/fQT1Y17G2QA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 868CB4EC41; Tue, 1 Dec 2026 07:28:08 +0000 (UTC) From: Arun Iyengar via B4 Relay Date: Tue, 01 Dec 2026 07:28:09 +0000 Subject: [PATCH 2/2] accel/rocket: Reset the core before detaching its IOMMU X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261201-rocket-fixes-v1-2-986c3e5ceb44@gmail.com> References: <20261201-rocket-fixes-v1-0-986c3e5ceb44@gmail.com> In-Reply-To: <20261201-rocket-fixes-v1-0-986c3e5ceb44@gmail.com> To: Tomeu Vizoso , Oded Gabbay Cc: Heiko Stuebner , Jeff Hugo , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Philipp Stanner , Midgy BALON , Jiaxing Hu , 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 X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796110087; l=1605; i=aiyengar1990@gmail.com; s=20261110; h=from:subject:message-id; bh=vjCh/lz8Uv74AztS1spIjefsawlLtWQrhTkv0ZshJKs=; b=x6bTvOT5LRygLIKbuDGH0hsJIAMs3EMNWBaJqrXUahVT/CbYEBF6ChUoXjQIrWToixFxp5a6K E6HPvqMwtDND3oM1QKjPBs4Bth/vzb4VK/W+oc6hzjX7zZue+VUAHGX X-Developer-Key: i=aiyengar1990@gmail.com; a=ed25519; pk=zXpRgUTrhaFe6jLyPqbBy3ccfkj04w0g2690Wv3mg+0= X-Endpoint-Received: by B4 Relay for aiyengar1990@gmail.com/20261110 with auth_id=1480 X-Original-From: Arun Iyengar Reply-To: aiyengar1990@gmail.com Content-Transfer-Encoding: 7bit From: Arun Iyengar Midgy Balon posted the same change in an RK3568 RFC series [1]. A timed-out job leaves the NPU master hung on the bus. The IOMMU then cannot enter stall mode, the detach fails and the IOMMU core warns: rk_iommu fdab9000.iommu: Enable stall request timed out, status: 0x0001cb WARNING: drivers/iommu/iommu.c:157 at __iommu_group_set_core_domain+0x5c/0x98 Reset the core first, as the vendor driver does. Link: https://lore.kernel.org/r/20260613070116.438906-5-midgy971@gmail.com [1] Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL") Cc: stable@vger.kernel.org Cc: Midgy BALON Signed-off-by: Arun Iyengar --- drivers/accel/rocket/rocket_job.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c index 32926afb0144..8bc0b80d9190 100644 --- a/drivers/accel/rocket/rocket_job.c +++ b/drivers/accel/rocket/rocket_job.c @@ -427,15 +427,17 @@ rocket_reset(struct rocket_core *core, struct drm_sched_job *bad) */ scoped_guard(mutex, &core->job_lock) { put_job_ref = core->in_flight_job; - - iommu_detach_group(NULL, core->iommu_group); - core->in_flight_job = NULL; } - /* Proceed with reset now. */ + /* + * Reset before detaching: the IOMMU cannot stall while a hung job + * keeps the bus busy, and then the detach fails. + */ rocket_core_reset(core); + iommu_detach_group(NULL, core->iommu_group); + if (put_job_ref) pm_runtime_put_autosuspend(core->dev); -- 2.55.0