summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)AuthorFilesLines
2014-11-28dmxdev: don't use before checking file->private_dataMauro Carvalho Chehab1-2/+1
As reported by smatch: drivers/media/dvb-core/dmxdev.c:1091 dvb_demux_poll() warn: variable dereferenced before check 'dmxdevfilter' (see line 1088) This was introduced by changeset d102cac8097c. We need to test before using it. Change-Id: I4e51d508c466b915338bd0a88a7afb49f4dbeb4d Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
2014-11-28s5p-jpeg: Fix possible NULL pointer dereference in s_fmtJacek Anaszewski1-0/+8
Some formats are not supported in encoding or decoding mode for given type of buffer (e.g. V4L2_PIX_FMT_JPEG is supported on output buffer only while in decoding mode). Make S_FMT failing if not suitable format is found. Change-Id: I35c94e38b1b11e2c379f4b2e1f61eedab2bc0a9d Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2014-11-27exynos: fimc-is: Support for V4L2 controlsBeata Michalska9-72/+669
Add support for FIMC ISP and SCALERC v4l2 controls Change-Id: I360597cbaed60a24f3184df3c5617f868fd02749 Signed-off-by: Beata Michalska <b.michalska@samsung.com>
2014-11-27exynos: fimc-is: Internal buffer list cleanupBeata Michalska5-18/+113
As the driver maintaines separate buffer lists per each video device which are beyond control of v4l2/vb2 framework, those lists should be properly handled and cleared once the buffers are no longer available. The changes introduced allow controlling state of each queued buffer and removing it from internal buffer lists when needed. Signed-off-by: Beata Michalska <b.michalska@samsung.com> Change-Id: I4dea7df3910d6836edee1387c5a1147649043b81
2014-11-27exynos3: fimc-is: Add support for FIMC IS on Exynos3250Beata Michalska21-922/+3462
The changes introduced provide support for FIMC-IS subsystem avalilable on Exynos3250. They cover the differences in both: the hardware itself as well as the subtle discrepancies between the firmwares controlling the FIMC IS on both SoCs. Regarding the above mentioned firmware variations: the initial driver has been extended with a simplified interface handling those variations thus living the core driver independent of the actual firmware version. Missing code paths have been added to cover handling some of the most probable failures/errors. Signed-off-by: Beata Michalska <b.michalska@samsung.com> Change-Id: Ie07312013a6a0ee14b88803360f0832d0ad4038d
2014-11-27exynos5: fimc-is: Code cleanupBeata Michalska3-77/+148
- Code cleanup for Exynos5/3 media device driver - Proper locking for vb2 buffers for both FIMC ISP and FIMC SCC v4l2 subdevices - Improved handling VIDIOC_REQBUFS ioctl Signed-off-by: Beata Michalska <b.michalska@samsung.com> Change-Id: If7ee3f7861678169c2c0f0fc217d3507b3e3d4fc
2014-11-27exynos: fimc-lite: Capture frame end event notificationBeata Michalska1-17/+20
This patch adds notifying v4l2 subdevs upon capture frame end event. Signed-off-by: Beata Michalska <b.michalska@samsung.com> Change-Id: Id3e81b4692a6f2cfc91ffde7050a3ae6db719971
2014-11-27exynos: mipi-csis: Fix clock handling for exynos3250Beata Michalska1-13/+29
In case of Exynos3250 only gate clock is required thus all the remaining mipi-csis clocks are considered as optional. Signed-off-by: Beata Michalska <b.michalska@samsung.com> Change-Id: Ibadffe49739add39f156737cbb723b24a5dd4ff5
2014-11-27exynos: mipi-csis: Fix handling csis events/errorsBeata Michalska1-14/+18
Particular interrupt source mask should specify each and every possible event/error reflecting the s5pcsis_events table content. Change-Id: I3149364cf219d8ec2c13297a8890537585ae77ca Signed-off-by: Beata Michalska <b.michalska@samsung.com>
2014-11-27exynos5: fimc-is: Add driver data entry for S5K68B1 sensorSylwester Nawrocki2-4/+16
Change-Id: I7e1c466c6622b39c2999e2245c7815e6517dd157 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-27exynos5-is: Make sclk_bayer clock handling optionalSylwester Nawrocki1-11/+16
There is no sclk_bayer clock on exynos3250. Some flag at the variant data could be added later to handle properly error from clk calls. Change-Id: I249169e1a7c451db6805dee7d01dd95816f329e0 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-27exynos5-is: Allow initialization when fimc-is is a master nodeSylwester Nawrocki7-113/+222
Change platform sub-devices registration method so the driver can support exynos3250 DT binding, i.e. initialize when fimc-is is the complex root node, not "camera". This also merges exynos5-fimc-is and exynos-mdevice into single kernel module called exynos-iss.ko. Change-Id: Ie340fd7a3e1f7b5dba2c71963c920f324fab4e5a Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-27[media] Add driver for exynos5 FIMC-IS subsystemArun Kumar K22-0/+7243
This driver is for the FIMC-IS IP available in Samsung Exynos5 SoC onwards. exynos5-fimc-is: Add common driver header files This patch adds all the common header files used by the fimc-is driver. It includes the commands for interfacing with the firmware and error codes from IS firmware, metadata and command parameter definitions. exynos5-fimc-is: Add register definition and context header This patch adds the register definition file for the fimc-is driver and also the header file containing the main context for the driver. exynos5-fimc-is: Add isp subdev fimc-is driver takes video data input from the ISP video node which is added in this patch. This node accepts Bayer input buffers which is given from the IS sensors. exynos5-fimc-is: Add scaler subdev FIMC-IS has two hardware scalers named as scaler-codec and scaler-preview. This patch adds the common code handling the video nodes and subdevs of both the scalers. exynos5-fimc-is: Add sensor interface Some sensors to be used with fimc-is are exclusively controlled by the fimc-is firmware. This minimal sensor driver provides the required info for the firmware to configure the sensors sitting on I2C bus. exynos5-fimc-is: Add the hardware pipeline control This patch adds the crucial hardware pipeline control for the fimc-is driver. All the subdev nodes will call this pipeline interfaces to reach the hardware. Responsibilities of this module involves configuring and maintaining the hardware pipeline involving multiple sub-ips like ISP, DRC, Scalers, ODC, 3DNR, FD etc. exynos5-fimc-is: Add the hardware interface module The hardware interface module finally sends the commands to the FIMC-IS firmware and runs the interrupt handler for getting the responses. Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kilyeon Im <kilyeon.im@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> exynos5-is: Add Kconfig and Makefile Adds Kconfig and Makefile for exynos5-is driver files. [b.michalska@samsung.com: Implementation adjusted to current version of V4L2 framework: - updated prototype for stop_streaming v4l2 capture ops - vb2_queue struct's field tiemstamp_type updated to timestamp_flags] Change-Id: I066a86151048b4b5871bd3732773b87219f04fd1 Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-27exynos5-is: Add media device driver for exynos5 SoCs camera subsystemShaik Ameer Basha2-0/+1336
This patch adds a top level media device driver for the Exynos5 SoC series camera subsystem. The driver currently supports processing pipelines involving following IP blocks: * MIPI-CSIS MIPI CSI-2 bus front-end to the FIMC-LITE, image sensors with MIPI CSI-2 bus should be linked with FIMC-LITE through this sub-device. * FIMC-LITE Supports capture interface from device (Sensor, MIPI-CSIS) to memory. Supports interconnection (through internal data FIFO links) between devices like MIPI-CSIS and FIMC-IS. * FIMC-IS Camera ISP with multiple image processing and peripheral devices like I2C or SPI bus controllers. The G-Scaler IP is not yet supported. The media device creates two kinds of pipelines for connecting the above mentioned IP blocks. The pipeline0 contains Sensor, MIPI-CSIS and FIMC-LITE devices and allows to capture image data from external sensor to memory. Pipeline1 uses FIMC-IS components for image processing operations on the captured raw image data and provides scaled YUV image data at its output. Pipeline0 +--------+ +-----------+ +-----------+ +--------+ | Sensor | --> | MIPI-CSIS | --> | FIMC-LITE | --> | Memory | +--------+ +-----------+ +-----------+ +--------+ Pipeline1 +--------+ +---------+ +-----------+ +-----------+ | Memory | --> | ISP | --> | SCC | --> | SCP | +--------+ +---------+ +-----------+ +-----------+ Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> [s.nawrocki@samsung.com: improved the commit description, removed inclusion of nonexistent <linux/of_i2c.h> header] Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Change-Id: Icccb5c45cebe4b46790a1bdce436c00090924d7a
2014-11-27exynos: mipi-csis: Add suport for Exynos3250Beata Michalska1-74/+183
Adapt current implementation to cover differences in MIPI CSIS registers layout. Change-Id: I092394f722c019dbb80ac833dc41256566388e8e Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Beata Michalska <b.michalska@samsung.com>
2014-11-27exynos: fimc-lite: Add support for exynos3250Beata Michalska4-11/+45
Add support for enabling/disabling local output path along with disabling interrupts upon capture being stopped. Change-Id: I8ed2e100138f567dbd10c2eb5083b12110a3c799 Signed-off-by: Beata Michalska <b.michalska@samsung.com>
2014-11-27exynos: fimc-lite: Add compatible string for exynos3250Sylwester Nawrocki1-2/+15
Allow driver initialization on exynos3250. Further changes of the IP handling will be added in subsequent patches. Change-Id: Ifb4571b8173c34a8677c6dba6d23ddfcac63bb2b Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-27V4L: Add driver for Samsung S5K8B1YX image sensorSylwester Nawrocki3-0/+378
This patch adds a stub driver for Samsung S5K8B2YX raw image sensor. There is currently no I2C communication done in this driver. It can be added if required. This driver was tested only with Exynos FIMC-IS subsystem (camera ISP), which communicates with the sensor over I2C bus in firmware. Change-Id: I40ea0b1d6bbb139b85f60941343fd8207f4ece8a Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-21dma-buf: use reservation objectsMaarten Lankhorst1-1/+1
This allows reservation objects to be used in dma-buf. it's required for implementing polling support on the fences that belong to a dma-buf. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> #drivers/media/v4l2-core/ Acked-by: Thomas Hellstrom <thellstrom@vmware.com> #drivers/gpu/drm/ttm Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> #drivers/gpu/drm/armada/ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Conflicts: drivers/gpu/drm/armada/armada_gem.c drivers/gpu/drm/drm_prime.c drivers/gpu/drm/exynos/exynos_drm_dmabuf.c drivers/gpu/drm/i915/i915_gem_dmabuf.c drivers/gpu/drm/nouveau/nouveau_drm.c drivers/gpu/drm/nouveau/nouveau_gem.h drivers/gpu/drm/nouveau/nouveau_prime.c drivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/tegra/gem.c drivers/gpu/drm/ttm/ttm_object.c drivers/staging/android/ion/ion.c Change-Id: I44fbb1f41500deaf9067eb5d7e1c6ed758231d69
2014-11-18[media] s5p-mfc: Adjust memports handling to MFC v7 needs.Jacek Anaszewski1-5/+9
MFC v7 supports only one memory interface. Adjust memory ports initialization accordingly. Change-Id: I56e2c582c41f9ad948dc612b3060688619195b1c Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2014-11-18[media] s5p-mfc: Update driver for v7 firmwareArun Kumar K3-9/+54
Firmware version v7 is mostly similar to v6 in terms of hardware specific controls and commands. So the hardware specific opr_v6 and cmd_v6 are re-used for v7 also. This patch updates the v6 files to handle v7 version also. Change-Id: I137075c6802cfef3aa40cb45413837f18fa969eb Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-mfc: Core support for MFC v7Arun Kumar K2-0/+34
Adds variant data and core support for the MFC v7 firmware Change-Id: I5dc12438d3bfdf6d254f4ced3089e1881d524e0b Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-mfc: Add register definition file for MFC v7Arun Kumar K1-0/+58
The patch adds the register definition file for new firmware version v7 for MFC. New firmware supports VP8 encoding along with many other features. Change-Id: I3abf2768fe2a59ec45f6f4a2660c3ccf23f7ca88 Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-mfc: Rename IS_MFCV6 macroArun Kumar K6-24/+34
The MFC v6 specific code holds good for MFC v7 also as the v7 version is a superset of v6 and the HW interface remains more or less similar. This patch renames the macro IS_MFCV6() to IS_MFCV6_PLUS() so that it can be used for v7 also. Change-Id: Ia27f4ed36cc46568bbe9152f13332436f04e106a Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] media: s5p-mfc: rename special clock to sclk_mfcMarek Szyprowski1-1/+1
Commit d19f405a5a8d2ed942b40f8cf7929a5a50d0cc59 ("[media] s5p-mfc: Fix selective sclk_mfc init") added support for special clock handling (named "sclk-mfc"). However this clock is not defined yet on any platform, so before adding it to all Exynos platform, better rename it to "sclk_mfc" to match the scheme used for all other special clocks on Exynos platform. Change-Id: I41f646096e8a82c3cca032e1cc7a70f6d2960059 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-mfc: Fix selective sclk_mfc initJacek Anaszewski1-0/+24
fc906b6d "Remove special clock usage in driver" removed initialization of MFC special clock, arguing that there's no need to do it explicitly, since it's one of MFC gate clock's dependencies and gets enabled along with it. However, there's no promise of keeping this hierarchy across Exynos SoC releases, therefore this approach fails to provide a stable, portable solution. Out of all MFC versions, only v6 doesn't use special clock at all. For other versions log a message only in case clk_get fails, as not all the devices with the same MFC version require initializing the clock explicitly. Change-Id: Id5ee2696c7b880f45f9744b6bac603dcee9e3dcb Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18Revert "media: s5p-mfc: add to set clock rate"Jacek Anaszewski1-13/+0
This reverts commit 2cbd58556a83b417750483de842e1e918de273a3. Mainline commit d19f405a "Fix selective sclk_mfc init" solves the issue in a wider scope. Change-Id: Ib163697c3ae65e30b6e13f6f7170d791d853a6f0 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2014-11-18[media] s5p-jpeg: fix HUF_TBL_EN bit clearing pathJacek Anaszewski1-1/+1
Use proper bitwise operator while clearing HUF_TBL_EN bit. Change-Id: Ic78dd26168ffa6124d61f8cb9549339f05cff0d9 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: avoid overwriting JPEG_CNTL register settingsJacek Anaszewski1-2/+2
Take into account the JPEG_CNTL register value read before setting SYS_INT_EN bit field. Change-Id: I76b622f01be6747ea2ad95e63fb305377b0f540b Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: remove stray call to readlJacek Anaszewski1-3/+0
There is no need to read INT_EN_REG before enabling interrupts. Change-Id: Idebb919754df34fb2bfa53982a4ea0a7be3f1fe7 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Avoid assigning readl resultJacek Anaszewski1-3/+1
Avoid gcc warning when -Wunused-but-set-variable is enabled. The readl return value need not to be assigned to any variable as the reading itself is just a part of a sequence required for clearing the interrupt flag. Change-Id: I09b9ec4a724ae46eca0491d81003cd0c0f714ad2 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Get rid of a warningMauro Carvalho Chehab1-1/+1
drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c: In function 's5p_jpeg_clear_int': drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c:327:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable] unsigned long reg; ^ Change-Id: I51401e5bc719fd8788933acf2181daa5b82bed38 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdrJacek Anaszewski1-1/+1
Initialize components variable in order to avoid the possibility of using it uninitialized. Change-Id: Ib1c9c11d1fc94aa5aa4e28f24819b32d6dd1ee5c Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2014-11-18[media] s5p-jpeg: add chroma subsampling adjustment for Exynos3250Jacek Anaszewski1-21/+38
Take into account limitations specific to the Exynos3250 SoC, regarding setting the chroma subsampling control's value. Change-Id: I5f106163efb3961b4684c111cee7527bfe5454f6 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Prevent erroneous downscaling for Exynos3250 SoCJacek Anaszewski1-0/+18
JPEG codec on Exynos3250 SoC produces broken raw image if a JPEG image is decoded to YUV420 format and downscaled by a factor greater than 2. Prevent this by asserting downscale ratio to 2. Change-Id: Ib415579d25a4b076a1879b3108c3a08b3dcd4ab8 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Assure proper crop rectangle initializationJacek Anaszewski1-0/+15
Assure proper crop_rect initialization in case the user space doesn't call S_SELECTION ioctl. Change-Id: I0ad267a1f3480efa83e78e714fb4ba94e08494be Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: fix g_selection opJacek Anaszewski1-5/+7
V4L2_SEL_TGT_COMPOSE_DEFAULT switch case should select whole available area of the image and V4L2_SEL_TGT_COMPOSE should apply user settings. Change-Id: I32ea7a72f86a52b001a251782f821d0772f42e54 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Adjust jpeg_bound_align_image to Exynos3250 needsJacek Anaszewski1-5/+20
The jpeg_bound_align_image function needs to know the context in which it is called, as it needs to align image dimensions in a slight different manner for Exynos3250, which crops pixels for specific values in case the format is RGB. Change-Id: I697ec8aa1bf602695618d3bc373031aa8e06d59a Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: return error immediately after get_byte failsJacek Anaszewski1-2/+2
When parsing JPEG header s5p_jpeg_parse_hdr function should return immediately in case there was an error while reading a byte. Change-Id: I82429c1e2878f27276594da1069b30c40b83aadb Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Add support for Exynos3250 SoCJacek Anaszewski7-22/+1338
This patch adds support for jpeg codec on Exynos3250 SoC to the s5p-jpeg driver. Supported raw formats are: YUYV, YVYU, UYVY, VYUY, RGB565, RGB565X, RGB32, NV12, NV21. The support includes also scaling and cropping features. Change-Id: I16bc7135f97ef7cf029dff7e8f7c59cf0fea8daf Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Fix NV12 format entry related to S5C2120 SoCJacek Anaszewski1-2/+1
S5PC210 SoC doesn't support encoding NV12 raw images. Remove relavant flag from the respective entry in the sjpeg_formats array. Change-Id: Ibe70ae070afab4dcf380c41dc36a2a276b8f78f3 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Fix build break when CONFIG_OF is undefinedJacek Anaszewski1-10/+8
This patch fixes build break occurring when there is no support for Device Tree turned on in the kernel configuration. In such case only the driver variant for S5PC210 SoC will be available. Change-Id: Ic747bc56bbc5c624e9c21c9e68b62be806a18f60 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Prevent JPEG 4:2:0 > YUV 4:2:0 decompressionJacek Anaszewski1-3/+22
Prevent decompression of a JPEG 4:2:0 with odd width to the YUV 4:2:0 compliant formats for Exynos4x12 SoCs and adjust capture format to RGB565 in such a case. This is required because the configuration would produce a raw image with broken luma component. Change-Id: Id4bf3ddca3fed89ee1a2db56c342661717e3db2e Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Fix sysmmu page faultJacek Anaszewski1-3/+43
This patch fixes jpeg sysmmu page fault on Exynos4x12 SoCs. During encoding Exynos4x12 SoCs access wider memory area than it results from Image_x and Image_y values written to the JPEG_IMAGE_SIZE register. In order to avoid sysmmu page fault apply proper output buffer size alignment. Change-Id: I39f40d68b10c29d0085cbd0ef986b9f311fd7ba8 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: g_selection callback should always succeedJacek Anaszewski1-2/+1
Remove erroneous guard preventing successful execution of g_selection callback in case the driver variant is different from SJPEG_S5P. Change-Id: I4db87c0abfc0fd15ec8ae137192e522136ecec1b Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Add m2m_ops field to the s5p_jpeg_variant structureJacek Anaszewski2-11/+8
Simplify the code by adding m2m_ops field to the s5p_jpeg_variant structure which allows to avoid "if" statement in the s5p_jpeg_probe function. Change-Id: I3ae0bc8e5af4ee26aa13f136255342eb3c50e89e Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Perform fourcc downgrade only for Exynos4x12 SoCsJacek Anaszewski1-1/+1
Change the driver variant check from "is not S5PC210" to "is Exynos4" while checking whether YUV format needs to be downgraded in order to prevent upsampling which is not supported by Exynos4 SoCs family. Change-Id: Iedda710f6e6ea62555e2bde9481f7e789eb36fb9 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Add fmt_ver_flag field to the s5p_jpeg_variant structureJacek Anaszewski2-7/+5
Simplify the code by adding fmt_ver_flag field to the s5p_jpeg_variant structure which allows to avoid "if" statement in the s5p_jpeg_find_format function. Change-Id: I0f5610b5450a9d29ec1fc09f2837f712b76ac909 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Fix broken indentation in jpeg-regs.hJacek Anaszewski1-12/+12
Change-Id: I5a0ac834689e86400078421f033b5b1d07eb3e05 Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] s5p-jpeg: Fix wrong NV12 format parametersJacek Anaszewski1-4/+4
NV12 format entries in the sjpeg_formats array had wrong colplanes, depth and v_align values. Change-Id: I1c5813862046fa9b1bf0a327721a05e630b39e1c Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>