diff mbox

[3/3] Fix compile error in drivers/gpu/drm/msm/msm_drv.c with IOMMU disabled

Message ID 1380120582-9068-3-git-send-email-joro@8bytes.org (mailing list archive)
State Accepted
Headers show

Commit Message

Joerg Roedel Sept. 25, 2013, 2:49 p.m. UTC
The function msm_iommu_get_ctx() is needed buy the MSM-GPU
driver with and wiithout IOMMU compiled in. Make the
function available when no IOMMU driver is there.

Signed-off-by: Joerg Roedel <joro@8bytes.org>
---
 drivers/iommu/msm_iommu.h |    7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Clark Sept. 27, 2013, 3:28 p.m. UTC | #1
On Wed, Sep 25, 2013 at 10:49 AM, Joerg Roedel <joro@8bytes.org> wrote:
> The function msm_iommu_get_ctx() is needed buy the MSM-GPU
> driver with and wiithout IOMMU compiled in. Make the
> function available when no IOMMU driver is there.
>

For this one,

Reviewed-by: Rob Clark <robdclark@gmail.com>

But I am not the right one to merge this one.  And, well, if there is
a way to make this work without msm_iommu_get_ctx(), I am interested
in some hints ;-)

Of the other two, 1/3 looks fine and I'll pull that in.  And I'll see
if I can come up with a better way for 2/3

BR,
-R

> Signed-off-by: Joerg Roedel <joro@8bytes.org>
> ---
>  drivers/iommu/msm_iommu.h |    7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/iommu/msm_iommu.h b/drivers/iommu/msm_iommu.h
> index 5c7c955..da53558 100644
> --- a/drivers/iommu/msm_iommu.h
> +++ b/drivers/iommu/msm_iommu.h
> @@ -108,7 +108,14 @@ struct msm_iommu_ctx_drvdata {
>   * Useful for testing and drivers that do not yet fully have IOMMU stuff in
>   * their platform devices.
>   */
> +#ifdef CONFIG_MSM_IOMMU
>  struct device *msm_iommu_get_ctx(const char *ctx_name);
> +#else
> +static inline struct device *msm_iommu_get_ctx(const char *ctx_name)
> +{
> +       return NULL;
> +}
> +#endif
>
>  /*
>   * Interrupt handler for the IOMMU context fault interrupt. Hooking the
> --
> 1.7.9.5
>
>
Joerg Roedel Sept. 27, 2013, 4:02 p.m. UTC | #2
Hi Rob,

On Fri, Sep 27, 2013 at 11:28:36AM -0400, Rob Clark wrote:
> But I am not the right one to merge this one.  And, well, if there is
> a way to make this work without msm_iommu_get_ctx(), I am interested
> in some hints ;-)
> 
> Of the other two, 1/3 looks fine and I'll pull that in.  And I'll see
> if I can come up with a better way for 2/3

Yeah, patch 2/3 was not meant very seriously, it was more a way to say
that someone should fix it who knows the best way how to do it ;)
Thanks for your review and taking 1/3.


	Joerg
diff mbox

Patch

diff --git a/drivers/iommu/msm_iommu.h b/drivers/iommu/msm_iommu.h
index 5c7c955..da53558 100644
--- a/drivers/iommu/msm_iommu.h
+++ b/drivers/iommu/msm_iommu.h
@@ -108,7 +108,14 @@  struct msm_iommu_ctx_drvdata {
  * Useful for testing and drivers that do not yet fully have IOMMU stuff in
  * their platform devices.
  */
+#ifdef CONFIG_MSM_IOMMU
 struct device *msm_iommu_get_ctx(const char *ctx_name);
+#else
+static inline struct device *msm_iommu_get_ctx(const char *ctx_name)
+{
+	return NULL;
+}
+#endif
 
 /*
  * Interrupt handler for the IOMMU context fault interrupt. Hooking the