driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging: tegra-vde: Fix build error
       [not found] <dc354ede-5963-cd7f-ee53-f3df3061d39a@gmail.com>
@ 2019-07-25  2:41 ` YueHaibing
       [not found] ` <20190725024129.22664-1-yuehaibing@huawei.com>
  1 sibling, 0 replies; 3+ messages in thread
From: YueHaibing @ 2019-07-25  2:41 UTC (permalink / raw)
  To: digetx, mchehab, gregkh, thierry.reding, jonathanh, robin.murphy,
	sakari.ailus
  Cc: devel, YueHaibing, linux-kernel, iommu, linux-tegra, linux-media

If IOMMU_SUPPORT is not set, and COMPILE_TEST is y,
IOMMU_IOVA may be set to m. So building will fails:

drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map':
iommu.c:(.text+0x41): undefined reference to `alloc_iova'
iommu.c:(.text+0x56): undefined reference to `__free_iova'

Select IOMMU_IOVA while COMPILE_TEST is set to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Dmitry Osipenko <digetx@gmail.com>
Fixes: b301f8de1925 ("media: staging: media: tegra-vde: Add IOMMU support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/staging/media/tegra-vde/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-vde/Kconfig b/drivers/staging/media/tegra-vde/Kconfig
index 2e7f644..ba49ea5 100644
--- a/drivers/staging/media/tegra-vde/Kconfig
+++ b/drivers/staging/media/tegra-vde/Kconfig
@@ -3,7 +3,7 @@ config TEGRA_VDE
 	tristate "NVIDIA Tegra Video Decoder Engine driver"
 	depends on ARCH_TEGRA || COMPILE_TEST
 	select DMA_SHARED_BUFFER
-	select IOMMU_IOVA if IOMMU_SUPPORT
+	select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST)
 	select SRAM
 	help
 	    Say Y here to enable support for the NVIDIA Tegra video decoder
-- 
2.7.4

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

* Re: [PATCH] media: staging: tegra-vde: Fix build error
       [not found]   ` <dd547b44-7abb-371f-aeee-a82b96f824e2@gmail.com>
@ 2019-09-20 19:32     ` Arnd Bergmann
  2019-09-20 22:26       ` Dmitry Osipenko
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-09-20 19:32 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: driverdevel, gregkh, YueHaibing, linux-kernel, Jonathan Hunter,
	open list:IOMMU DRIVERS, Thierry Reding, Sakari Ailus,
	open list:TEGRA ARCHITECTURE SUPPORT, Mauro Carvalho Chehab,
	Robin Murphy, Linux Media Mailing List

On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>
> 25.07.2019 5:41, YueHaibing пишет:
> > If IOMMU_SUPPORT is not set, and COMPILE_TEST is y,
> > IOMMU_IOVA may be set to m. So building will fails:
> >
> > drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map':
> > iommu.c:(.text+0x41): undefined reference to `alloc_iova'
> > iommu.c:(.text+0x56): undefined reference to `__free_iova'
> >
> > Select IOMMU_IOVA while COMPILE_TEST is set to fix this.

> > @@ -3,7 +3,7 @@ config TEGRA_VDE
> >       tristate "NVIDIA Tegra Video Decoder Engine driver"
> >       depends on ARCH_TEGRA || COMPILE_TEST
> >       select DMA_SHARED_BUFFER
> > -     select IOMMU_IOVA if IOMMU_SUPPORT
> > +     select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST)
> >       select SRAM
> >       help
> >           Say Y here to enable support for the NVIDIA Tegra video decoder
> >
>
> This results in missing the case of compile-testing !IOMMU_IOVA for the
> driver, but probably that's not a big deal.
>
> Acked-by: Dmitry Osipenko <digetx@gmail.com>

I don't know what happened here, but the patch from YueHaibing caused this
error for me, which is very much like the problem it was meant to fix:

drivers/gpu/host1x/dev.o: In function `host1x_probe':
dev.c:(.text+0x1734): undefined reference to `put_iova_domain'
dev.c:(.text+0x1744): undefined reference to `iova_cache_put'
drivers/gpu/host1x/dev.o: In function `host1x_remove':
dev.c:(.text+0x1894): undefined reference to `put_iova_domain'
dev.c:(.text+0x1898): undefined reference to `iova_cache_put'
drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init':
cdma.c:(.text+0x5d0): undefined reference to `alloc_iova'
cdma.c:(.text+0x61c): undefined reference to `__free_iova'
drivers/gpu/host1x/cdma.o: In function `host1x_cdma_deinit':
cdma.c:(.text+0x6c8): undefined reference to `free_iova'
drivers/gpu/host1x/job.o: In function `host1x_job_pin':
job.c:(.text+0x514): undefined reference to `alloc_iova'
job.c:(.text+0x528): undefined reference to `__free_iova'
drivers/gpu/host1x/job.o: In function `host1x_job_unpin':
job.c:(.text+0x5bc): undefined reference to `free_iova'

After reverthing commit 6b2265975239 ("media: staging:
tegra-vde: Fix build error"), I can no longer reproduce the
issue.

       Arnd
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] media: staging: tegra-vde: Fix build error
  2019-09-20 19:32     ` Arnd Bergmann
@ 2019-09-20 22:26       ` Dmitry Osipenko
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2019-09-20 22:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: driverdevel, gregkh, YueHaibing, linux-kernel, Jonathan Hunter,
	open list:IOMMU DRIVERS, Thierry Reding, Sakari Ailus,
	open list:TEGRA ARCHITECTURE SUPPORT, Mauro Carvalho Chehab,
	Robin Murphy, Linux Media Mailing List

20.09.2019 22:32, Arnd Bergmann пишет:
> On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>>
>> 25.07.2019 5:41, YueHaibing пишет:
>>> If IOMMU_SUPPORT is not set, and COMPILE_TEST is y,
>>> IOMMU_IOVA may be set to m. So building will fails:
>>>
>>> drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map':
>>> iommu.c:(.text+0x41): undefined reference to `alloc_iova'
>>> iommu.c:(.text+0x56): undefined reference to `__free_iova'
>>>
>>> Select IOMMU_IOVA while COMPILE_TEST is set to fix this.
> 
>>> @@ -3,7 +3,7 @@ config TEGRA_VDE
>>>       tristate "NVIDIA Tegra Video Decoder Engine driver"
>>>       depends on ARCH_TEGRA || COMPILE_TEST
>>>       select DMA_SHARED_BUFFER
>>> -     select IOMMU_IOVA if IOMMU_SUPPORT
>>> +     select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST)
>>>       select SRAM
>>>       help
>>>           Say Y here to enable support for the NVIDIA Tegra video decoder
>>>
>>
>> This results in missing the case of compile-testing !IOMMU_IOVA for the
>> driver, but probably that's not a big deal.
>>
>> Acked-by: Dmitry Osipenko <digetx@gmail.com>
> 
> I don't know what happened here, but the patch from YueHaibing caused this
> error for me, which is very much like the problem it was meant to fix:
> 
> drivers/gpu/host1x/dev.o: In function `host1x_probe':
> dev.c:(.text+0x1734): undefined reference to `put_iova_domain'
> dev.c:(.text+0x1744): undefined reference to `iova_cache_put'
> drivers/gpu/host1x/dev.o: In function `host1x_remove':
> dev.c:(.text+0x1894): undefined reference to `put_iova_domain'
> dev.c:(.text+0x1898): undefined reference to `iova_cache_put'
> drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init':
> cdma.c:(.text+0x5d0): undefined reference to `alloc_iova'
> cdma.c:(.text+0x61c): undefined reference to `__free_iova'
> drivers/gpu/host1x/cdma.o: In function `host1x_cdma_deinit':
> cdma.c:(.text+0x6c8): undefined reference to `free_iova'
> drivers/gpu/host1x/job.o: In function `host1x_job_pin':
> job.c:(.text+0x514): undefined reference to `alloc_iova'
> job.c:(.text+0x528): undefined reference to `__free_iova'
> drivers/gpu/host1x/job.o: In function `host1x_job_unpin':
> job.c:(.text+0x5bc): undefined reference to `free_iova'
> 
> After reverthing commit 6b2265975239 ("media: staging:
> tegra-vde: Fix build error"), I can no longer reproduce the
> issue.

There is a follow up here: https://patchwork.ozlabs.org/patch/1153176/
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2019-09-20 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <dc354ede-5963-cd7f-ee53-f3df3061d39a@gmail.com>
2019-07-25  2:41 ` [PATCH] media: staging: tegra-vde: Fix build error YueHaibing
     [not found] ` <20190725024129.22664-1-yuehaibing@huawei.com>
     [not found]   ` <dd547b44-7abb-371f-aeee-a82b96f824e2@gmail.com>
2019-09-20 19:32     ` Arnd Bergmann
2019-09-20 22:26       ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).