Skip to contentSkip to conversation

ARM randconfig fixes

PATCH In review Arnd Bergmann 3 participants 12 messages Jan 28, 2015 – Jan 29, 2015

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ARM randconfig fixes

Hi Mauro,

This is one set of randconfig fixes that I've been carrying in a local branch for a long time. I have made sure that they are all still required, but there are others that I have not been able to reproduce yet, so I will probably send them out once I get the errors again.

The ones here are all trivial, mostly adding missing dependencies.

Please apply.

Arnd Bergmann (7):
[media] timberdale: do not select TIMB_DMA
[media] radio/aimslab: use mdelay instead of udelay [media] staging/davinci/vpfe/dm365: add missing dependencies [media] siano: fix Kconfig dependencies
[media] gspca: add INPUT dependency
[media] marvell-ccic: MMP_CAMERA never worked [media] marvell-ccic needs VIDEOBUF2_DMA_SG

 drivers/media/mmc/siano/Kconfig             | 2 ++
 drivers/media/platform/Kconfig              | 6 ++----
 drivers/media/platform/marvell-ccic/Kconfig | 3 ++-
 drivers/media/radio/radio-aimslab.c         | 4 ++--
 drivers/media/usb/gspca/Kconfig             | 1 +
 drivers/media/usb/siano/Kconfig             | 2 ++
 drivers/staging/media/davinci_vpfe/Kconfig  | 2 ++
 7 files changed, 13 insertions(+), 7 deletions(-)
Signature · 1 line
2.1.0.rc2
#1 lore raw

PATCH 1/7 timberdale: do not select TIMB_DMA

The timberdale media driver requires the use of the respective dma engine driver, but that may not be enabled, causing a Kconfig warning:

warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)

This fixes the dependency by removing the inappropriate 'select' statement and replacing it with a direct dependency on the drivers that provide the services this needs.

Fixes 7155043c2d027 ("[media] enable COMPILE_TEST for media drivers")
---
 drivers/media/platform/Kconfig | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/platform/Kconfig +2 -4
index 765bffb49a72..6a1334be7544 100644
@@ -56,10 +56,8 @@ config VIDEO_VIU
 
 config VIDEO_TIMBERDALE
 	tristate "Support for timberdale Video In/LogiWIN"
-	depends on VIDEO_V4L2 && I2C && DMADEVICES
-	depends on MFD_TIMBERDALE || COMPILE_TEST
-	select DMA_ENGINE
-	select TIMB_DMA
+	depends on VIDEO_V4L2 && I2C
+	depends on (MFD_TIMBERDALE && TIMB_DMA) || COMPILE_TEST
 	select VIDEO_ADV7180
 	select VIDEOBUF_DMA_CONTIG
 	---help---
Signature · 1 line
2.1.0.rc2
#2 lore raw

PATCH 2/7 radio/aimslab: use mdelay instead of udelay

In reply to Arnd Bergmann

Large udelay values are not allowed on the ARM architecture and result in a build error like

ERROR: "__bad_udelay" [drivers/media/radio/radio-aimslab.ko] undefined!

This changes the aimslab radio driver to use an equivalent mdelay statement.

---
 drivers/media/radio/radio-aimslab.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/radio/radio-aimslab.c +2 -2
index a739ad492e7b..ea9308796741 100644
@@ -129,11 +129,11 @@ static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol)
 	} else if (curvol < vol) {
 		outb(0x98, isa->io);	/* volume up + sigstr + on	*/
 		for (; curvol < vol; curvol++)
-			udelay(3000);
+			mdelay(3);
 	} else if (curvol > vol) {
 		outb(0x58, isa->io);	/* volume down + sigstr + on	*/
 		for (; curvol > vol; curvol--)
-			udelay(3000);
+			mdelay(3);
 	}
 	outb(0xd8, isa->io);		/* volume steady + sigstr + on	*/
 	rt->curvol = vol;
Signature · 1 line
2.1.0.rc2
#3 lore raw

PATCH 3/7 staging/davinci/vpfe/dm365: add missing dependencies

In reply to Arnd Bergmann

This driver can only be built when VIDEO_V4L2_SUBDEV_API and VIDEO_DAVINCI_VPBE_DISPLAY are also provided by the kernel.

drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format':
drivers/staging/media/davinci_vpfe/dm365_isif.c:1410:3: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration]
return v4l2_subdev_get_try_format(fh, pad);
^

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/media/davinci_vpfe/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/davinci_vpfe/Kconfig +2 -0
index 4de2f082491d..f40a06954a92 100644
@@ -2,6 +2,8 @@ config VIDEO_DM365_VPFE
 	tristate "DM365 VPFE Media Controller Capture Driver"
 	depends on VIDEO_V4L2 && ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF
 	depends on HAS_DMA
+	depends on VIDEO_V4L2_SUBDEV_API
+	depends on VIDEO_DAVINCI_VPBE_DISPLAY
 	select VIDEOBUF2_DMA_CONTIG
 	help
 	  Support for DM365 VPFE based Media Controller Capture driver.
Signature · 1 line
2.1.0.rc2
Acked-by on v1 3/7
#4 lore raw

Re: [PATCH 3/7] [media] staging/davinci/vpfe/dm365: add missing dependencies

Quoted 11 lines · Arnd Bergmann

This driver can only be built when VIDEO_V4L2_SUBDEV_API and VIDEO_DAVINCI_VPBE_DISPLAY are also provided by the kernel.

drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format':
drivers/staging/media/davinci_vpfe/dm365_isif.c:1410:3: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration]

   return v4l2_subdev_get_try_format(fh, pad);
   ^
Cc Greg Kroah-Hartman <[email protected]>

Regards,
--Prabhakar Lad

Quoted 25 lines
---
 drivers/staging/media/davinci_vpfe/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/davinci_vpfe/Kconfig +2 -1
index 4de2f082491d..f40a06954a92 100644
@@ -2,6 +2,8 @@ config VIDEO_DM365_VPFE
        tristate "DM365 VPFE Media Controller Capture Driver"
        depends on VIDEO_V4L2 && ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF
        depends on HAS_DMA
+       depends on VIDEO_V4L2_SUBDEV_API
+       depends on VIDEO_DAVINCI_VPBE_DISPLAY
        select VIDEOBUF2_DMA_CONTIG
        help
          Support for DM365 VPFE based Media Controller Capture driver.
--

2.1.0.rc2

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

PATCH 4/7 siano: fix Kconfig dependencies

In reply to Arnd Bergmann

The USB and MMC front-ends to the siano driver both only make sense when combined with the SMS_SIANO_MDTV driver. That driver already requires RC_CORE to not be a module, so we also need to add that dependency here.

drivers/built-in.o: In function `smssdio_remove':
:(.text+0x155bd8): undefined reference to smscore_putbuffer' :(.text+0x155bdc): undefined reference to smscore_unregister_device' drivers/built-in.o: In function `smssdio_interrupt':
:(.text+0x155e4c): undefined reference to smsendian_handle_rx_message' :(.text+0x155e50): undefined reference to smscore_onresponse' :(.text+0x155e54): undefined reference to smscore_getbuffer' :(.text+0x155e58): undefined reference to smscore_putbuffer' drivers/built-in.o: In function `smssdio_sendrequest':
:(.text+0x155f20): undefined reference to smsendian_handle_tx_message' drivers/built-in.o: In function smssdio_probe':
:(.text+0x15610c): undefined reference to sms_get_board' :(.text+0x156114): undefined reference to smscore_register_device' :(.text+0x156118): undefined reference to smscore_set_board_id' :(.text+0x156128): undefined reference to smscore_unregister_device' :(.text+0x156140): undefined reference to `smscore_start_device'

---
 drivers/media/mmc/siano/Kconfig | 2 ++
 drivers/media/usb/siano/Kconfig | 2 ++
 2 files changed, 4 insertions(+)
drivers/media/mmc/siano/Kconfig +2 -0
index aa05ad3c1ccb..7693487e2f63 100644
@@ -6,6 +6,8 @@ config SMS_SDIO_DRV
 	tristate "Siano SMS1xxx based MDTV via SDIO interface"
 	depends on DVB_CORE && HAS_DMA
 	depends on MMC
+	depends on !RC_CORE || RC_CORE
 	select MEDIA_COMMON_OPTIONS
+	select SMS_SIANO_MDTV
 	---help---
 	  Choose if you would like to have Siano's support for SDIO interface
drivers/media/usb/siano/Kconfig +2 -0
index 5afbd9a4b55c..d37b742d4f7a 100644
@@ -5,7 +5,9 @@
 config SMS_USB_DRV
 	tristate "Siano SMS1xxx based MDTV receiver"
 	depends on DVB_CORE && HAS_DMA
+	depends on !RC_CORE || RC_CORE
 	select MEDIA_COMMON_OPTIONS
+	select SMS_SIANO_MDTV
 	---help---
 	  Choose if you would like to have Siano's support for USB interface
 
Signature · 1 line
2.1.0.rc2
#6 lore raw

PATCH 5/7 gspca: add INPUT dependency

In reply to Arnd Bergmann

The gspca driver uses the input_event infrastructure and fails to link if that is not available:

drivers/built-in.o: In function `gspca_disconnect':
media/usb/gspca/gspca.c:2171: undefined reference to input_unregister_device' drivers/built-in.o: In function gspca_dev_probe2':
media/usb/gspca/gspca.c:2112: undefined reference to input_allocate_device' media/usb/gspca/gspca.c:2112: undefined reference to input_register_device' media/usb/gspca/gspca.c:2112: undefined reference to input_unregister_device' media/usb/gspca/gspca.c:2112: undefined reference to input_free_device' drivers/built-in.o: In function `sd_int_pkt_scan':
media/usb/gspca/pac207.c:428: undefined reference to `input_event'
drivers/built-in.o: In function `sd_int_pkt_scan':
media/usb/gspca/pac7302.c:879: undefined reference to `input_event'
drivers/built-in.o: In function `sd_int_pkt_scan':
media/usb/gspca/se401.c:612: undefined reference to `input_event'
drivers/built-in.o: In function `sd_stop0':
media/usb/gspca/xirlink_cit.c:2742: undefined reference to input_event' drivers/built-in.o: In function cit_check_button':
media/usb/gspca/xirlink_cit.c:2935: undefined reference to input_event' drivers/built-in.o:/git/arm-soc/include/linux/input.h:414: more undefined references to input_event' follow

This adds an explicit dependency.

---
 drivers/media/usb/gspca/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/media/usb/gspca/Kconfig +1 -0
index eed10d782535..2b23aad5a9f2 100644
@@ -1,6 +1,7 @@
 menuconfig USB_GSPCA
 	tristate "GSPCA based webcams"
 	depends on VIDEO_V4L2
+	depends on INPUT
 	default m
 	---help---
 	  Say Y here if you want to enable selecting webcams based
Signature · 1 line
2.1.0.rc2
#7 lore raw

PATCH 6/7 marvell-ccic: MMP_CAMERA never worked

In reply to Arnd Bergmann

The mmp ccic driver uses a platform_data structure that has never existed in an upstream kernel and always fails to build:

media/platform/marvell-ccic/mmp-driver.c: In function 'mmpcam_calc_dphy':
media/platform/marvell-ccic/mmp-driver.c:252:15: error: 'struct mmp_camera_platform_data' has no member named 'dphy3_algo'

  switch (pdata->dphy3_algo) {
               ^
media/platform/marvell-ccic/mmp-driver.c:253:7: error: 'DPHY3_ALGO_PXA910' undeclared (first use in this function)
  case DPHY3_ALGO_PXA910:
       ^

media/platform/marvell-ccic/mmp-driver.c:253:7: note: each undeclared identifier is reported only once for each function it appears in media/platform/marvell-ccic/mmp-driver.c:257:8: error: 'struct mmp_camera_platform_data' has no member named 'dphy'

This marks the driver as 'BROKEN' but keeps the code around. Alternatively it could be removed entirely.

Cc Jonathan Corbet <[email protected]>
---
 drivers/media/platform/marvell-ccic/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/marvell-ccic/Kconfig +1 -1
index 6265d36adceb..7ac0f13c98be 100644
@@ -13,7 +13,7 @@ config VIDEO_CAFE_CCIC
 config VIDEO_MMP_CAMERA
 	tristate "Marvell Armada 610 integrated camera controller support"
 	depends on ARCH_MMP && I2C && VIDEO_V4L2
-	depends on HAS_DMA
+	depends on HAS_DMA && BROKEN
 	select VIDEO_OV7670
 	select I2C_GPIO
 	select VIDEOBUF2_DMA_SG
Signature · 1 line
2.1.0.rc2
Acked-by on v1 6/7
#8 lore raw

Re: [PATCH 6/7] [media] marvell-ccic: MMP_CAMERA never worked

Quoted 2 lines · On Wed, 28 Jan 2015 22:17:46 +0100 Arnd Bergmann <[email protected]> wrote:

The mmp ccic driver uses a platform_data structure that has never existed in an upstream kernel and always fails to build:

This driver most assuredly did work on XO 1.75 machines, and the platform_data structure does exist; it's the stuff added by Libin afterward that apparently broke things. Strange that it only came out now, though, nearly two years later. Libin, any thoughts on this?

Meanwhile, it is clearly broken, and I don't have an immediate fix, so,

(Though I would like a different patch subject, since the current one is wrong).

I think the right thing to do, alas, might be to back out all of Libin's changes. They clearly are not being used by anybody and do not seem to be getting any further development attention. It would like to keep this driver working for XO systems for a while yet...but I won't get to it right away.

Thanks,

jon

#9 lore raw

PATCH v2 6/7 marvell-ccic: MMP_CAMERA no longer builds

In reply to Arnd Bergmann

The mmp ccic driver expects a platform_data structure that does not exist in the mainline kernel and presumably was changed in a kernel fork, which leads to build errors now:

media/platform/marvell-ccic/mmp-driver.c: In function 'mmpcam_calc_dphy':
media/platform/marvell-ccic/mmp-driver.c:252:15: error: 'struct mmp_camera_platform_data' has no member named 'dphy3_algo'

  switch (pdata->dphy3_algo) {
               ^
media/platform/marvell-ccic/mmp-driver.c:253:7: error: 'DPHY3_ALGO_PXA910' undeclared (first use in this function)
  case DPHY3_ALGO_PXA910:
       ^

media/platform/marvell-ccic/mmp-driver.c:253:7: note: each undeclared identifier is reported only once for each function it appears in media/platform/marvell-ccic/mmp-driver.c:257:8: error: 'struct mmp_camera_platform_data' has no member named 'dphy'

This marks the driver as 'BROKEN' but keeps the code around. Alternatively it could be removed entirely.

Cc Libin Yang <[email protected]>
Fixes 05fed81625bf75 ("[media] marvell-ccic: add MIPI support for marvell-ccic driver")

----

Quoted 4 lines

This driver most assuredly did work on XO 1.75 machines, and the platform_data structure does exist; it's the stuff added by Libin afterward that apparently broke things. Strange that it only came out now, though, nearly two years later. Libin, any thoughts on this?

I've carried this workaround in a private git tree that has hundreds of randconfig fixes, just started flushing out some of the patches again. The configuration in which the driver gets selected is relatively rare, and it is not enabled in any of the defconfigs obviously.

When I originally wrote the patch description, I must have missed the fact that the driver was moved from a different directory and I only saw that it was broken at the point when it showed up in drivers/media/platform/marvell-ccic/.

Quoted 3 lines

Meanwhile, it is clearly broken, and I don't have an immediate fix, so,

Thanks

Quoted 2 lines

(Though I would like a different patch subject, since the current one is wrong).

Done.

drivers/media/platform/marvell-ccic/Kconfig +1 -1
index 6265d36adceb..7ac0f13c98be 100644
@@ -13,7 +13,7 @@ config VIDEO_CAFE_CCIC
 config VIDEO_MMP_CAMERA
 	tristate "Marvell Armada 610 integrated camera controller support"
 	depends on ARCH_MMP && I2C && VIDEO_V4L2
-	depends on HAS_DMA
+	depends on HAS_DMA && BROKEN
 	select VIDEO_OV7670
 	select I2C_GPIO
 	select VIDEOBUF2_DMA_SG
#10 lore raw

PATCH 7/7 marvell-ccic needs VIDEOBUF2_DMA_SG

In reply to Arnd Bergmann

The vb2_dma_sg_memops pointer is only valid if VIDEOBUF2_DMA_SG is set, so we should select that to avoid this build error:

drivers/built-in.o: In function `mcam_v4l_open':
:(.text+0x388d00): undefined reference to `vb2_dma_sg_memops'

Cc Jonathan Corbet <[email protected]>
---
 drivers/media/platform/marvell-ccic/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/marvell-ccic/Kconfig +1 -0
index 7ac0f13c98be..4bf5bd1e90d6 100644
@@ -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-
Signature · 1 line
2.1.0.rc2
Acked-by on v1 7/7
#11 lore raw

Re: [PATCH 7/7] [media] marvell-ccic needs VIDEOBUF2_DMA_SG

Quoted 5 lines · On Wed, 28 Jan 2015 22:17:47 +0100 Arnd Bergmann <[email protected]> wrote:

The vb2_dma_sg_memops pointer is only valid if VIDEOBUF2_DMA_SG is set, so we should select that to avoid this build error:

drivers/built-in.o: In function `mcam_v4l_open':
:(.text+0x388d00): undefined reference to `vb2_dma_sg_memops'

I acked this one the last time it came around (I forget from who). I still don't know how to create a .config that exposes the problem, but others have clearly succeeded in doing it.

jon