[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE=gft7HFBc7XtgiV1hkG-m3ONMUiE2vu8Vg_7Mu1dfe2BjYpA@mail.gmail.com>
Date: Mon, 13 Apr 2020 16:12:44 -0700
From: Evan Green <evgreen@...omium.org>
To: Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
Cc: Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
Joerg Roedel <joro@...tes.org>,
Jordan Crouse <jcrouse@...eaurora.org>,
Rob Clark <robdclark@...il.com>,
iommu@...ts.linux-foundation.org,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Stephen Boyd <swboyd@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Rajendra Nayak <rnayak@...eaurora.org>,
Tomasz Figa <tfiga@...omium.org>
Subject: Re: [PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping
On Wed, Jan 22, 2020 at 3:48 AM Sai Prakash Ranjan
<saiprakash.ranjan@...eaurora.org> wrote:
>
> From: Jordan Crouse <jcrouse@...eaurora.org>
>
> 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@...eaurora.org>
> Co-developed-by: Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
> ---
> 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,
I don't actually see direct_mapping being used. Shouldn't this member
be checked somewhere?
-Evan
Powered by blists - more mailing lists