summaryrefslogtreecommitdiff
path: root/drivers/media/video/omap3isp/isppreview.c
AgeCommit message (Collapse)Author
2012-05-14[media] omap3isp: Default link validation for ccp2, csi2, preview and resizerSakari Ailus
Use default link validation for ccp2, csi2, preview and resizer. On ccp2, csi2 and ccdc we also collect information on external subdevs as one may be connected to those entities. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Replace the crop API by the selection APILaurent Pinchart
Support for the legacy crop API is emulated in the subdev core. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Add support for greyscale inputLaurent Pinchart
Configure CFA interpolation automatically based on the input format. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Rename last occurences of *_rgb_to_ycbcr to *_cscLaurent Pinchart
For consistency reasons, rename the last remaining occurences of rgb_to_ycbcr to csc (color space conversion). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Shorten shadow update delayLaurent Pinchart
When applications modify preview engine parameters, the new values are applied to the hardware by the preview engine interrupt handler during vertical blanking. If the parameters are being changed when the interrupt handler is called, it just delays applying the parameters until the next frame. If an application modifies the parameters for every frame, and the preview engine interrupt is triggerred synchronously, the parameters are never applied to the hardware. Fix this by storing new parameters in a shadow copy, and switch the active parameters with the shadow values atomically. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Simplify configuration parameters accessLaurent Pinchart
Instead of using a large switch/case statement to return offsets to and sizes of individual preview engine parameters in the parameters and configuration structures, store the information in the update_attrs table and use it at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Rename prev_params fields to match userspace APILaurent Pinchart
Rename the blk_adj and rgb2ycbcr fields to blkadj and csc respectively. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Remove update_attrs feature_bit fieldLaurent Pinchart
The feature_bit is always equal to 1 << array position, remove it and compute the value dynamically. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Merge configuration and feature bitsLaurent Pinchart
The preview engine parameters are referenced by a value suitable for being used in a bitmask. Two macros named OMAP3ISP_PREV_* and PREV_* are declared for each parameter and are used interchangeably. Remove the private macro. Replace the configuration bit field in the parameter update attributes structure with a boolean that indicates whether the parameter can be updated through the preview engine configuration ioctl. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Optimize parameters setup for the common caseLaurent Pinchart
If no parameter needs to be modified, make preview_config() and preview_setup_hw() return immediately. This speeds up interrupt handling in the common case. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] omap3isp: preview: Skip brightness and contrast in configuration ioctlLaurent Pinchart
Brightness and contrast are handled through V4L2 controls. Their configuration bit in the preview engine update attributes table is set to -1 to reflect that. However, the VIDIOC_OMAP3ISP_PRV_CFG ioctl handler doesn't handle -1 correctly as a configuration bit value, and erroneously considers that the parameter has been selected for update by the ioctl caller. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20[media] omap3isp: Mark next captured frame as faulty when an SBL overflow occursLaurent Pinchart
Instead of trying to propagate errors down the pipeline manually (and failing to do so properly in all cases), flag SBL errors in the pipeline to which the entity that triggered the error belongs, and use pipeline error flags to mark buffers as faulty when completing them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20[media] omap3isp: preview: Rename max output sizes definesLaurent Pinchart
The maximum preview engine output size depends on the ISP revision, not the OMAP revision. Rename the macros accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: preview: Add crop support on the sink padLaurent Pinchart
The crop rectangle takes the preview engine internal cropping requirements into account. The smallest allowable margins are 14 columns and 8 rows when reading from memory, and 18 columns and 8 rows when processing data on the fly from the CCDC. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: preview: Rename min/max input/output sizes definesLaurent Pinchart
The macros that define the minimum/maximum input and output sizes are defined in seperate files and have no consistent naming. In preparation for preview engine cropping support, move them all to isppreview.c and rename them to PREV_{MIN|MAX}_{IN|OUT}_{WIDTH|HEIGHT}*. Remove unused and/or unneeded local variables that store the maximum output width. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: preview: Remove horizontal averager supportLaurent Pinchart
The horizontal averager isn't used and will get in the way when implementing cropping support on the input pad. Remove it, it can be added back later if needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: Fix memory leaks in initialization error pathsLaurent Pinchart
Make sure all modules init functions clean up after themselves in case of error. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: Move *_init_entities() functions to the init/cleanup sectionLaurent Pinchart
Group all init/cleanup functions together to make the code more readable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-03[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()Laurent Pinchart
The media_entity_cleanup() function belong to the module cleanup handlers, not the entity registration handlers. Move it there. Create a omap3isp_video_cleanup() function to cleanup the video node entity, and call it from the module cleanup handlers. Rename omap3isp_stat_free() to omap3isp_stat_cleanup(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-27Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits) [media] media: vb2: correct queue initialization order [media] media: vb2: fix incorrect v4l2_buffer->flags handling [media] s5p-fimc: Add support for the buffer timestamps and sequence [media] s5p-fimc: Fix bytesperline and plane payload setup [media] s5p-fimc: Do not allow changing format after REQBUFS [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4 [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet [media] tda18271: fix bad calculation of main post divider byte [media] tda18271: prog_cal and prog_tab variables should be s32, not u8 [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails [media] v4l: Don't register media entities for subdev device nodes [media] omap3isp: Don't increment node entity use count when poweron fails [media] omap3isp: lane shifter support [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts [media] media: add missing 8-bit bayer formats and Y12 [media] v4l: add V4L2_PIX_FMT_Y12 format cx23885: Fix stv0367 Kconfig dependency [media] omap3isp: Use isp xclk defines ... Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c
2011-04-17[media] omap3isp: Fix trivial typosMichael Jones
It doesn't get more trivial than these. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-22[media] omap3isp: CCDC, preview engine and resizerLaurent Pinchart
The OMAP3 ISP CCDC, preview engine and resizer entities perform image processing and scaling. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: David Cohen <dacohen@gmail.com> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com> Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com> Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com> Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Antti Koskipaa <akoskipa@gmail.com> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: RaniSuneela <r-m@ti.com> Signed-off-by: Atanas Filipov <afilipov@mm-sol.com> Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com> Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Dominic Curran <dcurran@ti.com> Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi> Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>