]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: fix build error without CONFIG_IOMMU_API
authorChen Zhou <chenzhou10@huawei.com>
Thu, 16 Jan 2020 12:50:10 +0000 (20:50 +0800)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 22 Jan 2020 22:56:51 +0000 (08:56 +1000)
commit1c8f958eb5b1d60447ec512c1b56226a1b88ed3f
treecd340bb76164789a2777770693670e779179d2b7
parent987d1ef980a3cc3a29c3a8ee3df8d34dc2bda6b8
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@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/Kconfig