All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG
@ 2014-12-15 13:55 Geert Uytterhoeven
  2014-12-15 14:04 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-12-15 13:55 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Geert Uytterhoeven

If VIDEO_CAFE_CCIC=y, but VIDEOBUF2_DMA_SG=m:

drivers/built-in.o: In function `mcam_v4l_open':
mcam-core.c:(.text+0x1c2e81): undefined reference to `vb2_dma_sg_memops'
mcam-core.c:(.text+0x1c2eb0): undefined reference to `vb2_dma_sg_init_ctx'
drivers/built-in.o: In function `mcam_v4l_release':
mcam-core.c:(.text+0x1c34bf): undefined reference to `vb2_dma_sg_cleanup_ctx'

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
This is a resend of a patch from 2013-09-30. It's still valid.

 drivers/media/platform/marvell-ccic/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/marvell-ccic/Kconfig b/drivers/media/platform/marvell-ccic/Kconfig
index 6265d36adcebcb89..3d166568bd6955bd 100644
--- a/drivers/media/platform/marvell-ccic/Kconfig
+++ b/drivers/media/platform/marvell-ccic/Kconfig
@@ -5,6 +5,7 @@ config VIDEO_CAFE_CCIC
 	select VIDEO_OV7670
 	select VIDEOBUF2_VMALLOC
 	select VIDEOBUF2_DMA_CONTIG
+	select VIDEOBUF2_DMA_SG
 	---help---
 	  This is a video4linux2 driver for the Marvell 88ALP01 integrated
 	  CMOS camera controller.  This is the controller found on first-
-- 
1.9.1


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

* Re: [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG
  2014-12-15 13:55 [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG Geert Uytterhoeven
@ 2014-12-15 14:04 ` Jonathan Corbet
  2014-12-15 14:10   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2014-12-15 14:04 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

On Mon, 15 Dec 2014 14:55:37 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> If VIDEO_CAFE_CCIC=y, but VIDEOBUF2_DMA_SG=m:
> 
> drivers/built-in.o: In function `mcam_v4l_open':
> mcam-core.c:(.text+0x1c2e81): undefined reference to `vb2_dma_sg_memops'
> mcam-core.c:(.text+0x1c2eb0): undefined reference to `vb2_dma_sg_init_ctx'
> drivers/built-in.o: In function `mcam_v4l_release':
> mcam-core.c:(.text+0x1c34bf): undefined reference to `vb2_dma_sg_cleanup_ctx'

I've been mildly resistant to this because I've never figured out how
such a configuration can come about.  The Cafe chip only appeared in the
OLPC XO-1 and cannot even come close to doing S/G I/O.  So this patch
robs a bit of memory for no use on a platform that can ill afford it.

OTOH, the number of people building contemporary kernels for the XO-1 has
got to be pretty small.  So, in the interest of mollifying randconfig
users out there, you can add my:

Acked-by: Jonathan Corbet <corbet@lwn.net>

jon

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

* Re: [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG
  2014-12-15 14:04 ` Jonathan Corbet
@ 2014-12-15 14:10   ` Geert Uytterhoeven
  2014-12-15 14:13     ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-12-15 14:10 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	linux-kernel@vger.kernel.org

Hi Jon,

On Mon, Dec 15, 2014 at 3:04 PM, Jonathan Corbet <corbet@lwn.net> wrote:
> On Mon, 15 Dec 2014 14:55:37 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
>> If VIDEO_CAFE_CCIC=y, but VIDEOBUF2_DMA_SG=m:
>>
>> drivers/built-in.o: In function `mcam_v4l_open':
>> mcam-core.c:(.text+0x1c2e81): undefined reference to `vb2_dma_sg_memops'
>> mcam-core.c:(.text+0x1c2eb0): undefined reference to `vb2_dma_sg_init_ctx'
>> drivers/built-in.o: In function `mcam_v4l_release':
>> mcam-core.c:(.text+0x1c34bf): undefined reference to `vb2_dma_sg_cleanup_ctx'
>
> I've been mildly resistant to this because I've never figured out how
> such a configuration can come about.  The Cafe chip only appeared in the
> OLPC XO-1 and cannot even come close to doing S/G I/O.  So this patch
> robs a bit of memory for no use on a platform that can ill afford it.

If the driver cannot do SG, perhaps this block should be removed from
drivers/media/platform/marvell-ccic/mcam-core.h?

    #if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_SG)
    #define MCAM_MODE_DMA_SG 1
    #endif

Oh, this seems to be a reason for the breakage, too: IS_ENABLED()
evaluates to true for modular options...

> OTOH, the number of people building contemporary kernels for the XO-1 has
> got to be pretty small.  So, in the interest of mollifying randconfig
> users out there, you can add my:
>
> Acked-by: Jonathan Corbet <corbet@lwn.net>

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG
  2014-12-15 14:10   ` Geert Uytterhoeven
@ 2014-12-15 14:13     ` Jonathan Corbet
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2014-12-15 14:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	linux-kernel@vger.kernel.org

On Mon, 15 Dec 2014 15:10:38 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> If the driver cannot do SG, perhaps this block should be removed from
> drivers/media/platform/marvell-ccic/mcam-core.h?
> 
>     #if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_SG)
>     #define MCAM_MODE_DMA_SG 1
>     #endif

Other drivers using the Marvell core can do S/G, though, so that option
needs to remain.  Applying your patch is almost certainly the most
straightforward solution at this point.

Thanks,

jon

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

end of thread, other threads:[~2014-12-15 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 13:55 [PATCH/RESEND] [media] VIDEO_CAFE_CCIC should select VIDEOBUF2_DMA_SG Geert Uytterhoeven
2014-12-15 14:04 ` Jonathan Corbet
2014-12-15 14:10   ` Geert Uytterhoeven
2014-12-15 14:13     ` Jonathan Corbet

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.