From baaad0796d1aa83c1d9486d6c127f362ba0689d8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 22 Jan 2024 12:02:50 -0800 Subject: [PATCH] 5.10-stable patches added patches: iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch --- ...add-missing-gmu-entry-to-match-table.patch | 40 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-5.10/iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch diff --git a/queue-5.10/iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch b/queue-5.10/iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch new file mode 100644 index 00000000000..0d0fde57821 --- /dev/null +++ b/queue-5.10/iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch @@ -0,0 +1,40 @@ +From afc95681c3068956fed1241a1ff1612c066c75ac Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Sun, 10 Dec 2023 10:06:53 -0800 +Subject: iommu/arm-smmu-qcom: Add missing GMU entry to match table + +From: Rob Clark + +commit afc95681c3068956fed1241a1ff1612c066c75ac upstream. + +In some cases the firmware expects cbndx 1 to be assigned to the GMU, +so we also want the default domain for the GMU to be an identy domain. +This way 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 later 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. + +Cc: stable@vger.kernel.org +Signed-off-by: Rob Clark +Tested-by: Johan Hovold +Reviewed-by: Robin Murphy +Link: https://lore.kernel.org/r/20231210180655.75542-1-robdclark@gmail.com +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c ++++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +@@ -21,6 +21,7 @@ static struct qcom_smmu *to_qcom_smmu(st + + 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" }, diff --git a/queue-5.10/series b/queue-5.10/series index 3ff7bab5dd2..e0e26372eb7 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -224,3 +224,4 @@ pwm-jz4740-don-t-use-dev_err_probe-in-.request.patch io_uring-rw-ensure-io-bytes_done-is-always-initialized.patch rootfs-fix-support-for-rootfstype-when-root-is-given.patch bluetooth-fix-atomicity-violation-in-min-max-_key_size_set.patch +iommu-arm-smmu-qcom-add-missing-gmu-entry-to-match-table.patch -- 2.47.3