platform/kernel/linux-3.10.git
9 years ago[media] s5p-mfc: Core support for MFC v7
Arun Kumar K [Tue, 9 Jul 2013 04:24:38 +0000 (01:24 -0300)]
[media] s5p-mfc: Core support for MFC v7

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>
9 years ago[media] s5p-mfc: Add register definition file for MFC v7
Arun Kumar K [Tue, 9 Jul 2013 04:24:37 +0000 (01:24 -0300)]
[media] s5p-mfc: Add register definition file for MFC v7

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>
9 years ago[media] s5p-mfc: Rename IS_MFCV6 macro
Arun Kumar K [Tue, 9 Jul 2013 04:24:36 +0000 (01:24 -0300)]
[media] s5p-mfc: Rename IS_MFCV6 macro

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>
9 years agoARM: dts: exynos3250-rinato: add MFC codec device node
Jacek Anaszewski [Wed, 22 Oct 2014 08:59:10 +0000 (10:59 +0200)]
ARM: dts: exynos3250-rinato: add MFC codec device node

This patch adds mfc codec device tree node.

Change-Id: I6d4ef65b1c518ddcace691c23aded8e0797193e4
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years agoARM: dts: exynos3250: add MFC codec device node
Jacek Anaszewski [Wed, 22 Oct 2014 08:56:45 +0000 (10:56 +0200)]
ARM: dts: exynos3250: add MFC codec device node

This patch adds mfc codec device tree node and the corresponding IOMMU
device node.

Change-Id: I8ea6b68b92fe035ec947cc5319b0cd1d070764d0
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years ago[media] media: s5p-mfc: rename special clock to sclk_mfc
Marek Szyprowski [Wed, 27 Aug 2014 12:36:28 +0000 (09:36 -0300)]
[media] media: s5p-mfc: rename special clock to sclk_mfc

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>
9 years ago[media] s5p-mfc: Fix selective sclk_mfc init
Jacek Anaszewski [Thu, 10 Jul 2014 09:00:39 +0000 (06:00 -0300)]
[media] s5p-mfc: Fix selective sclk_mfc init

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>
9 years agoRevert "media: s5p-mfc: add to set clock rate"
Jacek Anaszewski [Wed, 5 Nov 2014 15:03:30 +0000 (16:03 +0100)]
Revert "media: s5p-mfc: add to set clock rate"

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>
9 years ago[media] s5p-jpeg: fix HUF_TBL_EN bit clearing path
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:52 +0000 (10:05 -0300)]
[media] s5p-jpeg: fix HUF_TBL_EN bit clearing path

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>
9 years ago[media] s5p-jpeg: avoid overwriting JPEG_CNTL register settings
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:51 +0000 (10:05 -0300)]
[media] s5p-jpeg: avoid overwriting JPEG_CNTL register settings

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>
9 years ago[media] s5p-jpeg: remove stray call to readl
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:50 +0000 (10:05 -0300)]
[media] s5p-jpeg: remove stray call to readl

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>
9 years ago[media] s5p-jpeg: Avoid assigning readl result
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:49 +0000 (10:05 -0300)]
[media] s5p-jpeg: Avoid assigning readl result

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>
9 years ago[media] s5p-jpeg: Get rid of a warning
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:23:58 +0000 (11:23 -0300)]
[media] s5p-jpeg: Get rid of a warning

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>
9 years agoARM: dts: exynos3250: add JPEG codec device node
Jacek Anaszewski [Tue, 21 Oct 2014 12:57:59 +0000 (14:57 +0200)]
ARM: dts: exynos3250: add JPEG codec device node

Change-Id: I1c4d9de9c3c476356d71d3c219d7313c9492fddc
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years agos5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr
Jacek Anaszewski [Fri, 10 Oct 2014 08:43:14 +0000 (10:43 +0200)]
s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr

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>
9 years ago[media] s5p-jpeg: add chroma subsampling adjustment for Exynos3250
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:48 +0000 (12:19 -0300)]
[media] s5p-jpeg: add chroma subsampling adjustment for Exynos3250

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>
9 years ago[media] s5p-jpeg: Prevent erroneous downscaling for Exynos3250 SoC
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:47 +0000 (12:19 -0300)]
[media] s5p-jpeg: Prevent erroneous downscaling for Exynos3250 SoC

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>
9 years ago[media] s5p-jpeg: Assure proper crop rectangle initialization
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:46 +0000 (12:19 -0300)]
[media] s5p-jpeg: Assure proper crop rectangle initialization

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>
9 years ago[media] s5p-jpeg: fix g_selection op
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:45 +0000 (12:19 -0300)]
[media] s5p-jpeg: fix g_selection op

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>
9 years ago[media] s5p-jpeg: Adjust jpeg_bound_align_image to Exynos3250 needs
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:44 +0000 (12:19 -0300)]
[media] s5p-jpeg: Adjust jpeg_bound_align_image to Exynos3250 needs

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>
9 years ago[media] s5p-jpeg: return error immediately after get_byte fails
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:43 +0000 (12:19 -0300)]
[media] s5p-jpeg: return error immediately after get_byte fails

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>
9 years ago[media] s5p-jpeg: Add support for Exynos3250 SoC
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:42 +0000 (12:19 -0300)]
[media] s5p-jpeg: Add support for Exynos3250 SoC

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>
9 years ago[media] s5p-jpeg: Document sclk-jpeg clock for Exynos3250 SoC
Jacek Anaszewski [Fri, 11 Jul 2014 15:19:49 +0000 (12:19 -0300)]
[media] s5p-jpeg: Document sclk-jpeg clock for Exynos3250 SoC

JPEG IP on Exynos3250 SoC requires enabling two clock gates
for its operation. This patch documents this requirement.

Change-Id: If6670c5b841d5a4fc7a9e47db5a234fa60e1b92e
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>
9 years ago[media] s5p-jpeg: Fix NV12 format entry related to S5C2120 SoC
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:18 +0000 (04:32 -0300)]
[media] s5p-jpeg: Fix NV12 format entry related to S5C2120 SoC

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>
9 years ago[media] s5p-jpeg: Fix build break when CONFIG_OF is undefined
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:14 +0000 (04:32 -0300)]
[media] s5p-jpeg: Fix build break when CONFIG_OF is undefined

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>
9 years ago[media] s5p-jpeg: Prevent JPEG 4:2:0 > YUV 4:2:0 decompression
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:17 +0000 (04:32 -0300)]
[media] s5p-jpeg: Prevent JPEG 4:2:0 > YUV 4:2:0 decompression

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>
9 years ago[media] s5p-jpeg: Fix sysmmu page fault
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:16 +0000 (04:32 -0300)]
[media] s5p-jpeg: Fix sysmmu page fault

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>
9 years ago[media] s5p-jpeg: g_selection callback should always succeed
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:15 +0000 (04:32 -0300)]
[media] s5p-jpeg: g_selection callback should always succeed

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>
9 years ago[media] s5p-jpeg: Add m2m_ops field to the s5p_jpeg_variant structure
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:13 +0000 (04:32 -0300)]
[media] s5p-jpeg: Add m2m_ops field to the s5p_jpeg_variant structure

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>
9 years ago[media] s5p-jpeg: Perform fourcc downgrade only for Exynos4x12 SoCs
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:12 +0000 (04:32 -0300)]
[media] s5p-jpeg: Perform fourcc downgrade only for Exynos4x12 SoCs

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>
9 years ago[media] s5p-jpeg: Add fmt_ver_flag field to the s5p_jpeg_variant structure
Jacek Anaszewski [Thu, 10 Apr 2014 07:32:11 +0000 (04:32 -0300)]
[media] s5p-jpeg: Add fmt_ver_flag field to the s5p_jpeg_variant structure

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>
9 years ago[media] s5p-jpeg: Fix broken indentation in jpeg-regs.h
Jacek Anaszewski [Thu, 16 Jan 2014 11:26:32 +0000 (08:26 -0300)]
[media] s5p-jpeg: Fix broken indentation in jpeg-regs.h

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>
9 years ago[media] s5p-jpeg: Fix wrong NV12 format parameters
Jacek Anaszewski [Thu, 16 Jan 2014 11:26:33 +0000 (08:26 -0300)]
[media] s5p-jpeg: Fix wrong NV12 format parameters

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>
9 years ago[media] s5p-jpeg: Adjust g_volatile_ctrl callback to Exynos4x12 needs
Jacek Anaszewski [Wed, 18 Dec 2013 14:14:00 +0000 (11:14 -0300)]
[media] s5p-jpeg: Adjust g_volatile_ctrl callback to Exynos4x12 needs

Whereas S5PC210 device produces decoded JPEG subsampling values that
map on V4L2_JPEG_CHROMA_SUBSAMPLNG values, the Exynos4x12 device
doesn't. This patch adds helper function s5p_jpeg_to_user_subsampling,
which performs suitable translation.

Change-Id: Ide93376b0fd413cb769a562ebe727ee706391dff
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Ensure setting correct value of the chroma subsampling control
Jacek Anaszewski [Thu, 21 Nov 2013 16:34:01 +0000 (13:34 -0300)]
[media] s5p-jpeg: Ensure setting correct value of the chroma subsampling control

Exynos4x12 has limitations regarding setting chroma subsampling
of an output JPEG image. It cannot be lower than the subsampling
of the raw source image. Also in case of V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY
option the source image fourcc has to be V4L2_PIX_FMT_GREY.
This patch implements try_ctrl callback containing mechanism that
prevents setting invalid value of the V4L2_CID_JPEG_CHROMA_SUBSAMPLING
control.

Change-Id: Ic0f08644f21fb167e049ac60a7d49b14d5e0f058
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Synchronize V4L2_CID_JPEG_CHROMA_SUBSAMPLING control value
Jacek Anaszewski [Thu, 21 Nov 2013 16:33:52 +0000 (13:33 -0300)]
[media] s5p-jpeg: Synchronize V4L2_CID_JPEG_CHROMA_SUBSAMPLING control value

When output queue fourcc is set to any flavour of YUV,
the V4L2_CID_JPEG_CHROMA_SUBSAMPLING control value as
well as its in-driver cached counterpart have to be
updated with the subsampling property of the format
so as to be able to provide correct information to the
user space and preclude setting an illegal subsampling
mode for Exynos4x12 encoder.

Change-Id: I342638537b57940d411513a5465bf8449a1d1091
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Allow for wider JPEG subsampling scope for Exynos4x12 encoder
Jacek Anaszewski [Thu, 21 Nov 2013 16:33:41 +0000 (13:33 -0300)]
[media] s5p-jpeg: Allow for wider JPEG subsampling scope for Exynos4x12 encoder

Exynos4x12 supports wider scope of subsampling modes than
S5PC210. Adjust corresponding mask accordingly.

Change-Id: Ie734ac8a4e4442e91ff5453fbe4be007607513a5
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Ensure correct capture format for Exynos4x12
Jacek Anaszewski [Fri, 22 Nov 2013 09:13:34 +0000 (06:13 -0300)]
[media] s5p-jpeg: Ensure correct capture format for Exynos4x12

Adjust capture format to the Exynos4x12 device limitations,
according to the subsampling value parsed from the source
JPEG image header. If the capture format was set to YUV with
subsampling lower than the one of the source JPEG image
the decoding process would not succeed.

Change-Id: I12420509e1c9ab887dcf3ab78099917d2bae5ae4
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Retrieve "YCbCr subsampling" field from the jpeg header
Jacek Anaszewski [Thu, 21 Nov 2013 16:33:09 +0000 (13:33 -0300)]
[media] s5p-jpeg: Retrieve "YCbCr subsampling" field from the jpeg header

Make s5p_jpeg_parse_hdr function capable of parsing
"YCbCr subsampling" field of a jpeg file header. Store the
parsed value in the context.

The information about source JPEG subsampling is required to
make validation of destination format possible, which must be
conducted for exynos4x12 device as the decoding process will
not succeed if the destination format is set to YUV with
subsampling lower than the one of the source JPEG image.

With this knowledge the driver can adjust the destination format
appropriately.

Change-Id: I6327a5037cf06eb05f10caba6a86f4d00e5c029b
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: JPEG codec
Jacek Anaszewski [Wed, 18 Dec 2013 14:04:44 +0000 (11:04 -0300)]
[media] s5p-jpeg:  JPEG codec

Add hardware API for the exynos4x12 on s5p-jpeg.

Change-Id: I1b027a76ec22e3291c599e7d6d5317dcba8b617f
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Split jpeg-hw.h to jpeg-hw-s5p.c and jpeg-hw-s5p.c
Jacek Anaszewski [Wed, 18 Dec 2013 12:32:50 +0000 (09:32 -0300)]
[media] s5p-jpeg: Split jpeg-hw.h to jpeg-hw-s5p.c and jpeg-hw-s5p.c

Move function definitions from jpeg-hw.h to jpeg-hw-s5p.c,
add "s5p" prefix and put function declarations in the jpeg-hw-s5p.h.

Change-Id: I7ef4814c8b00afa77de819f6cb248d93c3f7ce1d
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>
9 years ago[media] s5p-jpeg: Synchronize cached controls with V4L2 core
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:15 +0000 (06:58 -0300)]
[media] s5p-jpeg: Synchronize cached controls with V4L2 core

This patch adds proper initialization of the in-driver
cached state of JPEG controls with V4L2 core.

Change-Id: I29d5fccab898d820aa22194e4f71d28be1240f26
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Fix lack of spin_lock protection
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:14 +0000 (06:58 -0300)]
[media] s5p-jpeg: Fix lack of spin_lock protection

s5p_jpeg_device_run and s5p_jpeg_runtime_resume callbacks should
have spin_lock protection as they alter device registers.

Change-Id: I56f19f6314c58e21284562e3e92c08409664aee4
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Fix clock resource management
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:13 +0000 (06:58 -0300)]
[media] s5p-jpeg: Fix clock resource management

Standard suspend/resume path is called after runtime resume
of the given device, so suspend/resume callbacks must do all
clock management done also by runtime pm to allow for proper
power domain shutdown. Moreover, JPEG clock is enabled from
probe function but is is not necessary. This patch also moves
control of jpeg clock to runtime_pm callbacks.

Change-Id: I1292e2514baf3ca1f9af9a8edd3ddcb60f8c5901
Signed-off-by: Marek Szyprowski <m.szyprowski@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>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Rename functions specific to the S5PC210 SoC accordingly
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:12 +0000 (06:58 -0300)]
[media] s5p-jpeg: Rename functions specific to the S5PC210 SoC accordingly

Change-Id: Iafabd18c9728a83b6876ebec59fab1911f8f3266
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Remove superfluous call to the jpeg_bound_align_image function
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:11 +0000 (06:58 -0300)]
[media] s5p-jpeg: Remove superfluous call to the jpeg_bound_align_image function

Aligning capture queue image dimensions while enqueuing output
queue doesn't make a sense as the S_FMT ioctl might have not
been called for the capture queue until that moment, whereas
it is required to know capture format as the type of alignment
heavily depends on it.

Change-Id: I58dd67c5ce088e0ed889515dd53d6f39abc8b80e
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Fix erroneous condition while validating bytesperline value
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:10 +0000 (06:58 -0300)]
[media] s5p-jpeg: Fix erroneous condition while validating bytesperline value

The aim of the condition is ensuring that the bytesperline
value set by the user space application is proper for the
given format and adjusting it if isn't. As the depth value
of the format description entry is expressed in bits then
the bytesperline value needs to be divided, not multiplied,
by that value to get the number of bytes required to store
single line of image samples.

Change-Id: Ied5ab2df3b4ab89d44178481a9b15c51e4d02085
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Fix output YUV 4:2:0 fourcc for decoder
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:09 +0000 (06:58 -0300)]
[media] s5p-jpeg: Fix output YUV 4:2:0 fourcc for decoder

Output samples during decoding phase for the YUV 4:2:0 format
are arranged in the manner compatible with 2-planar NV12,
not 3-planar YUV420 fourcc.

Change-Id: I4619573b0b4b213b2e5def58a7d9247dc28dcd0e
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years ago[media] s5p-jpeg: Reorder quantization tables
Jacek Anaszewski [Mon, 25 Nov 2013 09:58:08 +0000 (06:58 -0300)]
[media] s5p-jpeg: Reorder quantization tables

Reorder quantization tables so that their elements
are arranged in the manner reflecting compression
quality level that is in accordance with V4L2 documentation,
i.e. the larger value of the V4L2_CID_JPEG_COMPRESSION_QUALITY
control the better image quality, and thus lower compression
quality. The modification allows also to get rid of
reverse logic in the s_ctrl callback while assigning
user space value to the ctx->compr_quality variable.

Change-Id: I31e00e212e442b4a959b07967e1b96841ab39528
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoRevert "s5p-jpeg: Add support for Exynos4x12"
Jacek Anaszewski [Wed, 5 Nov 2014 15:02:54 +0000 (16:02 +0100)]
Revert "s5p-jpeg: Add support for Exynos4x12"

This reverts commit 8e4a944989fd90fba6ceb5e84d4c73667b767bdf.

This was rough preliminary commit.

Change-Id: I8db16f03e02e95a2922834fb94b02ead2c21a08e
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years ago[media] s5p-jpeg: Fix encoder and decoder video dev names
Seung-Woo Kim [Thu, 10 Oct 2013 07:45:56 +0000 (04:45 -0300)]
[media] s5p-jpeg: Fix encoder and decoder video dev names

It is hard to distinguish between decoder and encoder video device
because their names are same. So this patch fixes the names.

Change-Id: I593ec9a5f2aa3fa460a11e233239bacf65deda6b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoRevert "media: s5p-jpeg: fix clock management in suspend/resume path"
Jacek Anaszewski [Wed, 5 Nov 2014 15:02:32 +0000 (16:02 +0100)]
Revert "media: s5p-jpeg: fix clock management in suspend/resume path"

This reverts commit 3754f529b2efb8ef65b27e440bb57399179c0e02.

Mainline patches solve the problem.

Change-Id: I6a7eb9a1bd815131c197c64c7b2c791ba17c4cb2
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
9 years agodrm/exynos: add has_vtsel flag
Joonyoung Shim [Tue, 4 Nov 2014 07:11:22 +0000 (16:11 +0900)]
drm/exynos: add has_vtsel flag

The exynos fimd provides video type selection bits from system register
but exynos3 series don't has it, so needs has_vtsel flag and we can
distinguish whether set video type selection bits.

Change-Id: Iacba73e8813454b04551c2617107786f2d59d6ab
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoARM: tizen_defconfig: update number of minors per block device to allow more than...
Inha Song [Tue, 4 Nov 2014 01:44:59 +0000 (10:44 +0900)]
ARM: tizen_defconfig: update number of minors per block device to allow more than 8 partitions

This patch update MMC_BLOCK_MINORS to allow more than 8 partitions per block device.
Number of total MMC minors available is 256.

Change-Id: Ibd9bd1d2236ced4066d60aa53d11d9f82da21f4e
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoarm: tizen_odroid_defconfig: fix file permission to 644
Joonyoung Shim [Tue, 4 Nov 2014 05:06:15 +0000 (14:06 +0900)]
arm: tizen_odroid_defconfig: fix file permission to 644

Please don't change file permission.

Change-Id: I256e0fd874e1b0315f801521b83e48dff48793f5
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
9 years agodrm/exynos: move triggering checking
Joonyoung Shim [Thu, 30 Oct 2014 04:34:10 +0000 (13:34 +0900)]
drm/exynos: move triggering checking

It's better to be checking whether triggerring in fimd_trigger function.
Also it will return if in triggerring on fimd_te_handler, then it can't
execute remain codes.

Change-Id: If8dbcbd139908af330ad59b5d4a66435fe0d77c6
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
9 years agoRevert "drm/exynos: fimd: make a wait_for_vblank event to be handled in same period"
Inki Dae [Thu, 30 Oct 2014 08:29:34 +0000 (17:29 +0900)]
Revert "drm/exynos: fimd: make a wait_for_vblank event to be handled in same period"

This reverts commit d69e45dccaea2e2da28751e0bdaeae67bba1aa78.

Change-Id: I3600f9fc2d29f21c3a0726902f78fcf8d5dcd3d0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoARM: tizen_odroid_defconfig: enable option for USB webcam
Seung-Woo Kim [Wed, 29 Oct 2014 11:21:50 +0000 (20:21 +0900)]
ARM: tizen_odroid_defconfig: enable option for USB webcam

This patch enables uvc config to support usb webcams.

Change-Id: Id9c672cc3b5e25cb48e09827d25e3543562d016d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agoARM: dts: exynos3250-rinato: Fix wrong voltage when attached TA cable
Chanwoo Choi [Tue, 28 Oct 2014 11:44:33 +0000 (20:44 +0900)]
ARM: dts: exynos3250-rinato: Fix wrong voltage when attached TA cable

This patch fix wrong voltage value of TA cable to fix charging issue when
attached TA cable.

Change-Id: I469cccee9f21d711745349c7a4d4c301ae7ff667
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agopower: charger-manager: Support to change polling rate in runtime.
Jonghwa Lee [Fri, 24 Oct 2014 06:26:56 +0000 (15:26 +0900)]
power: charger-manager: Support to change polling rate in runtime.

Add 'polling_ms' sysfs node to change charger-manager's monitoring rate
in runtime. It can set only bigger than 2 jiffies (for 200 HZ system it
is 10 msecs.) as it's allowed for minimum poling rate in previous.
It resets poller and re-configure polling rate based on new input if next
polling time is far enough. Otherwise, it just waits expiration of timer
and new polling rate will affects the next scheduling.

Change-Id: I6a9a07b96db2554e2ec047224df818dcc4ab1a17
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoarm: dts: exynos3250-rinato: Define polling mode in sleep of charger-manager.
Jonghwa Lee [Fri, 24 Oct 2014 05:53:59 +0000 (14:53 +0900)]
arm: dts: exynos3250-rinato: Define polling mode in sleep of charger-manager.

In sleep, enable charger-manager's monitor work only when external power source
exists.

Change-Id: I5bc5f192926827a0011f278704d3273a9b98f25a
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Support different polling mode for sleep state.
Jonghwa Lee [Fri, 24 Oct 2014 05:45:02 +0000 (14:45 +0900)]
power: charger-manager: Support different polling mode for sleep state.

Add additional polling mode for sleep state to define different mode with
normal state. With this change, charger-manager can work differently in
normal state or sleep state. e.g, polling aways for normal and polling
only when charing for sleep. If there is no defined polling mode for
sleep state it just follows the normal state's.
In addition to, polling rate is still same in sleep.

Change-Id: I787a3abd646bdc0be81dccbafbd635c22c84951c
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agotizen: rinato: enable smack permissive mode
Beomho Seo [Tue, 28 Oct 2014 08:07:32 +0000 (17:07 +0900)]
tizen: rinato: enable smack permissive mode

This patch enable smack and smack permissive mode.

Change-Id: I45fe046c135fee48314fef08be9eceb6af0ad667
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
9 years agodrm/panel: s6e63j0x03: correct lcd power status
Inki Dae [Fri, 24 Oct 2014 08:43:14 +0000 (17:43 +0900)]
drm/panel: s6e63j0x03: correct lcd power status

This patch makes sure for panel driver to have correct power status.

Change-Id: I33e6e64969ab6f2679f5f1f889ccfde27d81c901
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/panel: s6e63j0x03: Fix uninitialized power state
Krzysztof Kozlowski [Fri, 24 Oct 2014 07:24:53 +0000 (16:24 +0900)]
drm/panel: s6e63j0x03: Fix uninitialized power state

Fix following DSI panel enable error (booted init=/bin/sh):

echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank
[   55.708859] exynos-dsi 11c80000.dsi: PLL input frequency: 24000000
[   55.709038] exynos-dsi 11c80000.dsi: PLL freq 250000000, (p 3, m 125, s 2)
[   55.709107] exynos-dsi 11c80000.dsi: band 4
[   55.709929] exynos-dsi 11c80000.dsi: PLL failed to stabilize
[   55.709987] exynos-dsi 11c80000.dsi: failed to configure DSI PLL
[   56.007706] exynos-dsi 11c80000.dsi: timeout waiting for reset
[   56.030676] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out
[   56.030804] exynos-dsi 11c80000.dsi: < xfer df45fda8: tx len 3, done 0, rx len 0, done 0
[   56.127024] exynos-dsi 11c80000.dsi: xfer timed out: 03 00 f1 5a 5a
[   56.127125] panel_s6e63j0x03 11c80000.dsi.0: failed to dcs write: -110[f1 5a 5a]

The panel power state was initialized by devm_kzalloc() to 0 which means
FB_BLANK_UNBLANK. Request to unblank frame buffer from sysfs was
triggering a call to panel set_brightness(). This lead to starting DSI
transfers on disabled DSI/panel (no calls to exynos_dsi_enable, s6e63j0x03_prepare,
s6e63j0x03_enable)

Change-Id: I146d46c92c96112a6c616daf83edc57c5b889902
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/panel: s6e63j0x03: add brightness feature
Inki Dae [Fri, 24 Oct 2014 06:04:33 +0000 (15:04 +0900)]
drm/panel: s6e63j0x03: add brightness feature

Change-Id: I9b4b9060a9c8ef63f969951da4bd1b9cc26fa553
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/panel: add .prepare() and .unprepare() functions
Ajay Kumar [Thu, 17 Jul 2014 20:43:48 +0000 (02:13 +0530)]
drm/panel: add .prepare() and .unprepare() functions

Panels often require an initialization sequence that consists of three
steps: a) powering up the panel, b) starting transmission of video data
and c) enabling the panel (e.g. turn on backlight). This is usually
necessary to avoid visual glitches at the beginning of video data
transmission.

Similarly, the shutdown sequence is typically done in three steps as
well: a) disable the panel (e.g. turn off backlight), b) cease video
data transmission and c) power down the panel.

Currently drivers can only implement .enable() and .disable() functions,
which is not enough to implement the above sequences. This commit adds a
second pair of functions, .prepare() and .unprepare() to allow more
fine-grained control over when the above steps are performed.

Change-Id: Id00eec6fd18b9e480975e0c3478a8890cacb79e7
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
[treding: rewrite changelog, add kerneldoc]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: make a wait_for_vblank event to be handled in same period
Inki Dae [Fri, 24 Oct 2014 03:09:35 +0000 (12:09 +0900)]
drm/exynos: fimd: make a wait_for_vblank event to be handled in same period

This patch makes sure for a wait_for_vblank event to be handled
in same period. For this, it adds a new member, triggerred which
means whether trigger request is completed or not since trigger
request.

So if there is a trigger request, update-request, then this patch makes
a wait_for_vblank event to be handled after the trigger request is
completed.

Change-Id: If1a2491a323b637d20806373e0502b2b0a9ff810
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: handle finish pageflip at irq handler
Inki Dae [Fri, 24 Oct 2014 03:05:38 +0000 (12:05 +0900)]
drm/exynos: fimd: handle finish pageflip at irq handler

In case of all modes, i80 and rgb modes, finish page flip request
could be handled at irq handler after framedone. This patch is just
for cleanup.

Change-Id: Idb56e1932fbe7e085be0384eb35b68f699547d18
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: handle wait vsync event at irq handler
Inki Dae [Fri, 24 Oct 2014 03:02:29 +0000 (12:02 +0900)]
drm/exynos: fimd: handle wait vsync event at irq handler

in case of all modes, i80 and rgb modes, wait vsync event
should be handled at irq handler after framedone.

Change-Id: I7dbd38119c5c27a694e3b1c7c160f8205a4b028c
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: do not call fimd_trigger in atomic context
Inki Dae [Fri, 24 Oct 2014 02:54:58 +0000 (11:54 +0900)]
drm/exynos: fimd: do not call fimd_trigger in atomic context

spin lock, win_updated_lock, isn't related to fimd_trigger.

Change-Id: Ia9dd215a2a4809726c357f9de4104c09ce08dc0c
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: move handle vblank position in TE handler
YoungJun Cho [Thu, 23 Oct 2014 06:56:21 +0000 (15:56 +0900)]
drm/exynos: fimd: move handle vblank position in TE handler

For providing VBLANK information, drm_handle_vblank() should
be called properly, but it is blocked by wait_vsync_event
condition which is set by manager_ops->wait_for_vblank().
So moves it out from wait_vsync_event routine.

Change-Id: Id5fc56f65d582fd90ef261f50b302f12ef890353
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoARM: dts: exynos3250-rinato: Add pmureg-phandle node for control XUSBXTI power state...
Inha Song [Thu, 23 Oct 2014 08:18:50 +0000 (17:18 +0900)]
ARM: dts: exynos3250-rinato: Add pmureg-phandle node for control XUSBXTI power state using syscon

This patch add pmureg-phandle node for control XUSBXTI power state using syscon.

Change-Id: I6d3196a55a9c542c3cd411fea9ea7628a9d69d3f
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoASoC: samsung: Add XUSBXTI power state control function for BT call when sleep state
Inha Song [Thu, 23 Oct 2014 08:13:19 +0000 (17:13 +0900)]
ASoC: samsung: Add XUSBXTI power state control function for BT call when sleep state

This patch add XUSBXTI power-state control function for BT call when sleep state.
When sound codec is enabled and entering sleep mode, XUSBXTI_SYS_PWR_REG must be
set to enables for BT call.

Change-Id: I5b385aad102e19c38d048609d99736ba13336253
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoARM: EXYNOS: Remove EXYNOS3_XUSBXTI in PMU configuration registers to control power...
Inha Song [Thu, 23 Oct 2014 08:00:16 +0000 (17:00 +0900)]
ARM: EXYNOS: Remove EXYNOS3_XUSBXTI in PMU configuration registers to control power state using syscon

This patch remove EXYNOS3_XUSBXTI_SYS_PWR_REG in PMU configuration registers
to control XUSBXTI power state using syscon.

Change-Id: I594d316ab08e463f98338a8fac8860933755f1b9
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoarm: dts: exynos3250-rinato: Add 'using-19-bits' flag to max17040 fuelgague.
Jonghwa Lee [Thu, 23 Oct 2014 03:09:37 +0000 (12:09 +0900)]
arm: dts: exynos3250-rinato: Add 'using-19-bits' flag to max17040 fuelgague.

Follow the commit 'be0065c power: max17040: WA: Add flag 'using_19_bits'~',
it adds 'using-19-bits' to max17040 fuelgauge dt node to get correct SoC.

Change-Id: I9c2b4d60a2abb0dcb177cb81fbdd4c46d9556aee
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: max17040: WA: Add flag 'using_19_bits' to determine SoC in double.
Jonghwa Lee [Thu, 23 Oct 2014 03:05:17 +0000 (12:05 +0900)]
power: max17040: WA: Add flag 'using_19_bits' to determine SoC in double.

No information about actual meaning of using 19 bits, it's just copied
from vendor's code. However, It is clear that it represents doubled SoC
if the chip is marked with 'using 19 bits'. Rinato needs to half the SoC
register's value to get correct one.

Change-Id: I0d873de3e7671c2494955735364934156ab756d9
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: max17040: Fix data transfering size from 8bits to 16bits.
Jonghwa Lee [Thu, 23 Oct 2014 01:51:42 +0000 (10:51 +0900)]
power: max17040: Fix data transfering size from 8bits to 16bits.

Even max17040 fuelgauge chip's registers are segmented in size of 8bits
(MSB, LSB), it transfers data only in 16bits. So, it should read both of
MSB, LSB registers at once.

Change-Id: I87150fbf9b14adf65fc9fdf912f963ab591586e3
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopackaging: fix %setup top dir name
Stephane Desneux [Wed, 22 Oct 2014 15:48:40 +0000 (17:48 +0200)]
packaging: fix %setup top dir name

Change-Id: I21a9d05153a3e80cebdc7901fb3c0e03635417ec
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
9 years agoarm: dts: exynos3250-rinato: Set charger-manager polling always.
Jonghwa Lee [Wed, 22 Oct 2014 11:03:35 +0000 (20:03 +0900)]
arm: dts: exynos3250-rinato: Set charger-manager polling always.

Enable charger-manager's polling mode to always to monitor and notify
the battery capcity.

Change-Id: If7f26a6ac064c1a860ea098109b3ae9609a123f8
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Update essential battery information at once.
Jonghwa Lee [Wed, 22 Oct 2014 09:07:35 +0000 (18:07 +0900)]
power: charger-manager: Update essential battery information at once.

In current code, charger-manager may attemps to read battery state more
than once in a same period. And it already did such when user accesses
uevent, it reads battery voltage several times.
This patch makes charger-manager to read current battery state including
SoC, voltage and temperature at the start of monitoring and re-use it
during whole period.

Change-Id: Ic69ddb465a75237ded0488cb3eb41f47bb909311
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Not to start charging directly in cable nofitication.
Jonghwa Lee [Wed, 22 Oct 2014 06:13:51 +0000 (15:13 +0900)]
power: charger-manager: Not to start charging directly in cable nofitication.

This patch prevents direct charging control in cable notification.
It sets only input current limit according to cable type and yields charging
control to be done by cm_monitor() where charging management proceeds.
It may loose few ms to enable charging compared to before, even though it's
more important that charging is enabled only for safe context.

Change-Id: Ic736b9d18829f6d6dab946515dd0fe62fe7b75c4
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Make chraging decision focused on battery status.
Jonghwa Lee [Wed, 22 Oct 2014 02:32:10 +0000 (11:32 +0900)]
power: charger-manager: Make chraging decision focused on battery status.

In cm_monitor() where charging management starts, it checks various charging
condition sequentially to decide next charging operation. However, as it
follows sequential process, cascade if statements, it does some duplicated
jobs which is already done in previous stage. It results delay in decision
making. And moreover, starting point of charing is spreaded all around, so
it makes maintain codes and debugging difficult.

Both of problems mentioned above becomes clean if it manages battery charging
with focusing battery status not following sequential condition checking.
Now, cm_monitor() moves battery state diagram and does optimal operation for
current state. As a result, it reduces whole monitoring time almost in half.

Change-Id: I1c8cfe57cea6fc8c02a4c0bf7bde6a0d8395b786
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Get external power souce information only from EXTCON.
Jonghwa Lee [Tue, 21 Oct 2014 07:38:58 +0000 (16:38 +0900)]
power: charger-manager: Get external power souce information only from EXTCON.

When charger-manager checks whether external power source is available,
it gets information from charger IC driver. However, it's not correct source,
charger IC doesn't have responsibilty to give cable connection status.
The charger-manager already gets cable information from EXTCON susbsystem,
so it can re-use it.

Change-Id: I408546beefe63707fcb927db7d92c4005f3848f8
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoARM: dts: exynos3250-rinato: fix pin control of BT_UART_RTS pin
Beomho Seo [Wed, 22 Oct 2014 10:25:54 +0000 (19:25 +0900)]
ARM: dts: exynos3250-rinato: fix pin control of BT_UART_RTS pin

This patch fix pinctrl of BT_UART_RTS when sleep state.

Change-Id: I6b595e7784dbc769ff7e6fed15e1660132d8e9ff
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
9 years agoFix source tarball name for odroid and rinato kernels.
Stephane Desneux [Tue, 21 Oct 2014 09:42:57 +0000 (11:42 +0200)]
Fix source tarball name for odroid and rinato kernels.

Change-Id: I1b14b5f5b19eb8aa1eba11f5fc11c63d4e4a1759
Bug-Tizen: TC-1495
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
9 years agopackaging: rename linux-kernel.spec to linux-3.10.spec
Chanho Park [Mon, 20 Oct 2014 12:50:13 +0000 (21:50 +0900)]
packaging: rename linux-kernel.spec to linux-3.10.spec

Stephane recommended renaming of the spec file.
https://bugs.tizen.org/jira/browse/TC-1495

Change-Id: If0f38c516e2443d4c268fa2272cda15f4df0e278
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoperf tools: define _DEFAULT_SOURCE for glibc_2.20
Chanho Park [Fri, 12 Sep 2014 02:03:01 +0000 (11:03 +0900)]
perf tools: define _DEFAULT_SOURCE for glibc_2.20

_BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc
2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should
also be defined.

[1]: https://sourceware.org/glibc/wiki/Release/2.20

Change-Id: I89b03ce322a85f01375f73185fbcfb07403c8ee9
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agopower: charger-manager: Concentrate scattered power_supply_changed() calls.
Jonghwa Lee [Mon, 20 Oct 2014 05:14:53 +0000 (14:14 +0900)]
power: charger-manager: Concentrate scattered power_supply_changed() calls.

Current charger-manager calls power_suuply_changed() whenever charging
status is changed. This patch removes seperated power_supply_changed()
use and let it be called at end of try_charger_enable() function which
is called to set charging/discharging.

Change-Id: I98c823268207a891fba9d38dc71692e2e0791ae7
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agothermal: exynos3250: Add interrupt mask for rising/falling interrupt to pdata.
Jonghwa Lee [Fri, 17 Oct 2014 11:23:44 +0000 (20:23 +0900)]
thermal: exynos3250: Add interrupt mask for rising/falling interrupt to pdata.

Interrupt mask will be used to clear unexpected interrupt arisen when rising/
falling thresholds are set.

Change-Id: I570018c7b541a54e2b3d8dbfa2a14f2863682edb
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agothermal: samsung: Only update available threshold limits
Tushar Behera [Mon, 14 Apr 2014 05:38:15 +0000 (11:08 +0530)]
thermal: samsung: Only update available threshold limits

Currently the threshold limits are updated in 2 stages, once for all
software trigger levels and again for hardware trip point.

While updating the software trigger levels, it overwrites the threshold
limit for hardware trip point thereby forcing the Exynos core to issue
an emergency shutdown.

Updating only the required fields in threshold register fixes this issue.

Change-Id: I7ad7a7eadad874b5ec4ecd7fbed207c01cad4e2f
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
9 years agosensorhub: Fix temporary spi_read error
Jaewon Kim [Fri, 17 Oct 2014 02:55:07 +0000 (11:55 +0900)]
sensorhub: Fix temporary spi_read error

When try to read SPI, sometimes buffer filled with zero.
And spi_read does not return error.

In normal case, first byte of buffer is used to command byte.
And this is not zero. So, this patch checks first byte of buffer.

Change-Id: If75d57c0426d819476d87e82391901dfb8fa1652
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
9 years agoARM: dts: exynos3250-rinato: Fix opmode of regulator and wrong description
Chanwoo Choi [Fri, 17 Oct 2014 02:11:07 +0000 (11:11 +0900)]
ARM: dts: exynos3250-rinato: Fix opmode of regulator and wrong description

This patch fix opmoe of regulator (VAP_AVDD_1.8V) to protect bug in suspend state
and modify wrong description of regulator opmode.

Change-Id: Ibff0afd063ade91967995f52acf924d4c6faa35a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agoRevert "ARM: dts: Add TMU dt node for exynos3250-rinato"
Chanwoo Choi [Fri, 17 Oct 2014 02:09:41 +0000 (11:09 +0900)]
Revert "ARM: dts: Add TMU dt node for exynos3250-rinato"

This reverts commit 5b64bbdc428d3944b04457a4933565474263eaec.

Change-Id: I99a4da680e8c851537f9a007ee7d67c75e192258

9 years agoclocksource: exynos_mct: Don't reset the counter during boot and resume
Chirantan Ekbote [Wed, 11 Jun 2014 15:18:48 +0000 (00:18 +0900)]
clocksource: exynos_mct: Don't reset the counter during boot and resume

Unfortunately on some exynos systems, resetting the mct counter also
resets the architected timer counter.  This can cause problems if the
architected timer driver has already been initialized because the kernel
will think that the counter has wrapped around, causing a big jump in
printk timestamps and delaying any scheduled clock events until the
counter reaches the value it had before it was reset.

The kernel code makes no assumptions about the initial value of the mct
counter so there is no reason from a software perspective to clear the
counter before starting it.  This also fixes the problems described in
the previous paragraph.

Change-Id: I35f6bcd1e0ef46d5c19183dc526078a6b8b4ca64
Cc: Olof Johansson <olof@lixom.net>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agopower: max14577_charger: Fix to represent cable type properly.
Jonghwa Lee [Wed, 15 Oct 2014 10:23:52 +0000 (19:23 +0900)]
power: max14577_charger: Fix to represent cable type properly.

It shows '1' even for none-typed cable that might mislead user or
charging managment to understand that there is a charge-able cable
which is truly not. It should return 0 for none-typed cable to prevent
wrong attempt for charging.

Change-Id: I851ac424b6895867e611f6786bdb18e540d7f2d4
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoarm: configs: tizen_rinato: Enable PM_AUTOSLEEP and PM_WAKEUPLOCKS.
Jonghwa Lee [Wed, 15 Oct 2014 10:12:19 +0000 (19:12 +0900)]
arm: configs: tizen_rinato: Enable PM_AUTOSLEEP and PM_WAKEUPLOCKS.

This patch enables CONFIG_PM_AUTOSLEEP and CONFIG_PM_WAKEUPLOCKS
to support device driver and user processor to hold wakeup on demand.

Change-Id: I2b5504c5a92be0a9923fc03d60c438edceb9f1a7
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agopower: charger-manager: Hold wakeup event until userspace notice.
Jonghwa Lee [Wed, 15 Oct 2014 09:54:21 +0000 (18:54 +0900)]
power: charger-manager: Hold wakeup event until userspace notice.

This is workaround to let userspace notice about battery's status
chaiging during suspend and resume. It holds wakeup event to prevent
system goes into sleep. Holding wakeup event time is heuristic value
and it could be varied.

To make this works, it needs CONFIG_PM_AUTOSLEEP kernel option.

Change-Id: I22a818e69632574a2d684cd957f62b3329d57c8f
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agodrm/exynos: correct connector->dpms field before resuming
Inki Dae [Wed, 15 Oct 2014 07:08:41 +0000 (16:08 +0900)]
drm/exynos: correct connector->dpms field before resuming

During system suspend after connector switch off its dpms field
is set to connector previous dpms state. To properly resume dpms field
should be set to its actual state (off) before resuming to previous dpms state.

Change-Id: I80acefcd408279c3c1cf3b0e89133dc6899a6914
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agortc: s5m: Adjust kernel message level to debug.
Jonghwa Lee [Tue, 14 Oct 2014 10:32:37 +0000 (19:32 +0900)]
rtc: s5m: Adjust kernel message level to debug.

This patch adjusts all infomative message from s5m rtc driver to
debug level.

Change-Id: I52f6903fce2bd6d61b8e5f81aa521a3bf7dad9bc
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>