summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sh_veu.c
Commit message (Collapse)AuthorAgeFilesLines
* media: platform: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | 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>
* [media] sh_veu: Include media/v4l2-image-sizes.hAxel Lin2014-08-211-3/+1
| | | | | | | 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>
* [media] v4l: Support extending the v4l2_pix_format structureLaurent Pinchart2014-07-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* sh_veu: Replace PTR_RET with PTR_ERR_OR_ZEROSachin Kamat2013-07-161-1/+1
| | | | | | | PTR_RET is now deprecated. Use PTR_ERR_OR_ZERO instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* [media] media: Cocci spatch "ptr_ret.spatch"Thomas Meyer2013-06-211-4/+1
| | | | | | | | Use the PTR_RET() macro to simplify error processing. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu: fix the buffer size calculationKatsuya Matsubara2013-06-081-3/+3
| | | | | | | | | | The 'bytesperline' value only indicates the stride of the Y plane if the color format is planar, such as NV12. When calculating the total plane size, the size of CbCr plane must also be considered. Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu: keep power supply until the m2m context is releasedKatsuya Matsubara2013-06-081-2/+2
| | | | | | | | | | | In the sh_veu driver, only the interrupt handler 'sh_veu_bh' can invoke the v4l2_m2m_job_finish() function. So the hardware must be alive for handling interrupts until returning from v4l2_m2m_ctx_release(). Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been abortedKatsuya Matsubara2013-06-081-4/+1
| | | | | | | | | | v4l2_m2m_job_finish() should be invoked even if the current ongoing job has been aborted since v4l2_m2m_ctx_release() which has issued the job abort may wait until the finish function is invoked. Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu: Use module_platform_driver_probe macroSachin Kamat2013-03-211-12/+1
| | | | | | | | | module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu.c: Convert to devm_ioremap_resource()Sachin Kamat2013-03-211-3/+4
| | | | | | | | | Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: remove __dev* annotationsStephen Rothwell2013-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Mauro, After merging the v4l-dvb tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/media/platform/sh_veu.c:1146:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_probe' drivers/media/platform/sh_veu.c:1228:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_remove' drivers/media/platform/sh_veu.c:1244:2: error: implicit declaration of function '__devexit_p' [-Werror=implicit-function-declaration] drivers/media/platform/sh_veu.c:1244:25: error: 'sh_veu_remove' undeclared here (not in a function) drivers/media/platform/sh_veu.c: In function 'sh_veu_init': drivers/media/platform/sh_veu.c:1253:45: error: 'sh_veu_probe' undeclared (first use in this function) drivers/media/platform/sh_veu.c:1253:45: note: each undeclared identifier is reported only once for each function it appears in drivers/media/platform/sh_veu.c: At top level: drivers/media/platform/sh_veu.c:1095:20: warning: 'sh_veu_bh' defined but not used [-Wunused-function] drivers/media/platform/sh_veu.c:1109:20: warning: 'sh_veu_isr' defined but not used [-Wunused-function] drivers/media/platform/sh_veu.c: In function 'sh_veu_init': drivers/media/platform/sh_veu.c:1254:1: warning: control reaches end of non-void function [-Wreturn-type] Caused by commit 05efa71bdc0e ("[media] media: add a VEU MEM2MEM format conversion and scaling driver") interacting with commit 54b956b90360 ("Remove __dev* markings from init.h") from the driver-core.current tree. I have applied the following merge fix patch which could be applied directly to the v4l-dvb tree (please): CONFIG_HOTPLUG is always true now and the __dev* macros have meen removed. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sh_veu.c: fix two compilation warningsMauro Carvalho Chehab2012-12-201-4/+6
| | | | | | | | drivers/media/platform/sh_veu.c:269:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat] drivers/media/platform/sh_veu.c:276:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat] Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: add a VEU MEM2MEM format conversion and scaling driverGuennadi Liakhovetski2012-12-201-0/+1264
Video Engine Unit (VEU) is an IP block, found in multiple SuperH and ARM- based sh-mobile and r-mobile SoCs, capable of processing video data. It can perform colour-space conversion, scaling and several filtering transformations. This patch adds an initial implementation of a mem2mem V4L2 driver for VEU. So far only conversion from NV12 to RGB565 is supported. Further functionality shall be added in the future. This driver is based on a VEU vidix driver by Magnus Damm. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud