[PATCH v1 1/2] media: rockchip: rkcif: Don't reset the hardware in runtime suspend

Michael Riesch michael.riesch at collabora.com
Mon Nov 16 02:58:35 PST 2026


Hi Mehdi,

On 11/12/26 19:32, Mehdi Djait wrote:
> 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.

I agree that the current situation is nothing more than a crude hack
that happened to work in most cases. But I doubt simply removing the
reset is the correct solution. Recently, I saw some downstream patch
that makes the reset a shared one, which seems like the right thing to
do here. What would you think about that?

Best regards,
Michael

> 
> Fixes: f53fb31a3889 ("media: rockchip: add driver for the rockchip camera interface")
> Cc: stable at vger.kernel.org
> Signed-off-by: Mehdi Djait <mehdi.djait at 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;




More information about the Linux-rockchip mailing list