Chen Zhou
2020-Jan-16 12:50 UTC
[Nouveau] [PATCH -next] drm/nouveau: fix build error without CONFIG_IOMMU_API
If CONFIG_IOMMU_API is n, build fails:
vers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:37:9: error: implicit declaration
of function dev_iommu_fwspec_get; did you mean iommu_fwspec_free?
[-Werror=implicit-function-declaration]
spec = dev_iommu_fwspec_get(device->dev);
^~~~~~~~~~~~~~~~~~~~
iommu_fwspec_free
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:37:7: warning: assignment makes
pointer from integer without a cast [-Wint-conversion]
spec = dev_iommu_fwspec_get(device->dev);
^
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:39:17: error: struct
iommu_fwspec has no member named ids
u32 sid = spec->ids[0] & 0xffff;
Seletc IOMMU_API under config DRM_NOUVEAU to fix this.
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Chen Zhou <chenzhou10 at huawei.com>
---
drivers/gpu/drm/nouveau/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 9c990266..ce03693 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -2,6 +2,7 @@
config DRM_NOUVEAU
tristate "Nouveau (NVIDIA) cards"
depends on DRM && PCI && MMU
+ select IOMMU_API
select FW_LOADER
select DRM_KMS_HELPER
select DRM_TTM
--
2.7.4
Maybe Matching Threads
- [PATCH 04/11] drm/nouveau: gp10b: Add custom L2 cache implementation
- [PATCH 04/11] drm/nouveau: gp10b: Add custom L2 cache implementation
- [PATCH v2 17/33] iommu/arm-smmu: Convert to probe/release_device() call-backs
- [PATCH v3 0/9] drm/nouveau: Various fixes for GP10B
- [PATCH v2 22/33] iommu/mediatek: Convert to probe/release_device() call-backs
