summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
AgeCommit message (Collapse)Author
2014-09-02[media] vivid: add the control handling codeHans Verkuil
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[media] vivid: add core driver codeHans Verkuil
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-08-26[media] omap: be sure that MMU is there for COMPILE_TESTMauro Carvalho Chehab
COMPILE_TEST fail on (some) archs without MMU. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] be sure that HAS_DMA is enabled for vb2-dma-contigMauro Carvalho Chehab
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[media] enable COMPILE_TEST for media driversMauro Carvalho Chehab
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[media] enable COMPILE_TEST for OMAP2 voutMauro Carvalho Chehab
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[media] allow COMPILE_TEST for SAMSUNG_EXYNOS4_ISMauro Carvalho Chehab
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[media] enable COMPILE_TEST for ti-vbeMauro Carvalho Chehab
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[media] enable COMPILE_TEST for MX2 eMMa-PrP driverMauro Carvalho Chehab
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[media] s5p-jpeg: Get rid of a warningMauro Carvalho Chehab
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[media] atmel-isi: get rid of a warningMauro Carvalho Chehab
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[media] mx2_camera: get rid of a warningMauro Carvalho Chehab
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[media] exynos4-is/media-dev: get rid of a warning for a dead codeMauro Carvalho Chehab
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[media] mipi-csis: get rid of a warningMauro Carvalho Chehab
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[media] s5p_mfc: get rid of several warningsMauro Carvalho Chehab
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[media] s5p_mfc_ctrl: add missing s5p_mfc_ctrl.h headerMauro Carvalho Chehab
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[media] fimc-is-param: get rid of warningsMauro Carvalho Chehab
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[media] g2d: remove unused varMauro Carvalho Chehab
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[media] s5p-jpeg: get rid of some warningsMauro Carvalho Chehab
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[media] omap_vout: Get rid of a few warningsMauro Carvalho Chehab
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[media] omap: fix compilation if !VIDEO_OMAP2_VOUT_VRFBMauro Carvalho Chehab
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[media] gsc: Use %pad for dma_addr_tMauro Carvalho Chehab
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[media] dm644x_ccdc: use unsigned long for fpc_table_addrMauro Carvalho Chehab
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[media] vpif: don't cast pointers to intMauro Carvalho Chehab
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[media] s5p_mfc: don't use an external symbol called 'debug'Mauro Carvalho Chehab
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[media] atmel-isi: Fix a truncate warningMauro Carvalho Chehab
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[media] atmel-isi: tag dma_addr_t as suchMauro Carvalho Chehab
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[media] ti-vpe: shut up a casting warning messageMauro Carvalho Chehab
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[media] ti-vpe: use %pad for dma addressMauro Carvalho Chehab
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[media] gsc-m2m: Remove an unused var.Mauro Carvalho Chehab
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[media] gsc-core: Remove useless testMauro Carvalho Chehab
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[media] dm355_ccdc: declare a function as staticMauro Carvalho Chehab
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[media] dm644x_ccdc: declare some functions as staticMauro Carvalho Chehab
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[media] vpif_capture: get rid of some unused varsMauro Carvalho Chehab
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[media] vpif_display: get rid of some unused varsMauro Carvalho Chehab
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-21[media] via-camera: Include media/v4l2-image-sizes.hAxel Lin
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[media] sh_veu: Include media/v4l2-image-sizes.hAxel Lin
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[media] coda: checkpatch cleanupPhilipp Zabel
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[media] coda: disable old cropping ioctlsPhilipp Zabel
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[media] coda: set capture frame size with output S_FMTPhilipp Zabel
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[media] coda: fix coda_s_fmt_vid_outPhilipp Zabel
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[media] coda: fix timestamp list handlingPhilipp Zabel
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[media] coda: improve allocation error messagesPhilipp Zabel
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[media] coda: add an intermediate debug levelPhilipp Zabel
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[media] coda: increase max vertical frame size to 1088Philipp Zabel
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[media] coda: allow running coda without iram on mx6dlPhilipp Zabel
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[media] coda: skip calling coda_find_codec in encoder try_fmt_vid_outPhilipp Zabel
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[media] coda: dequeue buffers on streamoffPhilipp Zabel
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[media] coda: dequeue buffers if start_streaming failsPhilipp Zabel
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[media] coda: request BIT processor interrupt by namePhilipp Zabel
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>