From patchwork Thu Dec 7 21:24:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 13484396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F40F8C4167B for ; Thu, 7 Dec 2023 21:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9Ly6RG4N7ehmG9vm3eY+rUYCYC5eH63VhNAm4fmx0PI=; b=nh+p3vbpw6R/kS SItBOln0QRK7FeM/jwu51RErjbyiDmbOs2KJI4Voso/NiJv056cT5lJAap31gsNZbV/V95aPwxpvS b0HvW7G7tsdTqWcvfI7lrTm60tGRBqa182W/+ZPKJhufFPFn4csy1Im8yRBIVwDOfO/raFyyPJcrX /UT8D5uyeMnFzYn5IfG7/E3MB898JfYw49LtlNlCGkdajBIGeH7Yq+v2VjnFwJVwbO+STzYLXlWGw URsT3qnzKpp86O84Ofo+b07SdpLSnpcrSN6dtKzcM8Jz9uYmUoa2S3HynSluW5T/i4WmvNDzyovdM YecWsZg0L+YZXFf24Yrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBLts-00DzhE-2K; Thu, 07 Dec 2023 21:27:16 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBLtp-00Dze2-34 for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 21:27:15 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5c210e34088so1134391a12.2 for ; Thu, 07 Dec 2023 13:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701984427; x=1702589227; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Px2TdaotpIYQ6sIN9yY8qaT1+HH5T+pH93w2l1LXKbY=; b=RJQCgnVOi3kqGLrfG/lsWJdy1ds4OUkxDhHdO5vQDchV7UcXXvmQ9tNNitwbs798PX mH2dknZZvcltDDr2UAyuVPeHtnJge4OA2Z+qBFGRfpnMC+CEeFfqpto1krMEjG8NzW9A ciLY6rvI1ZvQCqyt+BzzGn5HguicsZ4FTwBa/wmFT5fIGSd40x5U1p/f5J1mc+ofU7Cs THGm/+041H1t14jIFR8SWceqT6iZMMD3TFWRFNEiJtmaY/jE+KH104kuHxy/fmbFmys0 z6q6N2wuBdUvKy7oDbK2uY5WRWsWAZN9rPTorqJP+OIJXIafWvp5ki8EoXaonuU2wd+4 DKbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701984427; x=1702589227; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Px2TdaotpIYQ6sIN9yY8qaT1+HH5T+pH93w2l1LXKbY=; b=W/XUWZ4t7QNjUdsxs0073/ckEt1j4+cQAg81DHsr3/2yaLm23XeTiVcb+il/nyjoip vl8vQglPCm6+JIgedM/PPFL8+AVvn7tYP0vujxu67bJKfv+yiWQnC8iWg8g8wzQK3f/8 giYKqGIwDafXxo/PMrc6b0sH7ymY10eXPjRIQ6kTFy41/TrgAx5blstrK1SaI9GkRd/m +ebDqEd5UaULeEX0qM9ato9Z5XbjgcOM0aLdpfYV9NkIGbvgxnEk//gRBc90Uy8q1i4K Xo1sYmjH7ZYiC8eEaXgdWd0wN1yAThfHXy+ld56itJX2PYVT5moagRe5AwY8W1tN8ANs hjWA== X-Gm-Message-State: AOJu0YzSLLuvYlbLP/az7OOzTrFrK3xZkDguoQvBLrZFh/Cnu1jCQ+Zq 9Y61R3dwVfXP/3apB8CJNIo= X-Google-Smtp-Source: AGHT+IHmgFAdaNpu9/4tm5vsxNdq2+tiP4Ccd9SFpbqI/bLYNy2EA7+7YCXFBASFrF7Nf+u/eTyJbg== X-Received: by 2002:a05:6a20:12ca:b0:187:df72:48ef with SMTP id v10-20020a056a2012ca00b00187df7248efmr3188889pzg.0.1701984426614; Thu, 07 Dec 2023 13:27:06 -0800 (PST) Received: from localhost ([100.84.200.15]) by smtp.gmail.com with ESMTPSA id q19-20020a056a00151300b006cdcfd814e9sm241008pfu.147.2023.12.07.13.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:27:05 -0800 (PST) From: Rob Clark To: iommu@lists.linux-foundation.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Will Deacon , Robin Murphy , Joerg Roedel , Konrad Dybcio , Dmitry Baryshkov , Bjorn Andersson , Elliot Berman , Richard Acayan , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org (moderated list:ARM SMMU DRIVERS), iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] iommu/arm-smmu-qcom: Add missing GMU entry to match table Date: Thu, 7 Dec 2023 13:24:39 -0800 Message-ID: <20231207212441.6199-1-robdclark@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231207_132713_987451_8BFD0357 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rob Clark We also want the default domain for the GMU to be an identy domain, so it does not get a context bank assigned. Without this, both of_dma_configure() and drm/msm's iommu_domain_attach() will trigger allocating and configuring a context bank. So GMU ends up attached to both cbndx 1 and cbndx 2. This arrangement seemingly confounds and surprises the firmware if the GPU later triggers a translation fault, resulting (on sc8280xp / lenovo x13s, at least) in the SMMU getting wedged and the GPU stuck without memory access. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index 549ae4dba3a6..d326fa230b96 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -243,6 +243,7 @@ static int qcom_adreno_smmu_init_context(struct arm_smmu_domain *smmu_domain, static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = { { .compatible = "qcom,adreno" }, + { .compatible = "qcom,adreno-gmu" }, { .compatible = "qcom,mdp4" }, { .compatible = "qcom,mdss" }, { .compatible = "qcom,sc7180-mdss" },