Hi Robin,
On 2020-04-16 19:28, Robin Murphy wrote:
On 2020-01-22 11:48 am, Sai Prakash Ranjan wrote:
From: Jordan Crouse <jcrouse@xxxxxxxxxxxxxx>
Some client devices want to directly map the IOMMU themselves instead
of using the DMA domain. Allow those devices to opt in to direct
mapping by way of a list of compatible strings.
Signed-off-by: Jordan Crouse <jcrouse@xxxxxxxxxxxxxx>
Co-developed-by: Sai Prakash Ranjan <saiprakash.ranjan@xxxxxxxxxxxxxx>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@xxxxxxxxxxxxxx>
---
 drivers/iommu/arm-smmu-qcom.c | 39 +++++++++++++++++++++++++++++++++++
 drivers/iommu/arm-smmu.c | 3 +++
 drivers/iommu/arm-smmu.h | 5 +++++
 3 files changed, 47 insertions(+)
diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c
index 64a4ab270ab7..ff746acd1c81 100644
--- a/drivers/iommu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm-smmu-qcom.c
@@ -3,6 +3,7 @@
ÂÂ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
ÂÂ */
 +#include <linux/of_device.h>
 #include <linux/qcom_scm.h>
ÂÂÂ #include "arm-smmu.h"
@@ -11,6 +12,43 @@ struct qcom_smmu {
ÂÂÂÂÂ struct arm_smmu_device smmu;
 };
 +static const struct arm_smmu_client_match_data qcom_adreno = {
+ÂÂÂ .direct_mapping = true,
+};
+
+static const struct arm_smmu_client_match_data qcom_mdss = {
+ÂÂÂ .direct_mapping = true,
+};
Might it make sense to group these by the desired SMMU behaviour
rather than (apparently) what kind of device the client happens to be,
which seems like a completely arbitrary distinction from the SMMU
driver's PoV?
Sorry, I did not get the "grouping by the desired SMMU behaviour" thing.
Could you please give some more details?