summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_entity.h
AgeCommit message (Collapse)AuthorFilesLines
2016-02-19[media] v4l: vsp1: Don't validate links when the userspace API is disabledLaurent Pinchart1-1/+4
As the pipeline is configured internally by the driver when the userspace API is disabled its configuration can be trusted and link validation isn't needed. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Make number of BRU inputs configurableLaurent Pinchart1-1/+3
The R-Car Gen3 family has 5-inputs BRUs, support them by making the number of BRU inputs configurable. As the driver assumes that the number of BRU inputs is equal to the number of RPFs, replace the BRU_MAX_INPUTS macro with VSP1_MAX_RPF to make the assumption apparent. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move entity route setup function to vsp1_entity.cLaurent Pinchart1-0/+2
The function will be used by the DU code, move it out of vsp1_video.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move vsp1_video pointer from vsp1_entity to vsp1_rwpfLaurent Pinchart1-3/+0
Only RPFs and WPFs can be associated with video nodes, don't waste memory by storing the video pointer in all entities. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17[media] v4l: vsp1: Don't sleep in atomic contextLaurent Pinchart1-2/+2
The vsp1_entity_is_streaming() function is called in atomic context when queuing buffers, and sleeps due to a mutex. As the mutex just protects access to one structure field, fix this by replace the mutex with a spinlock. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-23[media] v4l2-subdev: replace v4l2_subdev_fh by v4l2_subdev_pad_configHans Verkuil1-2/+2
If a subdevice pad op is called from a bridge driver, then there is no v4l2_subdev_fh struct that can be passed to the subdevice. This made it hard to use such subdevs from a bridge driver. This patch replaces the v4l2_subdev_fh pointer by a v4l2_subdev_pad_config pointer in the pad ops. This allows bridge drivers to use the various try_ pad ops by creating a v4l2_subdev_pad_config struct and passing it along to the pad op. The v4l2_subdev_get_try_* macros had to be changed because of this, so I also took the opportunity to use the full name of the v4l2_subdev_get_try_* functions in the __V4L2_SUBDEV_MK_GET_TRY macro arguments: if you now do 'git grep v4l2_subdev_get_try_format' you will actually find the header where it is defined. One remark regarding the drivers/staging/media/davinci_vpfe patches: the *_init_formats() functions assumed that fh could be NULL. However, that's not true for this driver, it's always set. This is almost certainly a copy and paste from the omap3isp driver. I've updated the code to reflect the fact that fh is never NULL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-07-17[media] v4l: vsp1: Setup control handler automatically at stream on timeLaurent Pinchart1-0/+7
When setting a control directly on a subdev node the VSP1 driver doesn't guarantee that the device is powered on. This leads to crashes when the control handlers writes to hardware registers. One easy way to fix this is to ensure that the device gets powered on when a subdev node is opened. However, this consumes power unnecessarily, as there's no need to power the device on when setting formats on the pipeline. Furthermore, control handler setup at entity init time suffers from the same problem as the device isn't powered on easier. Fix this by extend the entity base object to setup the control handler automatically when starting the stream. Entities must then skip writing to registers in the set control handler when not streaming, which can be tested with the new vsp1_entity_is_streaming() helper function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] v4l: vsp1: Cleanup video nodes at removal timeLaurent Pinchart1-0/+3
Video nodes created and initialized in the RPF and WPF init code paths are never unregistered, and the related resources (videobuf alloc context and media entity) never released. Fix this by storing a pointer to the vsp1_video object in vsp1_entity and calling vsp1_video_cleanup() from vsp1_entity_destroy(). This also allows simplifying the init error code paths. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-23[media] v4l: vsp1: Add BRU supportLaurent Pinchart1-0/+1
The Blend ROP Unit performs blending and ROP operations for up to four sources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-23[media] v4l: vsp1: Support multi-input entitiesLaurent Pinchart1-2/+21
Rework the route configuration code to support entities with multiple sink pads. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-12[media] v4l: vsp1: Update copyright noticeLaurent Pinchart1-1/+1
The "Renesas Corporation" listed in the copyright notice doesn't exist. Replace it with "Renesas Electronics Corporation" and update the copyright years. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11[media] v4l: vsp1: Add LUT supportLaurent Pinchart1-0/+1
The Look-Up Table looks up values in 8-bit indexed tables separately for each color component. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11[media] v4l: vsp1: Add SRU supportLaurent Pinchart1-0/+1
The Super Resolution Unit performs super resolution processing with optional upscaling by a factor of two. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11[media] v4l: vsp1: Add HST and HSI supportLaurent Pinchart1-0/+2
The Hue Saturation value Transform and Hue Saturation value Inverse transform entities convert from RGB to HSV and back. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] v4l: Renesas R-Car VSP1 driverLaurent Pinchart1-0/+68
The VSP1 is a video processing engine that includes a blender, scalers, filters and statistics computation. Configurable data path routing logic allows ordering the internal blocks in a flexible way. Due to the configurable nature of the pipeline the driver implements the media controller API and doesn't use the V4L2 mem-to-mem framework, even though the device usually operates in memory to memory mode. Only the read pixel formatters, up/down scalers, write pixel formatters and LCDC interface are supported at this stage. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>