]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpu: host1x: Fix compile error when IOMMU API is not available
authorStefan Agner <stefan@agner.ch>
Wed, 10 Apr 2019 22:47:46 +0000 (00:47 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 11 Apr 2019 08:35:39 +0000 (10:35 +0200)
In case the IOMMU API is not available compiling host1x fails with
the following error:

  In file included from drivers/gpu/host1x/hw/host1x06.c:27:
  drivers/gpu/host1x/hw/channel_hw.c: In function ‘host1x_channel_set_streamid’:
  drivers/gpu/host1x/hw/channel_hw.c:118:30: error: implicit declaration of function
    ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’?  [-Werror=implicit-function-declaration]
  struct iommu_fwspec *spec = dev_iommu_fwspec_get(channel->dev->parent);
                              ^~~~~~~~~~~~~~~~~~~~
                              iommu_fwspec_free

Fixes: de5469c21ff9 ("gpu: host1x: Program the channel stream ID")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/hw/channel_hw.c

index 27101c04a8272668988ce5be66dfc584068f8a60..4030d64916f004a03781fc7c5b7a36173bcf344f 100644 (file)
@@ -114,7 +114,7 @@ static inline void synchronize_syncpt_base(struct host1x_job *job)
 
 static void host1x_channel_set_streamid(struct host1x_channel *channel)
 {
-#if HOST1X_HW >= 6
+#if IS_ENABLED(CONFIG_IOMMU_API) &&  HOST1X_HW >= 6
        struct iommu_fwspec *spec = dev_iommu_fwspec_get(channel->dev->parent);
        u32 sid = spec ? spec->ids[0] & 0xffff : 0x7f;