aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/s5p_fimc.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-06-28[media] exynos4-is: Correct colorspace handling at FIMC-LITESylwester Nawrocki1-0/+2
Ensure the colorspace is properly adjusted by the driver for YUV and Bayer image formats. The subdev try_fmt helper is simplified. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-12[media] exynos4-is: Use common exynos_media_pipeline data structureSylwester Nawrocki1-27/+26
This enumeration is now private to exynos4-is and the exynos5 camera subsystem driver may have the subdevs handling designed differently. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-12[media] exynos4-is: Add struct exynos_video_entitySylwester Nawrocki1-0/+5
This patch introduces common structure for the video entities to handle all video nodes and media pipelines associated with them in more generic way. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] exynos4-is: Move the subdev group ID definitions to public headerSylwester Nawrocki1-0/+11
Move the sub-device group ID definitions to the driver's public header so they are available to other media drivers that need to share modules found in exynos4-is. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04[media] exynos4-is: Allow colorspace conversion at FIMC-LITESylwester Nawrocki1-0/+2
The FIMC-LITE output DMA allows to configure different YUV order than the order at the camera input interface. Thus there is some limited colorspace conversion possible. This patch makes the color format variable be per FIMC-LITE input/output, rather than a global per device. This also fixes incorrect behavior where color format at the FIMC-LITE.N subdev's source pad is modified by VIDIOC_S_FMT ioctl on the related video node. YUV order definitions are corrected so that we use notation: | byte3 | byte2 | byte1 | byte0 -------+-------+-------+-------+------ YCBYCR | CR | Y | CB | Y YCRYCB | CB | Y | CR | Y CBYCRY | Y | CR | Y | CB CRYCBY | Y | CB | Y | CR Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] s5p-fimc: Remove dependency on fimc-core.h in fimc-lite driverSylwester Nawrocki1-0/+34
Drop fimc-lite.h header inclusion to make the exynos-fimc-lite module independent on other modules. Move struct fimc_fmt declaration to the driver's private headers as it is used in multiple modules. Reported-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] s5p-fimc: Add device tree based sensors registrationSylwester Nawrocki1-0/+3
The sensor (I2C and/or SPI client) devices are instantiated by their corresponding control bus drivers. Since the I2C client's master clock is often provided by a video bus receiver (host interface) or other than I2C/SPI controller device, the drivers of those client devices are not accessing hardware in their driver's probe() callback. Instead, after enabling clock, the host driver calls back into a sub-device when it wants to activate them. This pattern is used by some in-tree drivers and this patch also uses it for DT case. This patch is intended as a first step for adding device tree support to the S5P/Exynos SoC camera drivers. The second one is adding support for asynchronous sub-devices registration and clock control from sub-device driver level. The bindings shall not change when asynchronous probing support is added. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] s5p-fimc: Add device tree support for the media device driverSylwester Nawrocki1-0/+1
This patch adds changes required for the main camera media device driver corresponding to the top level 'camera' device node. The drivers of devices corresponding to child nodes of the 'camera' node are looked up and and registered as sub-devices to the top level driver. The main driver's probing is deferred if any of the sub-device drivers is not yet initialized and ready. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] s5p-csis: Add device tree supportSylwester Nawrocki1-0/+13
This patch support for binding the driver to the MIPI-CSIS devices instantiated from device tree and parsing the SoC and board specific properties. The MIPI CSI-2 channel is determined by the value of reg property placed in csis' port subnode. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05[media] s5p-fimc: Redefine platform data structure for fimc-isSylwester Nawrocki1-18/+31
Newer Exynos4 SoC are equipped with a local camera ISP that controls external raw image sensor directly. Such sensors can be connected through FIMC-LITEn (and MIPI-CSISn) IPs to the ISP, which then feeds image data to the FIMCn IP. Thus there can be two busses associated with an image source (sensor). Rename struct s5p_fimc_isp_info describing external image sensor (video decoder) to struct fimc_source_info to avoid confusion. bus_type is split into fimc_bus_type and sensor_bus_type. The bus type enumeration is extended to include both FIMC Writeback input types. The bus_type enumeration and the data structure name in the board files are modified according to the above changes. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] s5p-fimc: Remove unused platform data structure fieldsSylwester Nawrocki1-2/+0
alignment, fixed_phy_vdd and phy_enable fields are now unused so removed them. The data alignment is now derived directly from media bus pixel code, phy_enable callback has been replaced with direct function call and fixed_phy_vdd was dropped in commit 438df3ebe5f0ce408490a777a758d5905f0dd58f "[media] s5p-csis: Handle all available power supplies". Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] s5p-fimc: Add pipeline ops to separate FIMC-LITE moduleSylwester Nawrocki1-0/+18
In order to reuse the FIMC-LITE module on Exynos4 and Exynos5 SoC introduce a set of callbacks for the media pipeline control from within FIMC/FIMC-LITE video node. It lets us avoid symbol dependencies between FIMC-LITE and the whole media device driver, which simplifies the initialization sequences and doesn't introduce issues preventing common kernel image for exynos4 and exynos5 SoCs. This patch also corrects following build errors: drivers/built-in.o: In function `buffer_queue': drivers/media/video/s5p-fimc/fimc-lite.c:414: undefined reference to `fimc_pipeline_s_stream' drivers/built-in.o: In function `fimc_lite_resume': drivers/media/video/s5p-fimc/fimc-lite.c:1518: undefined reference to `fimc_pipeline_initialize' drivers/built-in.o: In function `fimc_lite_suspend': drivers/media/video/s5p-fimc/fimc-lite.c:1544: undefined reference to `fimc_pipeline_shutdown' when only CONFIG_VIDEO_EXYNOS_FIMC_LITE is selected, without CONFIG_VIDEO_S5P_FIMC. Reported-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] s5p-fimc: Rework the video pipeline control functionsSylwester Nawrocki1-0/+16
There is getting more entities to manage within single video pipeline in newer SoCs. To simplify code put subdevs' pointer into an array rather than adding new member in struct fimc_pipeline for each subdev. This allows to easier handle subdev operations in proper order. Additionally walk graph in one direction only in fimc_pipeline_prepare() function to make sure we properly gather only media entities that below to single data pipeline. This avoids wrong initialization in case where, for example there are multiple active links from s5p-mipi-csis subdev output pad. struct fimc_pipeline declaration is moved to the driver's public header to allow other drivers to reuse the fimc-lite driver added in subsequent patches. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24[media] s5p-fimc: Convert to use generic media bus polarity flagsSylwester Nawrocki1-6/+1
Switch to generic media bus signal polarity flags and allow configuring the FIELD signal polarity. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] s5p-fimc: Add v4l2_device notification support for single frame captureSylwester Nawrocki1-0/+9
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] s5p-fimc: Add the media device driverSylwester Nawrocki1-0/+2
Add a top level media device driver aggregating FIMC video devnodes, MIPI-CSIS and sensor subdevs. This driver gathers all media entities and creates the possible links between them during initialization. By default some links will be activated to enable access to all available sensors in the system. For example if there are sensors S0, S1 listed in the media device platform data definition they will be by default assigned to FIMC0, FIMC1 respectively, which in turn will corresponds to separate /dev/video?. There is enough FIMC H/W entities to cover all available physical camera interfaces in the system. The fimc media device driver is bound to the "s5p-fimc-md" platform device. Such platform device should be created by board initialization code and camera sensors description array need to be specified as its platform data. The media device driver also implements various video pipeline operations, for enabling subdevs power, streaming, etc., which will be used by the capture video node driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignmentSylwester Nawrocki1-0/+2
Allow the MIPI-CSI data alignment to be defined in the board setup as it may be different across various camera sensors. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] s5p-fimc: Allow defining number of sensors at runtimeSylwester Nawrocki1-4/+3
Add num_clients field to struct s5p_fimc_isp_info to define exactly size of clients array which simplifies a bit the sensors management. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] s5p-fimc: Add control of the external sensor clockSylwester Nawrocki1-0/+2
Manage the camera sensor clock in the host driver rather than leaving this task for sensor drivers. The clock frequency must be passed in the sensor's and host driver's platform data. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] s5p-fimc: Derive camera bus width from mediabus pixelcodeSylwester Nawrocki1-2/+0
Remove bus_width from s5p_fimc_isp_info data structure. Determine camera data bus width based on mediabus pixel format. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] s5p-fimc: Rename s3c_fimc* to s5p_fimc*Sylwester Nawrocki1-0/+60
Change s3c_fimc.h header file name to s5p_fimc.h, replace s3c_fimc_* names with s5p_fimc_*. s3c_fimc need to be reserved for S3C series and s5p-fimc driver will not cover CAMIF devices in S3C SoC series. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>