diff mbox

[media] media/v4l2: VIDEO_RENESAS_VSP1 should depend on HAS_DMA

Message ID 1378471436-7045-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show

Commit Message

Geert Uytterhoeven Sept. 6, 2013, 12:43 p.m. UTC
If NO_DMA=y:

warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)

drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit declaration of function ‘dma_mmap_coherent’
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:385: error: implicit declaration of function ‘dma_get_sgtable’
make[7]: *** [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1

VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.

Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/media/platform/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Sept. 6, 2013, 3:20 p.m. UTC | #1
Hi Geert,

On Friday 06 September 2013 14:43:56 Geert Uytterhoeven wrote:
> If NO_DMA=y:
> 
> warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG
> which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
> 
> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
> drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit
> declaration of function ‘dma_mmap_coherent’
> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function
> ‘vb2_dc_get_base_sgt’: drivers/media/v4l2-core/videobuf2-dma-contig.c:385:
> error: implicit declaration of function ‘dma_get_sgtable’ make[7]: ***
> [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1
> 
> VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
> VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.
> 
> Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.

Is there a chance we could fix the Kconfig infrastructure instead ? It warns 
about the unmet dependency, shouldn't it disallow selecting the driver in the 
first place ? I have a vague feeling that this topic has been discussed before 
though.

If that's not possible,

> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index 8068d7b..fbc0611 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -212,7 +212,7 @@ config VIDEO_SH_VEU
> 
>  config VIDEO_RENESAS_VSP1
>  	tristate "Renesas VSP1 Video Processing Engine"
> -	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> +	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
>  	select VIDEOBUF2_DMA_CONTIG
>  	---help---
>  	  This is a V4L2 driver for the Renesas VSP1 video processing engine.
Geert Uytterhoeven Sept. 6, 2013, 5:07 p.m. UTC | #2
On Fri, Sep 6, 2013 at 5:20 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Friday 06 September 2013 14:43:56 Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>>
>> warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG
>> which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
>>
>> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
>> drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit
>> declaration of function ‘dma_mmap_coherent’
>> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function
>> ‘vb2_dc_get_base_sgt’: drivers/media/v4l2-core/videobuf2-dma-contig.c:385:
>> error: implicit declaration of function ‘dma_get_sgtable’ make[7]: ***
>> [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1
>>
>> VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
>> VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.
>>
>> Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.
>
> Is there a chance we could fix the Kconfig infrastructure instead ? It warns
> about the unmet dependency, shouldn't it disallow selecting the driver in the
> first place ? I have a vague feeling that this topic has been discussed before
> though.

This has come up several times before.
Unfortunately "select" was "designed" to circumvent all dependencies of
the target symbol.

> If that's not possible,
>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
>> ---
>>  drivers/media/platform/Kconfig |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
>> index 8068d7b..fbc0611 100644
>> --- a/drivers/media/platform/Kconfig
>> +++ b/drivers/media/platform/Kconfig
>> @@ -212,7 +212,7 @@ config VIDEO_SH_VEU
>>
>>  config VIDEO_RENESAS_VSP1
>>       tristate "Renesas VSP1 Video Processing Engine"
>> -     depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
>> +     depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
>>       select VIDEOBUF2_DMA_CONTIG
>>       ---help---
>>         This is a V4L2 driver for the Renesas VSP1 video processing engine.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Sept. 16, 2013, 4:14 p.m. UTC | #3
Hi Geert,

On Friday 06 September 2013 19:07:50 Geert Uytterhoeven wrote:
> On Fri, Sep 6, 2013 at 5:20 PM, Laurent Pinchart wrote:
> > On Friday 06 September 2013 14:43:56 Geert Uytterhoeven wrote:
> >> If NO_DMA=y:
> >> 
> >> warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG
> >> which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
> >> 
> >> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function
> >> ‘vb2_dc_mmap’:
> >> drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit
> >> declaration of function ‘dma_mmap_coherent’
> >> drivers/media/v4l2-core/videobuf2-dma-contig.c: In function
> >> ‘vb2_dc_get_base_sgt’:
> >> drivers/media/v4l2-core/videobuf2-dma-contig.c:385:
> >> error: implicit declaration of function ‘dma_get_sgtable’ make[7]: ***
> >> [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1
> >> 
> >> VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
> >> VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.
> >> 
> >> Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.
> > 
> > Is there a chance we could fix the Kconfig infrastructure instead ? It
> > warns about the unmet dependency, shouldn't it disallow selecting the
> > driver in the first place ? I have a vague feeling that this topic has
> > been discussed before though.
> 
> This has come up several times before.
> Unfortunately "select" was "designed" to circumvent all dependencies of
> the target symbol.

I suppose that fixing this "design bug" (or feature, depending on how one sees 
it) has been discussed extensively in the past and that the behaviour will not 
change in the near future.

I'll take your patch in and push it to v3.12.

> > If that's not possible,
> > 
> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > 
> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
diff mbox

Patch

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 8068d7b..fbc0611 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -212,7 +212,7 @@  config VIDEO_SH_VEU
 
 config VIDEO_RENESAS_VSP1
 	tristate "Renesas VSP1 Video Processing Engine"
-	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
 	select VIDEOBUF2_DMA_CONTIG
 	---help---
 	  This is a V4L2 driver for the Renesas VSP1 video processing engine.