All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: fix compile error when IOMMU API is not available
@ 2019-04-10 22:47 Stefan Agner
  2019-04-11  8:23 ` Ben Dooks
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Agner @ 2019-04-10 22:47 UTC (permalink / raw)
  To: thierry.reding; +Cc: digetx, dri-devel, linux-tegra, linux-kernel, Stefan Agner

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>
---
 drivers/gpu/host1x/hw/channel_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c
index 27101c04a827..4030d64916f0 100644
--- a/drivers/gpu/host1x/hw/channel_hw.c
+++ b/drivers/gpu/host1x/hw/channel_hw.c
@@ -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;
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-11 15:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 22:47 [PATCH] gpu: host1x: fix compile error when IOMMU API is not available Stefan Agner
2019-04-11  8:23 ` Ben Dooks
2019-04-11  8:30   ` Thierry Reding
2019-04-11 10:06     ` Mikko Perttunen
2019-04-11 11:31       ` Dmitry Osipenko
2019-04-11 15:37         ` Thierry Reding
2019-04-11 15:37           ` Thierry Reding
2019-04-11 10:57   ` Stefan Agner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.