stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mehdi Djait <mehdi.djait@linux.intel.com>
To: michael.riesch@collabora.com
Cc: linux-media@vger.kernel.org, paul.elder@ideasonboard.com,
	daniel@makrotopia.org, linux-rockchip@lists.infradead.org,
	Mehdi Djait <mehdi.djait@linux.intel.com>,
	stable@vger.kernel.org
Subject: [PATCH v1 1/2] media: rockchip: rkcif: Don't reset the hardware in runtime suspend
Date: Thu, 12 Nov 2026 19:32:07 +0100	[thread overview]
Message-ID: <20261112183208.2688580-2-mehdi.djait@linux.intel.com> (raw)
In-Reply-To: <20261112183208.2688580-1-mehdi.djait@linux.intel.com>

The reset in the runtime suspend also resets the VICAP IOMMU.

When the IOMMU driver accesses the IOMMU registers inside the delay window
between the assert and deassert, e.g. in rk_iommu_zap_lines() to shootdown
IOTLB entries, the system hangs.

Drop the reset and the now unused reset control.

Fixes: f53fb31a3889 ("media: rockchip: add driver for the rockchip camera interface")
Cc: stable@vger.kernel.org
Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com>
---
 .../media/platform/rockchip/rkcif/rkcif-common.h  |  1 -
 drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 15 ---------------
 2 files changed, 16 deletions(-)

diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-common.h b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
index 4d9211ba9bda..38208e8b7b2d 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-common.h
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
@@ -237,7 +237,6 @@ struct rkcif_device {
 	struct clk_bulk_data clks[RKCIF_CLK_MAX];
 	unsigned int clks_num;
 	struct regmap *grf;
-	struct reset_control *reset;
 	void __iomem *base_addr;
 
 	struct rkcif_interface interfaces[RKCIF_IF_MAX];
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-dev.c b/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
index be3a174b9aab..dceabee2ecd6 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
@@ -10,7 +10,6 @@
  */
 
 #include <linux/clk.h>
-#include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
@@ -18,7 +17,6 @@
 #include <linux/of_graph.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
-#include <linux/reset.h>
 
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-mc.h>
@@ -201,10 +199,6 @@ static int rkcif_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "failed to get clocks\n");
 
-	rkcif->reset = devm_reset_control_array_get_exclusive(dev);
-	if (IS_ERR(rkcif->reset))
-		return PTR_ERR(rkcif->reset);
-
 	rkcif->grf = syscon_regmap_lookup_by_phandle(dev->of_node,
 						     "rockchip,grf");
 	if (IS_ERR(rkcif->grf))
@@ -273,15 +267,6 @@ static int rkcif_runtime_suspend(struct device *dev)
 {
 	struct rkcif_device *rkcif = dev_get_drvdata(dev);
 
-	/*
-	 * Reset CIF (CRU, DMA, FIFOs) to allow a clean resume.
-	 * Since this resets the IOMMU too, we cannot issue this reset when
-	 * resuming.
-	 */
-	reset_control_assert(rkcif->reset);
-	udelay(5);
-	reset_control_deassert(rkcif->reset);
-
 	clk_bulk_disable_unprepare(rkcif->clks_num, rkcif->clks);
 
 	return 0;
-- 
2.56.0


       reply	other threads:[~2026-11-12 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261112183208.2688580-1-mehdi.djait@linux.intel.com>
2026-11-12 18:32 ` Mehdi Djait [this message]
2026-11-16 10:58   ` [PATCH v1 1/2] media: rockchip: rkcif: Don't reset the hardware in runtime suspend Michael Riesch
2026-11-16 14:30     ` Mehdi Djait
2026-11-17  9:09       ` Mehdi Djait

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=20261112183208.2688580-2-mehdi.djait@linux.intel.com \
    --to=mehdi.djait@linux.intel.com \
    --cc=daniel@makrotopia.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@collabora.com \
    --cc=paul.elder@ideasonboard.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).