diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-03-06 16:57:43 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-04-11 18:40:35 +0300 |
commit | 8bbad1ba3196814487438d1299cec75de5c74615 (patch) | |
tree | d077e47dcb869e9bf5cd2913de33fd839d8feb12 /drivers/gpu/host1x | |
parent | e154592a1d25fa1f50ac1bd8d132d0e1103442ba (diff) | |
download | linux-8bbad1ba3196814487438d1299cec75de5c74615.tar.xz |
gpu: host1x: Program stream ID to bypass without SMMU
If SMMU support is not available, fall back to programming the bypass
stream ID (0x7f).
Fixes: de5469c21ff9 ("gpu: host1x: Program the channel stream ID")
Suggested-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
[treding@nvidia.com: rebase this on top of a later build fix]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/hw/channel_hw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c index 4030d64916f0..0c0eb43abf65 100644 --- a/drivers/gpu/host1x/hw/channel_hw.c +++ b/drivers/gpu/host1x/hw/channel_hw.c @@ -114,9 +114,13 @@ static inline void synchronize_syncpt_base(struct host1x_job *job) static void host1x_channel_set_streamid(struct host1x_channel *channel) { -#if IS_ENABLED(CONFIG_IOMMU_API) && HOST1X_HW >= 6 +#if HOST1X_HW >= 6 + u32 sid = 0x7f; +#ifdef CONFIG_IOMMU_API struct iommu_fwspec *spec = dev_iommu_fwspec_get(channel->dev->parent); - u32 sid = spec ? spec->ids[0] & 0xffff : 0x7f; + if (spec) + sid = spec->ids[0] & 0xffff; +#endif host1x_ch_writel(channel, sid, HOST1X_CHANNEL_SMMU_STREAMID); #endif |