Commit 4ee22240 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab
Browse files

media: staging: davinci: remove vpfe driver



The davinci_vpfe driver was merged into staging back in 2012 by Manjunath
Hadli from TI, with a long TODO list.

For all I can tell, since then it has only seen fixes for compile-time
issues and global cleanups, but nobody has actually worked on the items
on the TODO list.

To make things worse, the driver in its current form is incompatible with
the platform code in arch/arm/mach-davinci, i.e. the driver expects to
get its platform_data passed to the device as a 'struct vpfe_config',
but uses a differnet definition for that structure compared to what the
platform uses.

Finally, there is another driver for the same device in
drivers/media/platform/davinci/vpfe_capture.c. From all I can tell, the
staging version was originally a copy of a more featureful driver in TI's
downstream kernels. However, that kernel no longer supports dm365 after
linux-2.6.37, and the mainline version moved in a different direction.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 757c2bf5
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -22,8 +22,6 @@ if STAGING_MEDIA && MEDIA_SUPPORT
# Please keep them in alphabetic order
source "drivers/staging/media/allegro-dvt/Kconfig"

source "drivers/staging/media/davinci_vpfe/Kconfig"

source "drivers/staging/media/hantro/Kconfig"

source "drivers/staging/media/imx/Kconfig"
+0 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_VIDEO_ALLEGRO_DVT)	+= allegro-dvt/
obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
obj-$(CONFIG_VIDEO_DM365_VPFE)	+= davinci_vpfe/
obj-$(CONFIG_VIDEO_MESON_VDEC)	+= meson/vdec/
obj-$(CONFIG_VIDEO_OMAP4)	+= omap4iss/
obj-$(CONFIG_VIDEO_SUNXI)	+= sunxi/
+0 −13
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
config VIDEO_DM365_VPFE
	tristate "DM365 VPFE Media Controller Capture Driver"
	depends on VIDEO_V4L2
	depends on (ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF) || (COMPILE_TEST && !ARCH_OMAP1)
	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.

	  To compile this driver as a module, choose M here: the
	  module will be called vpfe-mc-capture.
+0 −11
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_VIDEO_DM365_VPFE) += davinci-vfpe.o

davinci-vfpe-objs := \
	dm365_isif.o dm365_ipipe_hw.o dm365_ipipe.o \
	dm365_resizer.o dm365_ipipeif.o vpfe_mc_capture.o vpfe_video.o

# Allow building it with COMPILE_TEST on other archs
ifndef CONFIG_ARCH_DAVINCI
ccflags-y += -I $(srctree)/arch/arm/mach-davinci/include/
endif
+0 −38
Original line number Diff line number Diff line
TODO (general):
==================================

- User space interface refinement
	- Controls should be used when possible rather than private ioctl
	- No enums should be used
	- Use of MC and V4L2 subdev APIs when applicable
	- Single interface header might suffice
	- Current interface forces to configure everything at once
- Get rid of the dm365_ipipe_hw.[ch] layer
- Active external sub-devices defined by link configuration; no strcmp
  needed
- More generic platform data (i2c adapters)
- The driver should have no knowledge of possible external subdevs; see
  struct vpfe_subdev_id
- Some of the hardware control should be refactorede
- Check proper serialisation (through mutexes and spinlocks)
- Names that are visible in kernel global namespace should have a common
  prefix (or a few)
- While replacing the older driver in media folder, provide a compatibility
  layer and compatibility tests that warrants (using the libv4l's LD_PRELOAD
  approach) there is no regression for the users using the older driver.
- make it independent of arch-specific APIs (mach/mux.h).

Building of uImage and Applications:
==================================

As of now since the interface will undergo few changes all the include
files are present in staging itself, to build for dm365 follow below steps,

- copy vpfe.h from drivers/staging/media/davinci_vpfe/ to
  include/media/davinci/ folder for building the uImage.
- copy davinci_vpfe_user.h from drivers/staging/media/davinci_vpfe/ to
  include/uapi/linux/davinci_vpfe.h, and add a entry in Kbuild (required
  for building application).
- copy dm365_ipipeif_user.h from drivers/staging/media/davinci_vpfe/ to
  include/uapi/linux/dm365_ipipeif.h and a entry in Kbuild (required
  for building application).
Loading