From c79ae7acb377c3d0be9c539a799a485d64a24918 Mon Sep 17 00:00:00 2001 From: Ashish Mhetre Date: Wed, 19 Feb 2025 17:24:37 +0000 Subject: [PATCH] [DOWNSTREAM] iommu/arm-smmu-v3: Retain prod and cons after resume Set PROD and CONS registers of VCMDQs with retained values from prod and cons variables after SC7 resume. Bug 5117507 Change-Id: Ida34bb04ce669fdc7901fa935e2a2eff806e3d1e Signed-off-by: Ashish Mhetre Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3447044 Reviewed-by: Pritesh Raithatha GVS: buildbot_gerritrpt --- drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c index f97dc8a8fae4..388a9b891fd9 100644 --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c @@ -396,6 +396,8 @@ static int tegra241_vcmdq_hw_init(struct tegra241_vcmdq *vcmdq) /* Configure and enable VCMDQ */ writel_relaxed(upper_32_bits(vcmdq->cmdq.q.q_base), REG_VCMDQ_PAGE1(vcmdq, BASE_H)); writel_relaxed(lower_32_bits(vcmdq->cmdq.q.q_base), REG_VCMDQ_PAGE1(vcmdq, BASE)); + writel_relaxed(vcmdq->cmdq.q.llq.prod, REG_VCMDQ_PAGE0(vcmdq, PROD)); + writel_relaxed(vcmdq->cmdq.q.llq.cons, REG_VCMDQ_PAGE0(vcmdq, CONS)); ret = vcmdq_write_config(vcmdq, VCMDQ_EN); if (ret) {