summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/qcom/camss-8x16
Commit message (Collapse)AuthorAgeFilesLines
* media: camss-vfe: always initialize reg at vfe_set_xbar_cfg()Mauro Carvalho Chehab2017-11-011-0/+3
| | | | | | | | | | | | | if output->wm_num is bigger than 2, the value for reg is not initialized, as warned by smatch: drivers/media/platform/qcom/camss-8x16/camss-vfe.c:633 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'. drivers/media/platform/qcom/camss-8x16/camss-vfe.c:637 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'. That shouldn't happen in practice, so add a logic that will break the loop if i > 1, fixing the warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Todor Tomov <todor.tomov@linaro.org>
* media: v4l: async: Move async subdev notifier operations to a separate structureLaurent Pinchart2017-10-311-2/+6
| | | | | | | | | | | | | | | | | The async subdev notifier .bound(), .unbind() and .complete() operations are function pointers stored directly in the v4l2_async_subdev structure. As the structure isn't immutable, this creates a potential security risk as the function pointers are mutable. To fix this, move the function pointers to a new v4l2_async_subdev_operations structure that can be made const in drivers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss-video.c: drop unused headerHans Verkuil2017-10-311-1/+0
| | | | | | | Drop unused vb1 header. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: qcom: camss: Make function vfe_set_selection staticColin Ian King2017-09-231-1/+1
| | | | | | | | | | | | | The function vfe_set_selection is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: warning: symbol 'vfe_set_selection' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: qcom: don't go past the arrayMauro Carvalho Chehab2017-08-261-1/+1
| | | | | | | | As reported by smatch: drivers/media/platform/qcom/camss-8x16/camss-vfe.c:1136 vfe_release_wm() error: buffer overflow 'vfe->wm_output_map' 7 <= 7 Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: qcom: mark long long consts as suchMauro Carvalho Chehab2017-08-261-2/+2
| | | | | | | | | Fix those warnings when building on i386: drivers/media/platform/qcom/camss-8x16/camss-csiphy.c:333:22: warning: constant 1000000000000 is so big it is long long drivers/media/platform/qcom/camss-8x16/camss-csiphy.c:339:32: warning: constant 1000000000000 is so big it is long long Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add abbreviations explanationTodor Tomov2017-08-266-6/+6
| | | | | | | | Add abbreviations explanation at the top header blocks in source files. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Use optimal clock frequency ratesTodor Tomov2017-08-2610-109/+547
| | | | | | | | | | | | | | | | | | | Use standard V4L2 control to get pixel clock rate from a sensor linked in the media controller pipeline. Then calculate clock rates on CSIPHY, CSID and VFE to use the lowest possible. If the currnet pixel clock rate of the sensor cannot be read then use the highest possible. This case covers also the CSID test generator usage. If VFE is already powered on by another pipeline, check that the current VFE clock rate is high enough for the new pipeline. If not return busy error code as VFE clock rate cannot be changed while VFE is running. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Configure crop module in VFETodor Tomov2017-08-261-1/+40
| | | | | | | | Add crop module configuration support to be able to apply cropping. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Add interface for croppingTodor Tomov2017-08-262-42/+150
| | | | | | | | Extend selection ioctls to handle cropping configuration. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Configure scaler module in VFETodor Tomov2017-08-261-13/+46
| | | | | | | | Add scaler module configuration support to be able to apply scaling. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Add interface for scalingTodor Tomov2017-08-262-2/+183
| | | | | | | | Add compose selection ioctls to handle scaling configuration. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Support for frame paddingTodor Tomov2017-08-263-31/+109
| | | | | | | | Add support for horizontal and vertical frame padding. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: vfe: Format conversion support using PIX interfaceTodor Tomov2017-08-265-157/+879
| | | | | | | | | | | | | | | Use VFE PIX input interface and do format conversion in VFE. Supported input format is UYVY (single plane YUV 4:2:2) and its different sample order variations. Supported output formats are: - NV12/NV21 (two plane YUV 4:2:0) - NV16/NV61 (two plane YUV 4:2:2) Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Enable buildingTodor Tomov2017-08-261-0/+11
| | | | | | | | | Add Makefile and update platform/Kconfig and platform/Makefile to enable building of the QCom CAMSS driver. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camms: Add core filesTodor Tomov2017-08-262-0/+796
| | | | | | | | These files implement the platform driver code. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add files which handle the video device nodesTodor Tomov2017-08-262-0/+745
| | | | | | | | These files handle the video device nodes of the camss driver. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add VFE filesTodor Tomov2017-08-262-0/+2020
| | | | | | | | | | | | | | | These files control the VFE module. The VFE has different input interfaces. The PIX input interface feeds the input data to an image processing pipeline. Three RDI input interfaces bypass the image processing pipeline. The VFE also contains the AXI bus interface which writes the output data to memory. RDI interfaces are supported in this version. PIX interface is not supported. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add ISPIF filesTodor Tomov2017-08-262-0/+1249
| | | | | | | | | These files control the ISPIF module which handles the routing of the data streams from the CSIDs to the inputs of the VFE. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add CSID filesTodor Tomov2017-08-262-0/+1085
| | | | | | | | | These files control the CSID modules which handle the protocol and application layer of the CSI2 receivers. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss: Add CSIPHY filesTodor Tomov2017-08-262-0/+900
These files control the CSIPHY modules which are responsible for the physical layer of the CSI2 receivers. Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
OpenPOWER on IntegriCloud