Commit graph

1602 commits

Author SHA1 Message Date
Philipp Zabel 4de69319f0 [media] coda: add support for planar YCbCr 4:2:2 (YUV422P) format
This patch adds support for the three-plane YUV422P format with one luma plane
and two horizontally subsampled chroma planes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:59:39 -02:00
Philipp Zabel 1cb12cf3c0 [media] coda: add support for partial interleaved YCbCr 4:2:0 (NV12) format
This patch adds support for the two-plane NV12 format with one luma plane
and one interleaved chroma plane.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:31:01 -02:00
Philipp Zabel 2bf299cd46 [media] coda: simplify frame memory control register handling
Since the firmware newer writes to FRAME_MEM_CTRL, we can initialize it once
per context (incidentally, we already do write it in coda_hw_init) and never
have to read it back.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:29:56 -02:00
Philipp Zabel 59ebc2e446 [media] coda: disable rotator if not needed
This will still do a 1:1 copy into the internal buffers, but stop
producing visual artifacts in chroma interleaved (NV12) mode.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:29:23 -02:00
Philipp Zabel 856d7d9326 [media] coda: add coda_write_base helper
Add a helper function that writes a vb2_buffer's Y, Cb, and
Cr plane base addresses of into three consecutive registers.
This moves common code out of coda-bit.c.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:26:53 -02:00
Philipp Zabel 6da999d935 [media] coda: remove superfluous error message on devm_kzalloc failure
When devm_kzalloc causes an OOM condition, this is already reported by
the MM subsystem.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:18:51 -02:00
Philipp Zabel f157cf4918 [media] coda: clear aborting flag in stop_streaming
Clearing the aborting flag in stop_streaming is necessary if we want to start
streaming again without having to closing and reopening the device. Also,
do not explicitly set it in default_params; the context is zeroed by
kzalloc anyway.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 14:14:12 -02:00
Hans Verkuil 1f923a4203 [media] mem2mem_testdev: rename to vim2m
This is 1) *much* easier to type, and 2) is consistent with vivid
('vi' for virtual). More of such virtual drivers are planned, so keeping
the naming consistent makes sense.

Note that the old module name is retained as a module alias.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-28 13:49:13 -02:00
Jacek Anaszewski f3d83a1012 [media] s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr
Initialize components variable in order to avoid
the possibility of using it uninitialized.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24 09:36:59 -02:00
Thierry Reding d3460b2aba [media] s5p-fimc: Only build suspend/resume for PM
If power management is disabled these functions become unused, so there
is no reason to build them. This fixes a couple of build warnings when
PM(_SLEEP,_RUNTIME) is not enabled.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24 09:36:38 -02:00
Thierry Reding de3767aaef [media] s5p-jpeg: Only build suspend/resume for PM
If power management is disabled these function become unused, so there
is no reason to build them. This fixes a couple of build warnings when
PM(_SLEEP,_RUNTIME) is not enabled.

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24 09:36:20 -02:00
Sylwester Nawrocki 098bcd2335 [media] Remove references to non-existent PLAT_S5P symbol
The PLAT_S5P Kconfig symbol was removed in commit d78c16ccde
("ARM: SAMSUNG: Remove remaining legacy code"). However, there
are still some references to that symbol left, fix that by
substituting them with ARCH_S5PV210.

Fixes: d78c16ccde ("ARM: SAMSUNG: Remove remaining legacy code")

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: <stable@vger.kernel.org> # for 3.17
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24 09:35:27 -02:00
Hans Verkuil c204e1fafb [media] vivid: fix buffer overrun
The random_line buffer must be twice the maximum width, but it only allocated
the maximum width, so it was only half the size it needed to be.

Surprisingly I never saw the kernel fail on this, but the same TPG code used in
qv4l2 crashed and valgrind helped me track this bug down.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21 08:52:11 -02:00
Hans Verkuil 031d705c07 [media] vivid: fix Kconfig FB dependency
The vivid driver depends on FB, update the Kconfig accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21 08:49:52 -02:00
Wolfram Sang 377b19756c media: platform: vsp1: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:50 +02:00
Wolfram Sang e2f6414159 media: platform: ti-vpe: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:50 +02:00
Wolfram Sang 01945a4e01 media: platform: soc_camera: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:49 +02:00
Wolfram Sang 6fe0f3da2f media: platform: s5p-tv: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:49 +02:00
Wolfram Sang f38a46ca14 media: platform: s5p-mfc: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:48 +02:00
Wolfram Sang 5c208acf18 media: platform: s5p-jpeg: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:48 +02:00
Wolfram Sang 831de321bf media: platform: s5p-g2d: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:48 +02:00
Wolfram Sang 30355dd734 media: platform: s3c-camif: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:47 +02:00
Wolfram Sang 054d0dbab3 media: platform: omap3isp: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:47 +02:00
Wolfram Sang ea1251b734 media: platform: marvell-ccic: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:46 +02:00
Wolfram Sang ae6ec6abcf media: platform: exynos-gsc: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:46 +02:00
Wolfram Sang 73239ad1ab media: platform: exynos4-is: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:46 +02:00
Wolfram Sang efd285ea42 media: platform: davinci: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:45 +02:00
Wolfram Sang e0eee332d2 media: platform: coda: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:45 +02:00
Wolfram Sang 5d04d12ed2 media: platform: blackfin: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:44 +02:00
Wolfram Sang 1847265fe4 media: platform: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:44 +02:00
Linus Torvalds 52d589a01d Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine updates from Vinod Koul:
 "For dmaengine contributions we have:
   - designware cleanup by Andy
   - my series moving device_control users to dmanegine_xxx APIs for
     later removal of device_control API
   - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma
     etc"

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits)
  serial: atmel: add missing dmaengine header
  dmaengine: remove FSLDMA_EXTERNAL_START
  dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method
  carma-fpga: move to fsl_dma_external_start()
  carma-fpga: use dmaengine_xxx() API
  dmaengine: freescale: add and export fsl_dma_external_start()
  dmaengine: add dmaengine_prep_dma_sg() helper
  video: mx3fb: use dmaengine_terminate_all() API
  serial: sh-sci: use dmaengine_terminate_all() API
  net: ks8842: use dmaengine_terminate_all() API
  mtd: sh_flctl: use dmaengine_terminate_all() API
  mtd: fsmc_nand: use dmaengine_terminate_all() API
  V4L2: mx3_camer: use dmaengine_pause() API
  dmaengine: coh901318: use dmaengine_terminate_all() API
  pata_arasan_cf: use dmaengine_terminate_all() API
  dmaengine: edma: check for echan->edesc => NULL in edma_dma_pause()
  dmaengine: dw: export probe()/remove() and Co to users
  dmaengine: dw: enable and disable controller when needed
  dmaengine: dw: always export dw_dma_{en,dis}able
  dmaengine: dw: introduce dw_dma_on() helper
  ...
2014-10-18 18:11:04 -07:00
Vinod Koul 0aae803a08 V4L2: mx3_camer: use dmaengine_pause() API
The drivers should use dmaengine_pause() API instead of
accessing the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-10-15 21:30:59 +05:30
Mauro Carvalho Chehab 7d4020c3c4 [media] exynos4-is: fix some warnings when compiling on arm64
Got those warnings when compiling with gcc 4.9.1 for arm64:

drivers/media/platform/exynos4-is/fimc-isp-video.c: In function ‘isp_video_capture_buffer_queue’:
drivers/media/platform/exynos4-is/fimc-isp-video.c:221:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat=]
    isp_dbg(2, &video->ve.vdev,
    ^
drivers/media/platform/exynos4-is/fimc-is.c: In function ‘fimc_is_load_firmware’:
drivers/media/platform/exynos4-is/fimc-is.c:391:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat=]
   dev_err(dev, "wrong firmware size: %d\n", fw->size);
   ^
In file included from include/linux/printk.h:260:0,
                 from include/linux/kernel.h:13,
                 from include/linux/kernfs.h:10,
                 from include/linux/sysfs.h:15,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from drivers/media/platform/exynos4-is/fimc-is.c:15:
include/linux/dynamic_debug.h:64:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:84:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/device.h:1106:2: note: in expansion of macro ‘dynamic_dev_dbg’
  dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
  ^
drivers/media/platform/exynos4-is/fimc-is.c:419:2: note: in expansion of macro ‘dev_dbg’
  dev_dbg(dev, "FW size: %d, paddr: %#x\n", fw->size, is->memory.paddr);
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:84:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/device.h:1106:2: note: in expansion of macro ‘dynamic_dev_dbg’
  dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
  ^
drivers/media/platform/exynos4-is/fimc-is.c:419:2: note: in expansion of macro ‘dev_dbg’
  dev_dbg(dev, "FW size: %d, paddr: %#x\n", fw->size, is->memory.paddr);
  ^
drivers/media/platform/exynos4-is/fimc-is.c: In function ‘fimc_is_hw_initialize’:
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media/platform/exynos4-is/fimc-is.c:696:2: note: in expansion of macro ‘pr_debug’
  pr_debug("shared region: %#x, parameter region: %#x\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media/platform/exynos4-is/fimc-is.c:696:2: note: in expansion of macro ‘pr_debug’
  pr_debug("shared region: %#x, parameter region: %#x\n",
  ^

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:51:01 -03:00
Mauro Carvalho Chehab 03ce781626 [media] s5p-mfc: Fix several printk warnings
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:192:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:196:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:196:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1757:3: warning: format ‘%zx’ expects argument of type ‘size_t’, but argument 6 has type ‘dma_addr_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1879:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:1206:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:50:59 -03:00
Mauro Carvalho Chehab f1a0c1858c [media] s5p_mfc_opr: Fix warnings
CC      drivers/media//platform/s5p-mfc/s5p_mfc_opr.o
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c: In function ‘s5p_mfc_alloc_priv_buf’:
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:44:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
  mfc_debug(3, "Allocating priv: %d\n", b->size);
  ^
drivers/media//platform/s5p-mfc/s5p_mfc_opr.c:53:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=]
  mfc_debug(3, "Allocated addr %p %08x\n", b->virt, b->dma);
  ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:50:58 -03:00
Mauro Carvalho Chehab 5b31d9e036 [media] ti-vpe: Fix typecast
Addresses have the same size of unsigned long, and not u32.

That removes a warning on 64 bits compilation:
drivers/media//platform/ti-vpe/vpdma.c:332:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  WARN_ON(((u32) buf->addr & VPDMA_DESC_ALIGN) != 0);
           ^
include/asm-generic/bug.h:86:25: note: in definition of macro ‘WARN_ON’
  int __ret_warn_on = !!(condition);    \
                         ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:50:58 -03:00
Mauro Carvalho Chehab c0a566f3d5 [media] s3c-camif: fix dma_addr_t printks
drivers/media//platform/s3c-camif/camif-capture.c: In function ‘camif_prepare_addr’:
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-capture.c:283:2: note: in expansion of macro ‘pr_debug’
  pr_debug("DMA address: y: %#x  cb: %#x cr: %#x\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-capture.c:283:2: note: in expansion of macro ‘pr_debug’
  pr_debug("DMA address: y: %#x  cb: %#x cr: %#x\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-capture.c:283:2: note: in expansion of macro ‘pr_debug’
  pr_debug("DMA address: y: %#x  cb: %#x cr: %#x\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-regs.c:217:2: note: in expansion of macro ‘pr_debug’
  pr_debug("dst_buf[%d]: %#X, cb: %#X, cr: %#X\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-regs.c:217:2: note: in expansion of macro ‘pr_debug’
  pr_debug("dst_buf[%d]: %#X, cb: %#X, cr: %#X\n",
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 8 has type ‘dma_addr_t’ [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:266:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
drivers/media//platform/s3c-camif/camif-regs.c:217:2: note: in expansion of macro ‘pr_debug’
  pr_debug("dst_buf[%d]: %#X, cb: %#X, cr: %#X\n",
  ^

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:49:35 -03:00
Mauro Carvalho Chehab 4966bac19c [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits
There are several errors related to size_t size and the usage of
unsigned int for pointers:

drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_alloc_codec_buffers_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:103:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
   mfc_debug(2, "recon luma size: %d chroma size: %d\n",
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:103:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_set_dec_frame_buffer_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:472:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
   mfc_debug(2, "Luma %d: %x\n", i,
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:476:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
   mfc_debug(2, "\tChroma %d: %x\n", i,
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:490:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=]
    mfc_debug(2, "\tBuf1: %x, size: %d\n",
    ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:498:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=]
  mfc_debug(2, "Buf1: %u, buf_size1: %d (frames %d)\n",
  ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_set_enc_ref_buffer_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:596:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=]
  mfc_debug(2, "Buf1: %u, buf_size1: %d (ref frames %d)\n",
  ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_write_info_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:1883:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  writel(data, (volatile void __iomem *)ofs);
               ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_read_info_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:1893:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ret = readl((volatile void __iomem *)ofs);
              ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_get_pic_type_top_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2022:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   (__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_top);
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_get_pic_type_bot_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2028:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   (__force unsigned int) ctx->dev->mfc_regs->d_ret_picture_tag_bot);
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_get_crop_info_h_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2034:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   (__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info1);
   ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c: In function ‘s5p_mfc_get_crop_info_v_v6’:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2040:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   (__force unsigned int) ctx->dev->mfc_regs->d_display_crop_info2);

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:48:00 -03:00
Mauro Carvalho Chehab e13f7d5aec [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
When compiled on x86_64, several warnings popup:

drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:476:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:480:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:485:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:493:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:570:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:570:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:609:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:609:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:640:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:640:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:666:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
drivers/media//platform/s5p-mfc/s5p_mfc_opr_v5.c:666:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:59 -03:00
Mauro Carvalho Chehab dc11ef78e7 [media] s5p_mfc_opr_v6: remove address space removal warnings
Smatch still has 3 warnings for s5p_mfc_opr_v6:

drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2028:18: warning: cast removes address space of expression
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2034:18: warning: cast removes address space of expression
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:2040:18: warning: cast removes address space of expression

Remove them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:50 -03:00
Mauro Carvalho Chehab b5e4d33070 [media] s5p_mfc_opr_v6: fix wrong type for registers
As reported by smatch, there are several warnings related to bad
types for registers. Worse than that, there are too many errors,
preventing smatch to warn about real issues. So, fix them:

drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:414:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:414:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:414:35:    got void *const d_stream_data_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:415:34: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:415:34:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:415:34:    got void *const d_cpb_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:416:39: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:416:39:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:416:39:    got void *const d_cpb_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:417:40: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:417:40:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:417:40:    got void *const d_cpb_buffer_offset
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:441:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:441:46:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:441:46:    got void *const d_num_dpb
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:442:40: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:442:40:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:442:40:    got void *const d_first_plane_dpb_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:443:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:443:42:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:443:42:    got void *const d_second_plane_dpb_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:445:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:445:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:445:35:    got void *const d_scratch_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:446:47: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:446:47:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:446:47:    got void *const d_scratch_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:450:33: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:450:33:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:450:33:    got void *const d_first_plane_dpb_stride_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:452:33: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:452:33:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:452:33:    got void *const d_second_plane_dpb_stride_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:460:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:460:46:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:460:46:    got void *const d_mv_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:461:47: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:461:47:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:461:47:    got void *const d_num_mv
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:475:61: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:475:61:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:475:61:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:479:62: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:479:62:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:479:62:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:492:65: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:492:65:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:492:65:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:505:38: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:505:38:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:505:38:    got void *const instance_id
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:520:30: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:520:30:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:520:30:    got void *const e_stream_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:521:30: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:521:30:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:521:30:    got void *const e_stream_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:535:32: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:535:32:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:535:32:    got void *const e_source_first_plane_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:536:32: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:536:32:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:536:32:    got void *const e_source_second_plane_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:549:33: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:549:33:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:549:33:    got void *const e_encoded_source_first_plane_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:550:33: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:550:33:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:550:33:    got void *const e_encoded_source_second_plane_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:552:42: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:552:42:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:552:42:    got void *const e_recon_luma_dpb_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:553:42: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:553:42:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:553:42:    got void *const e_recon_chroma_dpb_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:575:56: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:575:56:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:575:56:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:577:58: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:577:58:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:577:58:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:579:57: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:579:57:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:579:57:    got void *
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:585:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:585:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:585:35:    got void *const e_scratch_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:586:47: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:586:47:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:586:47:    got void *const e_scratch_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:590:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:590:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:590:35:    got void *const e_tmv_buffer0
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:592:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:592:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:592:35:    got void *const e_tmv_buffer1
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:603:38: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:603:38:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:603:38:    got void *const instance_id
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:619:41: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:619:41:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:619:41:    got void *const e_mslice_mode
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:621:52: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:621:52:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:621:52:    got void *const e_mslice_size_mb
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:624:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:624:54:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:624:54:    got void *const e_mslice_size_bits
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:626:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:626:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:626:37:    got void *const e_mslice_size_mb
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:627:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:627:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:627:37:    got void *const e_mslice_size_bits
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:643:40: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:643:40:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:643:40:    got void *const e_frame_width
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:645:41: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:645:41:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:645:41:    got void *const e_frame_height
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:648:40: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:648:40:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:648:40:    got void *const e_cropped_frame_width
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:650:41: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:650:41:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:650:41:    got void *const e_cropped_frame_height
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:652:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:652:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:652:29:    got void *const e_frame_crop_offset
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:657:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:657:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:657:29:    got void *const e_gop_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:665:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:665:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:665:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:669:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:669:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:669:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:673:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:673:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:673:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:679:45: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:679:45:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:679:45:    got void *const e_ir_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:680:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:680:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:680:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:685:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:685:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:685:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:688:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:688:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:688:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:690:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:690:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:690:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:695:37: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:695:37:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:695:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:697:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:697:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:697:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:699:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:699:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:699:37:    got void *const pixel_format
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:702:37: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:702:37:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:702:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:704:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:704:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:704:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:706:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:706:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:706:37:    got void *const pixel_format
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:709:37: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:709:37:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:709:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:711:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:711:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:711:37:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:713:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:713:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:713:37:    got void *const pixel_format
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:718:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:718:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:718:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:720:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:720:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:720:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:723:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:723:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:723:29:    got void *const e_padding_ctrl
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:734:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:734:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:734:37:    got void *const e_padding_ctrl
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:741:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:741:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:741:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:746:33: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:746:33:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:746:33:    got void *const e_rc_bit_rate
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:748:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:748:35:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:748:35:    got void *const e_rc_bit_rate
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:753:43: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:753:43:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:753:43:    got void *const e_rc_mode
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:755:43: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:755:43:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:755:43:    got void *const e_rc_mode
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:759:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:759:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:759:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:766:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:766:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:766:29:    got void *const e_enc_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:769:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:769:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:769:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:771:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:771:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:771:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:775:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:775:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:775:29:    got void *const e_mv_hor_range
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:778:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:778:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:778:29:    got void *const e_mv_ver_range
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:780:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:780:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:780:29:    got void *const e_frame_insertion
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:781:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:781:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:781:29:    got void *const e_roi_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:782:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:782:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:782:29:    got void *const e_param_change
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:783:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:783:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:783:29:    got void *const e_rc_roi_ctrl
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:784:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:784:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:784:29:    got void *const e_picture_tag
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:786:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:786:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:786:29:    got void *const e_bit_count_enable
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:787:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:787:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:787:29:    got void *const e_max_bit_count
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:788:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:788:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:788:29:    got void *const e_min_bit_count
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:790:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:790:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:790:29:    got void *const e_metadata_buffer_addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:791:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:791:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:791:29:    got void *const e_metadata_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:812:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:812:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:812:29:    got void *const e_gop_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:815:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:815:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:815:29:    got void *const e_gop_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:823:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:823:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:823:29:    got void *const e_picture_profile
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:826:29: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:826:29:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:826:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:830:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:830:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:830:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:835:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:835:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:835:29:    got void *const e_rc_config
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:843:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:843:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:843:29:    got void *const e_rc_qp_bound
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:846:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:846:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:846:29:    got void *const e_fixed_picture_qp
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:852:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:852:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:852:37:    got void *const e_fixed_picture_qp
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:860:37: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:860:37:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:860:37:    got void *const e_rc_frame_rate
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:867:41: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:867:41:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:867:41:    got void *const e_vbv_buffer_size
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:870:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:870:54:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:870:54:    got void *const e_vbv_init_delay
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:876:29: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:876:29:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:876:29:    got void *const e_h264_options
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:881:41: warning: too many warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:49 -03:00
Mauro Carvalho Chehab d7fa7b0e5f [media] s5p_mfc_opr_v5: fix smatch warnings
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:266:23: warning: incorrect type in argument 2 (different modifiers)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:266:23:    expected void volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:266:23:    got void const volatile [noderef] <asn:2>*<noident>
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:274:36: warning: incorrect type in argument 1 (different address spaces)
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:274:36:    expected void const volatile [noderef] <asn:2>*addr
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:274:36:    got void *

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:49 -03:00
Mauro Carvalho Chehab ca5ea0c5df [media] s5p_mfc: use static for some structs
drivers/media/platform/s5p-mfc/s5p_mfc.c:1334:28: warning: symbol 'mfc_buf_size_v5' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1341:25: warning: symbol 'buf_size_v5' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1347:26: warning: symbol 'mfc_buf_align_v5' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1360:28: warning: symbol 'mfc_buf_size_v6' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1368:25: warning: symbol 'buf_size_v6' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1374:26: warning: symbol 'mfc_buf_align_v6' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1392:28: warning: symbol 'mfc_buf_size_v7' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1400:25: warning: symbol 'buf_size_v7' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1406:26: warning: symbol 'mfc_buf_align_v7' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1419:28: warning: symbol 'mfc_buf_size_v8' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1427:25: warning: symbol 'buf_size_v8' was not declared. Should it be static?
drivers/media/platform/s5p-mfc/s5p_mfc.c:1433:26: warning: symbol 'mfc_buf_align_v8' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:48 -03:00
Ulf Hansson c5d28e2983 [media] coda: Improve runtime PM support
For several reasons it's good practice to leave devices in runtime PM
active state while those have been probed.

In this cases we also want to prevent the device from going inactive,
until the firmware has been completely installed, especially when using
a PM domain.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:48 -03:00
Sjoerd Simons 7c672812fe [media] s5p-mfc: Use decode status instead of display status on MFCv5
Commit 90c0ae5009 changed how the frame_type of a decoded frame
gets determined, by switching from the get_dec_frame_type to
get_disp_frame_type operation. Unfortunately it seems that on MFC v5 the
result of get_disp_frame_type is always 0 (no display) when decoding
(tested with H264), resulting in no frame ever being output from the
decoder.

This patch reverts MFC v5 to the previous behaviour while keeping the
new behaviour for v6 and up.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:47 -03:00
ayaka 7e8fe13dc3 [media] s5p-mfc: fix enum_fmt for s5p-mfc
As the s5p-mfc is a driver which use  multiplanar api, so the
vidioc_enum_fmt_vid serial of ioctl should only for
multiplanar, non-multiplanar shouldn't be implemented at all.

Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:47 -03:00
Kamil Debski e2c3be2aff [media] s5p-mfc: Fix sparse errors in the MFC driver
The following error: "error: incompatible types in conditional expression
(different base types)" was reported multiple times for the s5p-mfc
driver. This error was caused by two macro definitions - s5p_mfc_hw_call
(in s5p_mfc_common.h) and WRITEL (in s5p_mfc_opr_v6.c).

In the former case the macro assumed that all ops return a value, but some
ops return void. The solution to this problem was the addition of a
s5p_mfc_hw_call_void macro.

In the latter case the macro used the ?: construction to check whether
the address is non zero. This is not necessary after the driver left the
development and debugging cycle, so the READL and WRITEL macros were
removed.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:46 -03:00
Zhaowei Yuan 9aee8b80a8 [media] s5p_mfc: unify variable naming style
Variable frame_size represents the size of plane luminance
here, not just frame size, its naming style should be unified
as frame_size_ch and frame_size_mv.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:46 -03:00
Zhaowei Yuan 00684dab28 [media] s5p_mfc: correct the loop condition
It should take ctx->dst_fmt->num_planes as
the loop condition for CAPTURE.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:45 -03:00
Kazunori Kobayashi c710f591a6 [media] soc_camera: Support VIDIOC_EXPBUF ioctl
This patch allows for exporting a dmabuf descriptor from soc_camera drivers.

Signed-off-by: Kazunori Kobayashi <kkobayas@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:44 -03:00
Dan Carpenter 5d6de11c33 [media] mx2-camera: potential negative underflow bug
My static checker complains:

	drivers/media/platform/soc_camera/mx2_camera.c:1070
	mx2_emmaprp_resize() warn: no lower bound on 'num'

The heuristic is that it's looking for values which the user can
influence and we put an upper bound on them but we (perhaps
accidentally) allow negative numbers.

I am not very familiar with this code but I have looked at it and think
there might be a bug.  Making the variable unsigned seems like a safe
option either way and this silences the static checker warning.

The call tree is:
  -> subdev_do_ioctl()
     -> mx2_camera_set_fmt()
        -> mx2_emmaprp_resize()
The check:
	if (num > RESIZE_NUM_MAX)
can underflow and then we use "num" on the else path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:43 -03:00
Sergei Shtylyov 197a47f2d5 [media] rcar_vin: fix error message in rcar_vin_get_formats()
The dev_err() call is supposed to output <width>x<height> in decimal but one of
the format specifiers is "%x" instead of "%u" (most probably due  to a typo).

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:43 -03:00
Dan Carpenter 692f637522 [media] davinci: remove an unneeded check
We don't need to check "ret", we know it's zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23 16:13:45 -03:00
Jingoo Han 1eb9604705 [media] v4l: ti-vpe: Remove casting the return value which is a void pointer
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22 19:21:08 -03:00
Fengguang Wu 47c0b565ec [media] vpfe_standards[] can be static
make vpfe_standards[] static.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22 19:19:23 -03:00
Julia Lawall 1148f6fdb0 [media] v4l: ti-vpe: use c99 initializers in structures
Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22 18:17:08 -03:00
Hans Verkuil 62f28725a8 [media] vivid: add teletext support to VBI capture
This is useful to test teletext capture applications like alevt and mtt.

It also fixes a previously undetected bug where the PAL VBI start line
of the second field was off by one. Using the new field start defines
helps a lot fixing such bugs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:40:05 -03:00
Prabhakar Lad 7000e325de [media] media: davinci: remove unneeded dependency ARCH_OMAP3
this patch removes unneeded dependency of ARCH_OMAP3
on VIDEO_DM6446_CCDC.
Also the top level platform Makefile descended into
davinci/ without any dependency so just drop the
dependency obj-y, as obj-$(CONFIG_ARCH_DAVINCI)
already exists.

Reported-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:17:22 -03:00
Prabhakar Lad c54d4a0b08 [media] media: davinci: vpif_capture: fix the check on suspend/resume callbacks
It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:16:39 -03:00
Prabhakar Lad 815789244e [media] media: davinci: vpif_display: fix the check on suspend/resume callbacks
It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:16:18 -03:00
Prabhakar Lad 3b8a269b7d [media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVE
this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:14:33 -03:00
Prabhakar Lad 55d3b439ac [media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVE
this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:14:11 -03:00
Fabio Estevam c0aaf696d4 [media] coda: coda-bit: Include "<linux/slab.h>"
coda-bit uses kmalloc/kfree functions, so the slab header needs to be included
in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration]
drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 16:43:28 -03:00
Mauro Carvalho Chehab f5281fc81e [media] vpif: Fix compilation with allmodconfig
When vpif is compiled as module, those errors happen:

ERROR: "vpif_lock" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_lock" [drivers/media/platform/davinci/vpif_capture.ko] undefined!

That's because vpif_lock symbol is not exported.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-09 18:08:08 -03:00
Mauro Carvalho Chehab 8087c35fc4 [media] s5p-jpeg: Fix compilation with COMPILE_TEST
ERROR: "__bad_ndelay" [drivers/media/platform/s5p-jpeg/s5p-jpeg.ko] undefined!

That happens because asm-generic doesn't like any ndelay time
bigger than 20us.

Currently, usleep_range() couldn't simply be used, since
exynos4_jpeg_sw_reset() is called with a spinlock held.

So, let's use udelay() instead.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-09 18:08:07 -03:00
Mauro Carvalho Chehab 4228cd5682 [media] disable COMPILE_TEST for omap1_camera
This driver depends on a legacy OMAP DMA API. So, it won't
compile-test on other archs.

While we might add stubs to the functions, this is not a
good idea, as the hole API should be replaced.

So, for now, let's just remove COMPILE_TEST and wait for
some time for people to fix. If not fixed, then we'll end
by removing this driver as a hole.

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-09 18:07:39 -03:00
Hans Verkuil 73d8102298 [media] vivid: tpg_reset_source prototype mismatch
Replaced enum v4l2_field by u32, just as the prototype in the
header has.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:58 -03:00
Hans Verkuil 5754d0d586 [media] vivid: add missing includes
Fix kbuild test robot warnings about missing vmalloc.h and string.h
includes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:58 -03:00
Hans Verkuil 1d54b3a43c [media] vivid: remove duplicate and unused g/s_edid functions
I'm not sure how I missed this, but they should be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:57 -03:00
Mauro Carvalho Chehab 6cf77d18f6 [media] marvel-ccic: just return 0 instead of using a var
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:53 -03:00
Mauro Carvalho Chehab b80cefb415 [media] davinci: just return 0 instead of using a var
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Acked-by: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:30 -03:00
Mauro Carvalho Chehab d8e8b40c06 [media] s5p-tv: Simplify the return logic
Make sure pm_runtime_* calls does not use unnecessary
IS_ERR_VALUE().

Reported by scripts/coccinelle/api/pm_runtime.cocci script.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:27 -03:00
Mauro Carvalho Chehab b2617dc3eb [media] via-camera: simplify boolean tests
Instead of using if (foo == false), just use
if (!foo).

That allows a faster mental parsing when analyzing the
code.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:26 -03:00
Mauro Carvalho Chehab 160ac0babc [media] omap: simplify test logic
instead of testing bools if they are false or true, just use
if (!foo) or if (foo). That makes the code easier to
read and shorter.

Also, properly initialize booleans with true or false.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:25 -03:00
Mauro Carvalho Chehab 6c515a44a8 [media] vivid-tpg: use true/false for boolean vars
Instead of using 0 or 1 for boolean, use the true/false
defines.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:19 -03:00
Mauro Carvalho Chehab 68bbbd7912 [media] ti-vpe: use true/false for boolean vars
Instead of using 0 or 1 for boolean, use the true/false
defines.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:19 -03:00
Mauro Carvalho Chehab 11b4c175d9 [media] omap3isp: use true/false for boolean vars
Instead of using 0 or 1 for boolean, use the true/false
defines.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:18 -03:00
Mauro Carvalho Chehab c611c908bb [media] soc_camera: remove uneeded semicolons
We don't use semicolons after curly braces in the middle of the
code.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:12 -03:00
Mauro Carvalho Chehab 0282969190 [media] vivid-vid-out: use memdup_user()
Instead of allocating and coping from __user, do it using
one atomic call. That makes the code simpler.

Found by coccinelle.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:58:56 -03:00
Mauro Carvalho Chehab 93623c87a3 [media] soc_camera: use kmemdup()
Instead of calling kzalloc and then copying, use kmemdup(). That
avoids zeroing the data structure before copying.

Found by coccinelle.

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:58:30 -03:00
Mauro Carvalho Chehab a7459a9d3a [media] marvel-ccic: don't initialize static vars with 0
alloc_bufs_at_read is static. No need to initialize with
zero, as the Kernel will cleanup the data memory already.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 16:12:33 -03:00
Hans Verkuil a7547af7d2 [media] via-camera: fix sparse warning
drivers/media/platform/via-camera.c:445:34: warning: incorrect type in assignment (different address spaces)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:31:30 -03:00
Bartlomiej Zolnierkiewicz 4bf167a373 [media] v4l: vsp1: fix driver dependencies
Renesas VSP1 Video Processing Engine support should be available
only on Renesas ARM SoCs.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:10:24 -03:00
Jacek Anaszewski 5da74fc66b [media] s5p-jpeg: fix HUF_TBL_EN bit clearing path
Use proper bitwise operator while clearing HUF_TBL_EN bit.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:08:34 -03:00
Jacek Anaszewski d727ff4241 [media] s5p-jpeg: avoid overwriting JPEG_CNTL register settings
Take into account the JPEG_CNTL register value read before
setting SYS_INT_EN bit field.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:08:14 -03:00
Jacek Anaszewski 37a4bd757c [media] s5p-jpeg: remove stray call to readl
There is no need to read INT_EN_REG before enabling interrupts.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:07:50 -03:00
Jacek Anaszewski 0cd9b21ed5 [media] s5p-jpeg: Avoid assigning readl result
Avoid gcc warning when -Wunused-but-set-variable is enabled.
The readl return value need not to be assigned to any variable
as the reading itself is just a part of a sequence required
for clearing the interrupt flag.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:07:25 -03:00
Marek Szyprowski 0c2272170d [media] media: s5p-mfc: rename special clock to sclk_mfc
Commit d19f405a5a ("[media] s5p-mfc: Fix
selective sclk_mfc init") added support for special clock handling
(named "sclk-mfc"). However this clock is not defined yet on any
platform, so before adding it to all Exynos platform, better rename it
to "sclk_mfc" to match the scheme used for all other special clocks on
Exynos platform.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:05:56 -03:00
Zhaowei Yuan e47ccb1de5 [media] media: s5p-mfc: correct improper logs
This patch corrects improper logs within the code initializing hardware.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:03:57 -03:00
Zhaowei Yuan 6c5c680b85 [media] media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm
ctx->ctx should be released if the following allocation for ctx->shm
gets failed.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:03:32 -03:00
Mauro Carvalho Chehab 6c1c423a54 [media] vivid: comment the unused g_edid/s_edid functions
Those non-static functions aren't used anywhere yet. Comment them
while they're unused.

Solves the following warnings:

drivers/media/platform/vivid/vivid-vid-out.c:1120:5: warning: no previous prototype for 'vivid_vid_out_g_edid' [-Wmissing-prototypes]
 int vivid_vid_out_g_edid(struct file *file, void *_fh,
     ^
drivers/media/platform/vivid/vivid-vid-out.c:1152:5: warning: no previous prototype for 'vivid_vid_out_s_edid' [-Wmissing-prototypes]
 int vivid_vid_out_s_edid(struct file *file, void *_fh,
     ^

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 18:01:05 -03:00
Mauro Carvalho Chehab 20504fa92d [media] vivid: Don't declare .vidioc_overlay twice
Removes the following warnings:

drivers/media/platform/vivid/vivid-core.c:581:2: warning: initialized field overwritten [-Woverride-init]
  .vidioc_overlay   = vidioc_overlay,
  ^
drivers/media/platform/vivid/vivid-core.c:581:2: warning: (near initialization for 'vivid_ioctl_ops.vidioc_overlay') [-Woverride-init]

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:58:59 -03:00
Mauro Carvalho Chehab 96ec7d2a66 [media] vivid: add some missing headers
That remove a few warnings:

drivers/media/platform/vivid/vivid-kthread-out.c:226:5: warning: no previous prototype for 'vivid_start_generating_vid_out' [-Wmissing-prototypes]
 int vivid_start_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
     ^
drivers/media/platform/vivid/vivid-kthread-out.c:260:6: warning: no previous prototype for 'vivid_stop_generating_vid_out' [-Wmissing-prototypes]
 void vivid_stop_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
      ^
drivers/media/platform/vivid/vivid-kthread-cap.c:806:5: warning: no previous prototype for 'vivid_start_generating_vid_cap' [-Wmissing-prototypes]
 int vivid_start_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
     ^
drivers/media/platform/vivid/vivid-kthread-cap.c:841:6: warning: no previous prototype for 'vivid_stop_generating_vid_cap' [-Wmissing-prototypes]
 void vivid_stop_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:57:34 -03:00
Hans Verkuil 077af28c63 [media] vivi: remove driver, it's replaced by vivid
The vivid driver is a vastly superior test driver, so just drop the old
vivi driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:54:13 -03:00
Hans Verkuil e75420dd25 [media] vivid: enable the vivid driver
Update the Kconfig and Makefile files so this driver can be compiled.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:54:12 -03:00
Mauro Carvalho Chehab 1fc78bc9d4 [media] vivid: Don't mess with namespace adding a "get_format" function
This fixes a compilation error with allyesconfig:

drivers/media/platform/exynos-gsc/built-in.o: In function `get_format':
(.text+0x12f5): multiple definition of `get_format'
drivers/media/platform/vivid/built-in.o:(.text+0x4bf4): first defined here

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:54:07 -03:00
Hans Verkuil 6de8653f41 [media] vivid: add support for software defined radio
This adds support for an SDR capture device. It generates simple
sine/cosine waves. The code for that has been contributed by
Antti.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:48:13 -03:00
Hans Verkuil 55d58e9898 [media] vivid: add support for radio receivers and transmitters
This adds radio receiver and transmitter support. Part of that is common
to both and so is placed in the radio-common source.

These drivers also support RDS. In order to generate valid RDS data a
simple RDS generator is implemented in rds-gen.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:47:03 -03:00
Hans Verkuil 63881df94d [media] vivid: add the Test Pattern Generator
The test patterns for video capture are generated by this code. All patterns
are precalculated taking into account colorspace information, pixel and video
aspect ratios and scaling information.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:46:05 -03:00
Hans Verkuil ad4e02d508 [media] vivid: add a simple framebuffer device for overlay testing
In order to test capture and output overlays a simple framebuffer
device is created. It's bare bone, but it does the job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:42:53 -03:00
Hans Verkuil 3f682ffcf9 [media] vivid: add the kthread code that controls the video rate
Add the kthread handlers for video/vbi capture and video/vbi output.
These carefully control the rate at which frames are generated (video
capture) and accepted (video output). While the short-term jitter is
around the order of a jiffie, in the long term the rate matches the
configured framerate exactly.

The capture thread handler also takes care of the video looping and
of capture and overlay support. This is probably the most complex part
of this driver due to the many combinations of crop, compose and scaling
on the input and output, and the blending that has to be done if
overlay support is enabled as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:41:54 -03:00
Hans Verkuil 7bb70caa3b [media] vivid: add VBI capture and output code
This adds support for VBI capture (raw and sliced) and VBI output
(raw and sliced) to the vivid driver. In addition a VBI generator
is added that generates simple VBI data in either sliced or raw
format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:19:27 -03:00
Hans Verkuil ef834f7836 [media] vivid: add the video capture and output parts
This adds the ioctl and vb2 queue support for video capture and output.
Part of this is common to both, so that is placed in a vid-common source.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:15:26 -03:00
Hans Verkuil 73c3f48230 [media] vivid: add the control handling code
The vivid-ctrls code sets up and processes the various V4L2 controls
that are needed by this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:07:44 -03:00
Hans Verkuil c88a96b023 [media] vivid: add core driver code
This is the core driver code that creates all the driver instances
and all the configured devices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:03:26 -03:00
Mauro Carvalho Chehab 38a0731165 [media] omap: be sure that MMU is there for COMPILE_TEST
COMPILE_TEST fail on (some) archs without MMU.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:20 -03:00
Mauro Carvalho Chehab 12bd88e62c [media] be sure that HAS_DMA is enabled for vb2-dma-contig
vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take
it into account at select.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:19 -03:00
Mauro Carvalho Chehab 7155043c2d [media] enable COMPILE_TEST for media drivers
There are several arch-specific media drivers that don't
require asm-specific includes and can be successfully
compiled on x86. Add COMPILE_TEST dependency for them, in
order to allow a broader test on those drivers.

That helps static analysis tools like Coverity to discover
eventual troubles there.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:19 -03:00
Mauro Carvalho Chehab 1dbfacf2dd [media] enable COMPILE_TEST for OMAP2 vout
We don't need anything special to enable COMPILE_TEST for
this driver.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:18 -03:00
Mauro Carvalho Chehab f2080e3881 [media] allow COMPILE_TEST for SAMSUNG_EXYNOS4_IS
That helps some static checks, so enable it. While there, it was
noticed that linux/sizes.h was missing:

drivers/media/platform/exynos4-is/mipi-csis.c: In function ‘s5pcsis_s_rx_buffer’:
drivers/media/platform/exynos4-is/mipi-csis.c:114:31: error: ‘SZ_4K’ undeclared (first use in this function)
 #define S5PCSIS_PKTDATA_SIZE  SZ_4K
                               ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:18 -03:00
Mauro Carvalho Chehab f3334180d4 [media] enable COMPILE_TEST for ti-vbe
Allowing COMPILE_TEST here is trivial, but there's one missing
header to be added:

drivers/media/platform/ti-vpe/vpe.c: In function ‘vpe_probe’:
drivers/media/platform/ti-vpe/vpe.c:2266:56: error: ‘SZ_32K’ undeclared (first use in this function)
  dev->base = devm_ioremap(&pdev->dev, dev->res->start, SZ_32K);
                                                        ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:17 -03:00
Mauro Carvalho Chehab 1c17d8c748 [media] enable COMPILE_TEST for MX2 eMMa-PrP driver
By allowing compilation on all archs, we can use static
analysis tools to test this driver.

In order to do that, replace asm/sizes.h by its generic
name (linux/sizes.h), with should keep doing the right
thing.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:16 -03:00
Mauro Carvalho Chehab c438269948 [media] s5p-jpeg: Get rid of a warning
drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c: In function 's5p_jpeg_clear_int':
drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c:327:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
  unsigned long reg;
                ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:15 -03:00
Mauro Carvalho Chehab b91677ad09 [media] atmel-isi: get rid of a warning
drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming':
drivers/media/platform/soc_camera/atmel-isi.c:387:6: warning: variable 'sr' set but not used [-Wunused-but-set-variable]
  u32 sr = 0;
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:15 -03:00
Mauro Carvalho Chehab 615f1bcb34 [media] mx2_camera: get rid of a warning
drivers/media/platform/soc_camera/mx2_camera.c: In function 'mx27_camera_emma_prp_reset':
drivers/media/platform/soc_camera/mx2_camera.c:812:6: warning: variable 'cntl' set but not used [-Wunused-but-set-variable]
  u32 cntl;
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:14 -03:00
Mauro Carvalho Chehab cdf58a6f87 [media] exynos4-is/media-dev: get rid of a warning for a dead code
drivers/media/platform/exynos4-is/media-dev.c: In function 'fimc_md_link_notify':
drivers/media/platform/exynos4-is/media-dev.c:1102:4: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
    ; /* TODO: Link state change validation */
    ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:14 -03:00
Mauro Carvalho Chehab 84ddba456e [media] mipi-csis: get rid of a warning
drivers/media/platform/exynos4-is/mipi-csis.c: In function 's5pcsis_parse_dt':
drivers/media/platform/exynos4-is/mipi-csis.c:756:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  if (state->index < 0 || state->index >= CSIS_MAX_ENTITIES)
  ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:13 -03:00
Mauro Carvalho Chehab 8492ec6980 [media] s5p_mfc: get rid of several warnings
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:826:5: warning: no previous prototype for 'vidioc_decoder_cmd' [-Wmissing-prototypes]
 int vidioc_decoder_cmd(struct file *file, void *priv,
     ^
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function 's5p_mfc_runtime_resume':
drivers/media/platform/s5p-mfc/s5p_mfc.c:1314:6: warning: variable 'pre_power' set but not used [-Wunused-but-set-variable]
  int pre_power;
      ^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c:163:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v5' [-Wmissing-prototypes]
 struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void)
                         ^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c:156:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v6' [-Wmissing-prototypes]
 struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void)
                         ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c: In function 's5p_mfc_run_dec_frame':
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:1189:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
  unsigned int index;
               ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: In function 'cleanup_ref_queue':
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:27: warning: variable 'mb_c_addr' set but not used [-Wunused-but-set-variable]
  unsigned long mb_y_addr, mb_c_addr;
                           ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:16: warning: variable 'mb_y_addr' set but not used [-Wunused-but-set-variable]
  unsigned long mb_y_addr, mb_c_addr;
                ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: At top level:
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1684:5: warning: no previous prototype for 'vidioc_encoder_cmd' [-Wmissing-prototypes]
 int vidioc_encoder_cmd(struct file *file, void *priv,
     ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:13 -03:00
Mauro Carvalho Chehab b171e3d851 [media] s5p_mfc_ctrl: add missing s5p_mfc_ctrl.h header
That gets rid of the following warnings:

drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:119:5: warning: no previous prototype for 's5p_mfc_release_firmware' [-Wmissing-prototypes]
 int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:132:5: warning: no previous prototype for 's5p_mfc_reset' [-Wmissing-prototypes]
 int s5p_mfc_reset(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:214:5: warning: no previous prototype for 's5p_mfc_init_hw' [-Wmissing-prototypes]
 int s5p_mfc_init_hw(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:291:6: warning: no previous prototype for 's5p_mfc_deinit_hw' [-Wmissing-prototypes]
 void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev)
      ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:301:5: warning: no previous prototype for 's5p_mfc_sleep' [-Wmissing-prototypes]
 int s5p_mfc_sleep(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:330:5: warning: no previous prototype for 's5p_mfc_wakeup' [-Wmissing-prototypes]
 int s5p_mfc_wakeup(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:378:5: warning: no previous prototype for 's5p_mfc_open_mfc_inst' [-Wmissing-prototypes]
 int s5p_mfc_open_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:420:6: warning: no previous prototype for 's5p_mfc_close_mfc_inst' [-Wmissing-prototypes]
 void s5p_mfc_close_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:12 -03:00
Mauro Carvalho Chehab 2ff1d4c13b [media] fimc-is-param: get rid of warnings
In file included from drivers/media/platform/exynos4-is/fimc-is-param.c:31:0:
drivers/media/platform/exynos4-is/fimc-is-errno.h:245:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const char * const fimc_is_strerr(unsigned int error);
                    ^
drivers/media/platform/exynos4-is/fimc-is-errno.h:246:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const char * const fimc_is_param_strerr(unsigned int error);
                    ^
drivers/media/platform/exynos4-is/fimc-is-param.c: In function 'fimc_is_set_initial_params':
drivers/media/platform/exynos4-is/fimc-is-param.c:670:23: warning: variable 'sensor' set but not used [-Wunused-but-set-variable]
  struct sensor_param *sensor;
                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:12 -03:00
Mauro Carvalho Chehab dc916aa78a [media] g2d: remove unused var
drivers/media/platform/s5p-g2d/g2d.c: In function 'job_abort':
drivers/media/platform/s5p-g2d/g2d.c:493:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^

The job_abort function returns void. No sense to get the
returned argument, if this won't be used.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:11 -03:00
Mauro Carvalho Chehab af425be8b5 [media] s5p-jpeg: get rid of some warnings
Declare this as static:

drivers/media/platform/s5p-jpeg/jpeg-core.c:732:6: warning: no previous prototype for 'exynos4_jpeg_set_huff_tbl' [-Wmissing-prototypes]
 void exynos4_jpeg_set_huff_tbl(void __iomem *base)
      ^

And don't compile this dead code, while not needed:
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c:236:14: warning: no previous prototype for 'exynos3250_jpeg_get_y' [-Wmissing-prototypes]
 unsigned int exynos3250_jpeg_get_y(void __iomem *regs)
              ^
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c:241:14: warning: no previous prototype for 'exynos3250_jpeg_get_x' [-Wmissing-prototypes]
 unsigned int exynos3250_jpeg_get_x(void __iomem *regs)
              ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:10 -03:00
Mauro Carvalho Chehab 52334bb3df [media] omap_vout: Get rid of a few warnings
drivers/media/platform/omap/omap_vout.c: In function 'omapvid_setup_overlay':
drivers/media/platform/omap/omap_vout.c:372:29: warning: variable 'pixheight' set but not used [-Wunused-but-set-variable]
  int cropheight, cropwidth, pixheight, pixwidth;
                             ^
drivers/media/platform/omap/omap_vout.c: In function 'vidioc_s_ctrl':
drivers/media/platform/omap/omap_vout.c:1454:24: warning: variable 'ovl' set but not used [-Wunused-but-set-variable]
   struct omap_overlay *ovl;
                        ^
drivers/media/platform/omap/omap_vout.c: In function 'vidioc_reqbufs':
drivers/media/platform/omap/omap_vout.c:1492:55: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) || (req->count < 0))
                                                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:10 -03:00
Mauro Carvalho Chehab 92e3919a49 [media] omap: fix compilation if !VIDEO_OMAP2_VOUT_VRFB
When CONFIG_VIDEO_OMAP2_VOUT_VRFB is disabled, the compilation
will fail, as the function stubs are wrong. Also, as they weren't
declared as static inline, lots of warnings will be generated.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:05 -03:00
Mauro Carvalho Chehab 286da99022 [media] gsc: Use %pad for dma_addr_t
drivers/media/platform/exynos-gsc/gsc-core.c:855:2: note: in expansion of macro 'pr_debug'
  pr_debug("ADDR: y= 0x%X  cb= 0x%X cr= 0x%X ret= %d",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'dma
_addr_t' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:04 -03:00
Mauro Carvalho Chehab 8dece35daf [media] dm644x_ccdc: use unsigned long for fpc_table_addr
The fpc_table_addr is used as an unsigned integer that stores
an address. At the Kernel, the proper type for such integers
is unsigned long.

This generates lots of warnings when compiling on 64 bits.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:03 -03:00
Mauro Carvalho Chehab 212bdba387 [media] vpif: don't cast pointers to int
Shut up several warnings about invalid casting when printing
the values of two pointers.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:03 -03:00
Mauro Carvalho Chehab 139adba64c [media] s5p_mfc: don't use an external symbol called 'debug'
The 'debug' name is known to cause conflicts with allyesconfig
on several archs. So, localize its name.

>> drivers/built-in.o:(.bss+0xc7ee2c): multiple definition of `debug'
   arch/x86/built-in.o:(.entry.text+0xf78): first defined here
   ld: Warning: size of symbol `debug' changed from 86 in arch/x86/built-in.o to 4 in drivers/built-in.o

While here, fix a wrong file name reference

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:02 -03:00
Mauro Carvalho Chehab 9842a417d4 [media] atmel-isi: Fix a truncate warning
drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming':
   drivers/media/platform/soc_camera/atmel-isi.c:397:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     isi_writel(isi, ISI_INTDIS, ~0UL);
                             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:02 -03:00
Mauro Carvalho Chehab 8f05232f59 [media] atmel-isi: tag dma_addr_t as such
Instead of using u32 for DMA address, use the proper
Kernel type for it.

   drivers/media/platform/soc_camera/atmel-isi.c: In function 'atmel_isi_probe':
>> drivers/media/platform/soc_camera/atmel-isi.c:981:26: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type
     isi->p_fb_descriptors = dma_alloc_coherent(&pdev->dev,
                             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:01 -03:00
Mauro Carvalho Chehab 14bb9b0485 [media] ti-vpe: shut up a casting warning message
drivers/media/platform/ti-vpe/vpdma.c: In function 'vpdma_alloc_desc_buf':
>> drivers/media/platform/ti-vpe/vpdma.c:332:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     WARN_ON((u32) buf->addr & VPDMA_DESC_ALIGN);
             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:01 -03:00
Mauro Carvalho Chehab 78e100cb23 [media] ti-vpe: use %pad for dma address
drivers/media/platform/ti-vpe/vpdma.c: In function 'dump_dtd':
   include/linux/dynamic_debug.h:64:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat=]
     static struct _ddebug  __aligned(8)   \
                   ^
   include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
     DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
     ^
   include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^
>> drivers/media/platform/ti-vpe/vpdma.c:587:2: note: in expansion of macro 'pr_debug'
     pr_debug("word2: start_addr = 0x%08x\n", dtd->start_addr);
     ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:00 -03:00
Mauro Carvalho Chehab a6a6322868 [media] gsc-m2m: Remove an unused var.
drivers/media/platform/exynos-gsc/gsc-m2m.c: In function 'gsc_m2m_reqbufs':
drivers/media/platform/exynos-gsc/gsc-m2m.c:365:20: warning: variable 'frame' s
et but not used [-Wunused-but-set-variable]
  struct gsc_frame *frame;
                    ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:00 -03:00
Mauro Carvalho Chehab cff5621372 [media] gsc-core: Remove useless test
drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
drivers/media/platform/exynos-gsc/gsc-core.c:1089:2: warning: comparison is alw
ays false due to limited range of data type [-Wtype-limits]
  if (gsc->id < 0 || gsc->id >= drv_data->num_entities) {
  ^

gsc->id is declared as u16, so it should always be a positive
value.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:51:59 -03:00
Mauro Carvalho Chehab 0448056c7e [media] dm355_ccdc: declare a function as static
drivers/media/platform/davinci/dm355_ccdc.c:463:5: warning: no previous prototy
pe for 'ccdc_write_dfc_entry' [-Wmissing-prototypes]
 int ccdc_write_dfc_entry(int index, struct ccdc_vertical_dft *dfc)
     ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:51:59 -03:00
Mauro Carvalho Chehab f17513c9bf [media] dm644x_ccdc: declare some functions as static
drivers/media/platform/davinci/dm644x_ccdc.c:133:6: warning: no previous protot
ype for 'ccdc_setwin' [-Wmissing-prototypes]
 void ccdc_setwin(struct v4l2_rect *image_win,
      ^
drivers/media/platform/davinci/dm644x_ccdc.c:373:6: warning: no previous protot
ype for 'ccdc_config_ycbcr' [-Wmissing-prototypes]
 void ccdc_config_ycbcr(void)
      ^
drivers/media/platform/davinci/dm644x_ccdc.c:526:6: warning: no previous protot
ype for 'ccdc_config_raw' [-Wmissing-prototypes]
 void ccdc_config_raw(void)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:51:58 -03:00
Mauro Carvalho Chehab 24ab6338f3 [media] vpif_capture: get rid of some unused vars
drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_channel_isr':
drivers/media/platform/davinci/vpif_capture.c:376:18: warning: variable 'field'
 set but not used [-Wunused-but-set-variable]
  enum v4l2_field field;
                  ^
drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_calculate_offs
ets':
drivers/media/platform/davinci/vpif_capture.c:536:23: warning: variable 'vpitch
' set but not used [-Wunused-but-set-variable]
  unsigned int hpitch, vpitch, sizeimage;
                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:51:58 -03:00
Mauro Carvalho Chehab a4f20e2fbc [media] vpif_display: get rid of some unused vars
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_channel_isr':
drivers/media/platform/davinci/vpif_display.c:363:18: warning: variable 'field'
 set but not used [-Wunused-but-set-variable]
  enum v4l2_field field;
                  ^
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_calculate_offs
ets':
drivers/media/platform/davinci/vpif_display.c:505:23: warning: variable 'vpitch
' set but not used [-Wunused-but-set-variable]
  unsigned int hpitch, vpitch, sizeimage;
                       ^
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_set_output':
drivers/media/platform/davinci/vpif_display.c:816:27: warning: variable 'subdev
_info' set but not used [-Wunused-but-set-variable]
  struct vpif_subdev_info *subdev_info = NULL;

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:51:57 -03:00
Axel Lin c0d04f4026 [media] via-camera: Include media/v4l2-image-sizes.h
So we can remove the same defines in the driver code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:37 -05:00
Axel Lin 7c5a62e1ee [media] sh_veu: Include media/v4l2-image-sizes.h
So we can remove the same defines in the driver code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:37 -05:00
Philipp Zabel f23797b636 [media] coda: checkpatch cleanup
This patch breaks most long lines, concatenates broken up text strings,
and adds or removes parentheses where needed to make checkpatch happy.
The long codec list lines and a few 81-wide lines remain.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:26 -05:00
Philipp Zabel a188a668dd [media] coda: disable old cropping ioctls
Since we neither support composing on the OUTPUT side, nor cropping
on the CAPTURE side, disable VIDIOC_CROPCAP and VIDIOC_G/S_CROP
altogether. This silences a GStreamer warning when GStreamer tries
to obtain the pixel aspect ratio using VIDIOC_CROPCAP.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:26 -05:00
Philipp Zabel f95a6ce167 [media] coda: set capture frame size with output S_FMT
This patch makes coda_s_fmt_vid_out propagate the output frame size
to the capture side.
The GStreamer v4l2videodec only ever calls S_FMT on the output side
and then expects G_FMT on the capture side to return a valid format.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:26 -05:00
Philipp Zabel 2dc546d00c [media] coda: fix coda_s_fmt_vid_out
Set the context color space when s_fmt succeeded, not when it failed.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:26 -05:00
Philipp Zabel 18fd0cceb9 [media] coda: fix timestamp list handling
Lock modification of the timestamp list with bitstream_mutex and do not
try to remove a timestamp element if the list is empty. This can happen
if the userspace feeds us garbage or multiple encoded frames in a single
buffer.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:25 -05:00
Philipp Zabel 68fc31c5d2 [media] coda: improve allocation error messages
Produce some error messages when internal buffer allocation
fails, for example because the CMA region is too small.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:25 -05:00
Philipp Zabel d60b18ba31 [media] coda: add an intermediate debug level
Dumping all register accesses drowns other debugging messages
in the log. Add a less verbose debug level.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:25 -05:00
Philipp Zabel b0ed05b902 [media] coda: increase max vertical frame size to 1088
This patch increases the maximum vertical frame size reported
by enum_fmt and accepted by try_fmt/s_fmt from 1080 to 1088.
Since for 16x16-pixel macroblocks 1080p will be rounded up to
this anyway, we may as well admit that we support it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:25 -05:00
Philipp Zabel 8be31c898d [media] coda: allow running coda without iram on mx6dl
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:24 -05:00
Philipp Zabel fcf59764b9 [media] coda: skip calling coda_find_codec in encoder try_fmt_vid_out
We know that it will return NULL in this case, so we can just as well
skip it altogether.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:24 -05:00
Philipp Zabel 4a31b52fca [media] coda: dequeue buffers on streamoff
This is needed to decrease the q->owned_by_drv_count to zero before
__vb2_queue_cancel is called, to avoid the WARN_ON therein.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:24 -05:00
Philipp Zabel b906352c23 [media] coda: dequeue buffers if start_streaming fails
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:24 -05:00
Philipp Zabel 540b72e415 [media] coda: request BIT processor interrupt by name
Request the main coda interrupt using its name, "bit", if available.
Fall back to requesting the first interrupt for backwards compatibility.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:23 -05:00
Philipp Zabel 5727a5a4a1 [media] coda: remove unnecessary peek at next destination buffer from coda_finish_decode
The return value of this call to v4l2_m2m_next_dst_buf() is never used.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:23 -05:00
Philipp Zabel 2c3759d406 [media] coda: include header for memcpy
coda_h264_padding uses memcpy, we should include string.h for that.

Reported-by: Ian Jamison <ian.dev@arkver.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:23 -05:00
Philipp Zabel 79924ca9cf [media] coda: move BIT specific functions into separate file
This patch moves the BIT processor specific coda_context_ops, the firmware
upload and other related functions from coda-common.c into coda-bit.c.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:22 -05:00
Philipp Zabel 4f4ee9ee88 [media] coda: move H.264 helper function into separate file
Currently there is only the coda_h264_padding function, but
we will have to add more H.264 specific helpers later.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:22 -05:00
Philipp Zabel 58b7677db0 [media] coda: move per-instance buffer allocation and cleanup
This patch moves the context buffer allocation into the context start_streaming
callbacks. The context buffer and internal framebuffer cleanup is moved into
the context release callback.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:22 -05:00
Philipp Zabel 347bb7f019 [media] coda: add coda_bit_stream_set_flag helper
This adds a helper function to consolidate three occurences where
the bitstream parameter stream end flag is set during operation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:22 -05:00
Philipp Zabel 8a82c6ba2e [media] coda: move BIT processor command execution out of pic_run_work
In preparation for the split, move the AXI_SRAM_USE register access and the
PIC_RUN command execution out of pic_run_work into prepare_encode/decode.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:21 -05:00
Philipp Zabel a1192a17ee [media] coda: add context ops
Add a struct coda_context_ops that encapsulates context specific operations.
This will simplify adding JPEG support in the future and helps to avoid
exporting all functions individually when they move out of the main code
file.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:21 -05:00
Philipp Zabel a2b3e46acb [media] coda: move defines, enums, and structs into shared header
These will have to be shared between multiple code files.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:21 -05:00
Philipp Zabel e19a763950 [media] coda: move coda driver into its own directory
The coda driver has grown significantly and will continue to grow.
Move the coda driver into its own directory so it can be split.
Rename coda.h to coda_regs.h as it contains the register defines.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:21 -05:00
Philipp Zabel 814c376255 [media] coda: mark constant structures as such
The format and codec lists and the ops structures are read-only.
Mark them as const.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:20 -05:00
Philipp Zabel 4f31ff0102 [media] coda: default to h.264 decoder on invalid formats
If the user provides an invalid format, let the decoder device
default to h.264.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:20 -05:00
Philipp Zabel 22e244b813 [media] coda: split format enumeration for encoder end decoder device
Let the decoder capture side and encoder output side only list
uncompressed formats, and the decoder output and encoder capture
side only list compressed formats.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:20 -05:00
Philipp Zabel 121cacf445 [media] coda: split userspace interface into encoder and decoder device
Userspace has a hard time making sense of format enumerations on V4L2
mem2mem devices if there are restrictions on which input and output
formats can be used together. Alleviate the problem by splitting the
video4linux device into separate encoder and decoder devices which list
only raw formats on one side and only encoded formats on the other side.
With this patch, the instance type (encoder or decoder) is already
determined by the open file operation.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:20 -05:00
Philipp Zabel 91b5841e24 [media] coda: lock capture frame size to output frame size when streaming
As soon as the output queue is streaming, let try_fmt on the capture side
only allow the frame size that was set on the output side.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:19 -05:00
Michael Olbrich eabed931df [media] coda: delay coda_fill_bitstream()
coda_fill_bitstream() calls v4l2_m2m_buf_done() which is no longer allowed
before streaming was started.
Delay coda_fill_bitstream() until coda_start_streaming() and explicitly set
'start_streaming_called' before calling coda_fill_bitstream()

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:19 -05:00
Michael Olbrich 390503bdb4 [media] coda: use CODA_MAX_FRAME_SIZE everywhere
Without this changing CODA_MAX_FRAME_SIZE to anything other than 0x100000
can break the bitstram handling

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:19 -05:00
Philipp Zabel d29a8cf24d [media] coda: remove VB2_USERPTR from queue io_modes
Disallow USERPTR buffers, videobuf2-dma-contig doesn't support them.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:18 -05:00
Philipp Zabel 3898e7a72d [media] coda: remove CAPTURE and OUTPUT caps
This is a mem2mem driver, pure capture or output modes are not
supported.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:18 -05:00
Philipp Zabel 65919e6baa [media] coda: initialize hardware on pm runtime resume only if firmware available
If no firmware was found and the coda module is unloaded, coda_runtime_resume
will be called without an allocated code buffer. Do not call coda_hw_init in
this case.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:18 -05:00
Philipp Zabel ae5abd2561 [media] coda: fix CODA7541 hardware reset
Do not try to read the CODA960 GDI status register on CODA7541.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:18 -05:00
Laurent Pinchart cd73bb6c4e [media] omap3isp: resizer: Protect against races when updating crop
When updating the crop rectangle during streaming, the IRQ handler will
reprogram the resizer after the current frame. A race condition
currently exists between the set selection operation and the IRQ
handler: if the set selection operation is called twice in a row and the
IRQ handler runs only during the second call, it could reprogram the
hardware with partially updated values. Use a spinlock to protect
against that.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:17 -05:00
Laurent Pinchart d903a0a367 [media] omap3isp: resizer: Remove slow debugging message from interrupt handler
The resizer_set_input_size() function prints a debugging message with
the input width and height values. As the function is called from
interrupt context, printing that message to the serial console could
slow down the interrupt handler and cause it to miss the start of the
next frame, causing image corruption.

Fix this by reorganizing the resizer debug messages. The driver now
prints the input size, the crop rectangle and the output size in the set
selection handler instead of scattering debug messages in various
places.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:17 -05:00
Laurent Pinchart 41316a27ee [media] omap3isp: resizer: Remove needless variable initializations
There's no need to initialize local variables to zero when they're
explicitly assigned another value right after. Remove the needless
initializations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:17 -05:00
Laurent Pinchart ca84ea49f8 [media] omap3isp: ccdc: Restart the CCDC immediately after an underrun in BT.656
As the CCDC doesn't generate interrupts when stopped in BT.656 mode,
restart it immediately when the next buffer after an underrun is queued
instead of relying on the interrupt handler to restart the CCDC.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:17 -05:00
Laurent Pinchart 0b3fcd5727 [media] omap3isp: ccdc: Don't timeout on stream off when the CCDC is stopped
When the CCDC is already stopped due to a buffer underrun, the stop
state machine won't advance in BT.656 mode as no interrupt are generated
by the stopped CCDC in that mode. Handle this case explicitly in the
ccdc_disable() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:16 -05:00
Laurent Pinchart 93456527b4 [media] omap3isp: ccdc: Fix freeze when a short frame is received
In BT.656 mode the synchronization signals are generated by the CCDC
from the embedded sync codes. The VD0 and VD1 interrupts are thus only
triggered when the CCDC is enabled, unlike external sync mode where the
line counter runs even when the CCDC is stopped. We can't disable the
CCDC at VD1 time, as no VD0 interrupt would be generated for a short
frame, which would result in the CCDC being stopped and no VD interrupt
generated anymore. The CCDC is stopped from the VD0 interrupt handler
instead for BT.656.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:16 -05:00
Laurent Pinchart fd93c10afe [media] omap3isp: ccdc: Increment the frame number at VD0 time for BT.656
We will stop using VD1 in BT.656 mode, move frame number increment to
the VD0 interrupt handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:16 -05:00
Laurent Pinchart 1c74817405 [media] omap3isp: ccdc: Simplify ccdc_lsc_is_configured()
Use a local variable to avoid the duplicate spin_unlock_irqrestore()
call.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:16 -05:00
Laurent Pinchart 8815392a1d [media] omap3isp: ccdc: Rename __ccdc_handle_stopping to ccdc_handle_stopping
There's no need for a double underscore in the function name, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:15 -05:00
Laurent Pinchart 93d7badf1b [media] omap3isp: ccdc: Only complete buffer when all fields are captured
Checking that the captured field corresponds to the last required field
depending on the requested field order before completing the buffer
isn't enough. When the first field at stream start corresponds to the
last required field, this would result in returning an interlaced buffer
containing a single field.

Fix this by keeping track of the fields captured in the buffer, and make
sure that both fields are present for alternate field orders.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:15 -05:00
Laurent Pinchart aec2de0e93 [media] omap3isp: ccdc: Disable the video port when unused
The video port doesn't support YUV formats. Disable it when the CCDC
sink pad format is set to YUV instead of leaving it enabled and relying
on downstream modules not to process data they receive from the video
port.

Experiments showed that this fixes some of the CCDC failures to stop,
especially in BT.656 mode.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:15 -05:00
Laurent Pinchart 9de7af4d5b [media] omap3isp: ccdc: Add support for BT.656 YUV format at the CCDC input
Query the CCDC input media bus type from the subdev connected to the
CCDC sink pad and configure the CCDC accordingly to support BT.656
synchronization.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:15 -05:00
Laurent Pinchart bcb4e0efd1 [media] omap3isp: ccdc: Support the interlaced field orders at the CCDC output
The CCDC can interleave fields into a single buffer when writing to
memory. Support it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:14 -05:00
Laurent Pinchart 9a36d8ed33 [media] omap3isp: ccdc: Add basic support for interlaced video
When the CCDC input is interlaced enable the alternate field order on
the CCDC output video node. The field signal polarity is specified
through platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:14 -05:00
Laurent Pinchart 0a7b1a0103 [media] omap3isp: ccdc: Simplify the ccdc_isr_buffer() function
Instead of using goto statements to a single line return, return the
correct value immediately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:14 -05:00
Laurent Pinchart 2e8f01725e [media] omap3isp: ccdc: Simplify the configuration function
Assign the format variable to the sink pad format earlier and use it
instead of accessing the sink pad format directly from the ISP
structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:13 -05:00
Laurent Pinchart f7abbe989f [media] omap3isp: video: Validate the video node field order
The field order requested on the video node must match the field order
at the connected subdevice source pad.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:13 -05:00
Laurent Pinchart 48a8a0cb76 [media] omap3isp: Default to progressive field order when setting the format
If the requested field order is not supported default to progressive as
we can't guess how the user will configure the pipeline later on.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:13 -05:00
Laurent Pinchart 25c5cc9194 [media] omap3isp: Move non-critical code out of the mutex-protected section
The isp_video_pix_to_mbus() and isp_video_mbus_to_pix() calls in
isp_video_set_format() only access static fields of the isp_video
structure. They don't need to be protected by a mutex.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:13 -05:00
Laurent Pinchart 9884a955a9 [media] omap3isp: Remove boilerplate disclaimer and FSF address
We don't want to modify all source files the day the FSF moves.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:12 -05:00
Laurent Pinchart eb228e897c [media] omap3isp: Don't ignore subdev streamoff failures
Record the value returned by subdevs from s_stream(0) and handle stop
failures when an error occurs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:12 -05:00
Philipp Zabel ee27aa9018 [media] coda: fix build error by making reset control optional
make reset control optional for i.MX27

The patch "[media] coda: add reset control support" introduced a build failure
if CONFIG_RESET_CONTROLLER is disabled:

    drivers/media/platform/coda.c:3734:2: error: implicit declaration of
     function 'devm_reset_control_get'

Since not all SoCs containing CODA VPUs do have a system reset controller,
use devm_reset_control_get_optional to make it optional.

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Reported-by: Olof's autobuilder <build@lixom.net>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-01 15:27:14 -03:00
Josh Wu 8ff19bc437 [media] media: atmel-isi: add primary DT support
This patch add the DT support for Atmel ISI driver.
It use the same v4l2 DT interface that defined in video-interfaces.txt.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Cc: devicetree@vger.kernel.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 19:48:36 -03:00
Josh Wu 833e106326 [media] media: atmel-isi: convert the pdata from pointer to structure
Now the platform data is initialized by allocation of isi
structure. In the future, we use pdata to store the dt parameters.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 19:47:19 -03:00
Josh Wu 3900623bfa [media] media: atmel-isi: add v4l2 async probe support
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 19:35:06 -03:00
Ben Dooks 47c71bd61b [media] rcar_vin: add devicetree support
Add support for devicetree probe for the rcar-vin
driver.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
[g.liakhovetski@gmx.de fix a typo, sort headers alphabetically]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 19:34:45 -03:00