platform/kernel/linux-exynos.git
7 years agoLOCAL / PM / devfreq: rollback mutex locking for update_devfreq()
Joonyoung Shim [Mon, 7 Sep 2015 07:42:31 +0000 (16:42 +0900)]
LOCAL / PM / devfreq: rollback mutex locking for update_devfreq()

Userspace, performance and powersave governers call update_devfreq()
with mutex locking. It causes nested mutex locking error.

I'm not sure that i should make a choice which reverting change that
includes mutex locking in update_devfreq() or removing mutex locking
before update_devfreq() is called on each governers.

IMHO, the upstream codes don't include mutex locking in update_devfreq()
so first option is better.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agoinput: touchscreen: Add sysfs node for control power
Beomho Seo [Mon, 14 Sep 2015 11:57:56 +0000 (20:57 +0900)]
input: touchscreen: Add sysfs node for control power

This patch add sysfs node for control power.
User layer can control to use this node.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agodrm/exynos: fix waiting pageflip on i80 panel
Joonyoung Shim [Fri, 23 Oct 2015 02:43:44 +0000 (11:43 +0900)]
drm/exynos: fix waiting pageflip on i80 panel

If panel is use i80 interface, encoder should wait to complete prior
pageflip before encoder disables panel because te interrupt is happened
by panel.

Upstream Exynos DRM driver doesn't need this because Exynos atomic
commit procedures already does this job of waiting for pending updates
to finish. Refer the commit c4533665d819 ("drm/exynos: wait all planes
updates to finish") applied from v4.3-rc1

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[fix build issue because of removed pending_flip]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agodrm: permit DRM_RENDER_ALLOW on DRM_IOCTL_GEM_FLINK
Joonyoung Shim [Tue, 6 Oct 2015 07:34:51 +0000 (16:34 +0900)]
drm: permit DRM_RENDER_ALLOW on DRM_IOCTL_GEM_FLINK

This permits DRM_RENDER_ALLOW on DRM_IOCTL_GEM_FLINK temporarily by
request of tizen platform until tizen platform uses dma-buf feature
fully.

Change-Id: I0431dba35655871c734611a9b53c39ec4f1bb26a
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agodrm/exynos: add DRM_EXYNOS_GEM_MAP ioctl
Joonyoung Shim [Fri, 2 Oct 2015 07:38:34 +0000 (16:38 +0900)]
drm/exynos: add DRM_EXYNOS_GEM_MAP ioctl

The commit d931589c01a2 ("drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET
ioctl") removed it same with the ioctl that this patch adds. The reason
that removed DRM_EXYNOS_GEM_MAP_OFFSET was we could use
DRM_IOCTL_MODE_MAP_DUMB. Both did exactly same thing.

Now we again will revive it as DRM_EXYNOS_GEM_MAP because of render
node. DRM_IOCTL_MODE_MAP_DUMB isn't permitted in render node.

Change-Id: I6900f89aa1f14ab06f56e257c4e77639cba8d5c7
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agoLOCAL / arm64: Enable configurations relevant to NAT tables
Jaehoon Chung [Tue, 20 Oct 2015 08:13:09 +0000 (17:13 +0900)]
LOCAL / arm64: Enable configurations relevant to NAT tables

To use iptables conmmand, enable the configurations relevant to NAT
tables.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL / net: bcm4358: Enable the some configurations
Jaehoon Chung [Fri, 16 Oct 2015 06:31:52 +0000 (15:31 +0900)]
LOCAL / net: bcm4358: Enable the some configurations

Enabled configurations related to write mac-address

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL / net: bcm4358: fix the compiler warning for broadcom driver
Jaehoon Chung [Wed, 30 Sep 2015 03:54:58 +0000 (12:54 +0900)]
LOCAL / net: bcm4358: fix the compiler warning for broadcom driver

Fixed the compiler warning for broadcom driver.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoarm64: dts: exynos5433-tm2: Fix buck[23] voltage reset during suspend
Krzysztof Kozlowski [Fri, 2 Oct 2015 08:02:14 +0000 (17:02 +0900)]
arm64: dts: exynos5433-tm2: Fix buck[23] voltage reset during suspend

Disable WRSTBI because it is pulled down triggering buck voltage warm
reset on each suspend to RAM.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agomfd: sec-core: Disable buck voltage reset on watchdog falling edge
Krzysztof Kozlowski [Fri, 2 Oct 2015 07:40:34 +0000 (16:40 +0900)]
mfd: sec-core: Disable buck voltage reset on watchdog falling edge

The WRSTBI bit (disabled by default but enabled by bootloader), when
set, is responsible for resetting voltages to default values of
certain bucks on falling edge of Warm Reset Input pin from AP.

However on some boards (with S2MPS13) the pin is pulled down so any
suspend will effectively trigger the reset of bucks supplying the power
to the little and big cores. In the same time when resuming, these bucks
must provide voltage greater or equal to voltage before suspend to match
the frequency chosen by cpufreq. If voltage (default value of voltage
after reset) is lower than one set by cpufreq before suspend, then
system will hang during resuming.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agomfd: dt-bindings: Document pulled down WRSTBI pin on S2MPS1X
Krzysztof Kozlowski [Fri, 2 Oct 2015 07:46:40 +0000 (16:46 +0900)]
mfd: dt-bindings: Document pulled down WRSTBI pin on S2MPS1X

Document a new Device Tree property 'samsung,s2mps11-wrstbi-ground'
indicating that WRSTBI pin of S2MPS13 PMIC is pulled down so
corresponding buck warm reset function should be disabled.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agomfd: sec-core: Dump PMIC revision to find out the HW
Krzysztof Kozlowski [Fri, 2 Oct 2015 01:10:52 +0000 (10:10 +0900)]
mfd: sec-core: Dump PMIC revision to find out the HW

There are different revisions of the same chipset. For example S2MPS13 has
more than 2 revisions. They differ slightly in regulator constraints.
Print the revision number to easily find which PMIC is used on the board.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / net: bcm4358: add the 'name_assigne_type' argument for add_virtual_intf
Jaehoon Chung [Tue, 22 Sep 2015 06:38:50 +0000 (15:38 +0900)]
LOCAL / net: bcm4358: add the 'name_assigne_type' argument for add_virtual_intf

Add the "unsigned char name_assign_type" at add_virtual_intf callback.
So fixed it for broadcom driver.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL / net: bcm4358: set wowlan_config for broadcom driver
Jaehoon Chung [Tue, 22 Sep 2015 05:29:04 +0000 (14:29 +0900)]
LOCAL / net: bcm4358: set wowlan_config for broadcom driver

Refer to commit 6abb9cb99f33b20c.
(cfg80211: make WoWLAN configuration available to drivers.)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL / net: bcm4358: Disable wakelock configuration
Jaehoon Chung [Thu, 17 Sep 2015 05:40:23 +0000 (14:40 +0900)]
LOCAL / net: bcm4358: Disable wakelock configuration

Wakelock is android mechanisme. Tizen dosen't use it.
In addition, set to BCMPCIE_DISABLE_ASYNC_SUSPEND config.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agodevfreq: Remove mutex deadlock caused by modification of update_devfreq()
Jonghwa Lee [Mon, 21 Sep 2015 07:43:26 +0000 (16:43 +0900)]
devfreq: Remove mutex deadlock caused by modification of update_devfreq()

By commit 'd70aa318 PM: devfreq: Add the prototype of update_devfreq()~',
mutex locking is moved into update_devfreq(). So that any attempts to
acquire the mutex in outside causes deadlock. This patch removes mutex
lockings from where can cause deadlock potentially.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
7 years agoarm64: configs: defconfig: Enable CONFIG_DEVFREQ_GOV_PERFORMANCE
Jonghwa Lee [Mon, 21 Sep 2015 07:02:32 +0000 (16:02 +0900)]
arm64: configs: defconfig: Enable CONFIG_DEVFREQ_GOV_PERFORMANCE

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
7 years agolocal/net: bcm4358: fix netdevice notifier to use info struct
Seung-Woo Kim [Thu, 17 Sep 2015 09:32:20 +0000 (18:32 +0900)]
local/net: bcm4358: fix netdevice notifier to use info struct

After commit 351638e7deeed2ec8ce451b53d3 (net: pass info struct via netdevice notifier),
the struct netdev_notifier_info is passed to netdevice notifier.
So this patch fixes wl_cfg80211_netdev_notifier_call() to use the
info struct.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoLOCAL / ASoC: samsung: Add PM operation to ensure playback after PM suspend/resume
Inha Song [Thu, 17 Sep 2015 06:29:17 +0000 (15:29 +0900)]
LOCAL / ASoC: samsung: Add PM operation to ensure playback after PM suspend/resume

This patch add suspend/resume operation to ensure playback after
PM suspend/resume.

If you wakeup by the resume after entering to suspend during the playback,
We should be re-setup the codec's pll and sysclk to ensure codec operation.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoLOCAL / mfd: arizona: Call the runtime PM function if the state is runtime resumed
Inha Song [Wed, 16 Sep 2015 03:21:36 +0000 (12:21 +0900)]
LOCAL / mfd: arizona: Call the runtime PM function if the state is runtime resumed

This patch call runtiem PM function manually if the state is runtime resumed
before enter suspend.

This case has occurred when wake-up by the resume after entering to
suspend during the playback.
$ aplay -> runtime_resume() -> suspend() -> resume()

In this case, Can occurred an error when enter suspend.
--
[   82.559234] PM: suspend of devices complete after 57.252 msecs
[   82.567978] arizona spi1.0: Failed to read IRQ status: -108
[   82.567989] arizona spi1.0: Failed to read main IRQ status: -108
[   82.568027] arizona spi1.0: Failed to read IRQ status: -108
[   82.568036] arizona spi1.0: Failed to read main IRQ status: -108
....
So, we should call runtime_suspend() manually when enter suspend
if the state is runtime resume.

Also should call runtime_resume() when wake-up by resume if the state
was runtime resume before entering suspend.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agothermal: consistently use int for trip temp
Wei Ni [Thu, 3 Mar 2016 09:33:46 +0000 (17:33 +0800)]
thermal: consistently use int for trip temp

The commit 17e8351a7739 consistently use int for temperature,
however it missed a few in trip temperature and thermal_core.

In current codes, the trip->temperature used "unsigned long"
and zone->temperature used"int", if the temperature is negative
value, it will get wrong result when compare temperature with
trip temperature.

This patch can fix it.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
[backport from mainline to fix previous backported commit]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoRevert "Correct backport of fa3c776 ("Thermal: Ignore invalid trip points")"
Seung-Woo Kim [Fri, 30 Sep 2016 12:38:43 +0000 (21:38 +0900)]
Revert "Correct backport of fa3c776 ("Thermal: Ignore invalid trip points")"

This reverts commit 5640c4c37eee293451388cd5ee74dfed3a30f32d.

In this tree, the commit 17e8351a7739 ("thermal: consistently use
int for temperatures") is already backported, so this patch should
be reverted.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agothermal: consistently use int for temperatures
Sascha Hauer [Fri, 24 Jul 2015 06:12:54 +0000 (08:12 +0200)]
thermal: consistently use int for temperatures

The thermal code uses int, long and unsigned long for temperatures
in different places.

Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.

'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.

Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Peter Feuerer <peter@piie.net>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Peter Feuerer <peter@piie.net>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
7 years agoLOCAL/arm64: defconfig: replace legacy sec_nfc to s3fwrn5 driver
Seung-Woo Kim [Tue, 15 Sep 2015 08:34:33 +0000 (17:34 +0900)]
LOCAL/arm64: defconfig: replace legacy sec_nfc to s3fwrn5 driver

This patch replaces legacy sec_nfc driver to s3fwrn5 nfc driver.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoarm64: dts: exynos5433-tm2: add s3fwrn5 node
Robert Baldyga [Fri, 26 Jun 2015 13:24:04 +0000 (15:24 +0200)]
arm64: dts: exynos5433-tm2: add s3fwrn5 node

Add s3fwrn5 node for TM2 board to enable NFC feature.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
7 years agonfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip
Robert Baldyga [Thu, 20 Aug 2015 14:43:38 +0000 (16:43 +0200)]
nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip

Add driver for Samsung S3FWRN5 NFC controller.
S3FWRN5 is using NCI protocol and I2C communication interface.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
7 years agoNFC: nci: export nci_core_reset and nci_core_init
Robert Baldyga [Wed, 19 Aug 2015 13:19:40 +0000 (15:19 +0200)]
NFC: nci: export nci_core_reset and nci_core_init

Some drivers needs to have ability to reinit NCI core, for example after
updating firmware in setup() of post_setup() callback. This patch makes
nci_core_reset() and nci_core_init() functions public, to make it possible.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
7 years agoNFC: nci: Add post_setup handler
Robert Baldyga [Mon, 17 Aug 2015 11:54:13 +0000 (13:54 +0200)]
NFC: nci: Add post_setup handler

Some drivers require non-standard configuration after NCI_CORE_INIT
request, because they need to know ndev->manufact_specific_info or
ndev->manufact_id. This patch adds post_setup handler allowing to do
such custom configuration.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
7 years agoNFC: nci: Handle proprietary response and notifications
Samuel Ortiz [Sat, 6 Jun 2015 11:16:37 +0000 (13:16 +0200)]
NFC: nci: Handle proprietary response and notifications

Allow for drivers to explicitly define handlers for each
proprietary notifications and responses they expect to support.

Reviewed-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
7 years agoNFC: nci: Add nci_prop_cmd allowing to send proprietary nci cmd
Christophe Ricard [Sat, 6 Jun 2015 11:16:41 +0000 (13:16 +0200)]
NFC: nci: Add nci_prop_cmd allowing to send proprietary nci cmd

Handle allowing to send proprietary nci commands anywhere in the nci
state machine.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
7 years agoLOCAL / arm64: defconfig: disable smack permissive mode
Seung-Woo Kim [Wed, 9 Sep 2015 05:23:41 +0000 (14:23 +0900)]
LOCAL / arm64: defconfig: disable smack permissive mode

Tizen platform is finished for smack bringup, so this patch
disables smack permissive mode.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agos5p-mfc: use MFC_BUF_FLAG_EOS to identify last buffers in decoder capture queue
Andrzej Hajda [Thu, 3 Sep 2015 12:41:22 +0000 (14:41 +0200)]
s5p-mfc: use MFC_BUF_FLAG_EOS to identify last buffers in decoder capture queue

MFC driver never delivered EOS event to apps feeding constantly its capture
buffer with fresh buffers. The patch fixes it by marking last buffers returned
by MFC with MFC_BUF_FLAG_EOS flag and firing EOS event on de-queuing such
buffers.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
7 years agov4l2-compat-ioctl32: fix alignment for ARM64
Andrzej Hajda [Tue, 1 Sep 2015 11:52:38 +0000 (13:52 +0200)]
v4l2-compat-ioctl32: fix alignment for ARM64

Alignment/padding rules on AMD64 and ARM64 differs. To allow properly match
compatible ioctls on ARM64 kernels without breaking AMD64 some fields
should be aligned using compat_s64 type and in one case struct should be
unpacked.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
7 years agomisc: tizen_global_lock: apply uaccess
Seung-Woo Kim [Tue, 1 Sep 2015 12:41:14 +0000 (21:41 +0900)]
misc: tizen_global_lock: apply uaccess

This patch applies uaccess for user pointer to fix user memory
access.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agofimc-is: 6d1: add sentinel element to id table
Seung-Woo Kim [Tue, 1 Sep 2015 08:21:01 +0000 (17:21 +0900)]
fimc-is: 6d1: add sentinel element to id table

This patch adds sentinel element to id table to fix following out
of bounds access:
    ==================================================================
    BUG: KASan: out of bounds access in i2c_device_match+0xcc/0xf0 at addr ffffffc00120ee80
    Read of size 1 by task swapper/0/1
    page:ffffffbdc0848380 count:1 mapcount:0 mapping:          (null) index:0x0
    flags: 0x400(reserved)
    page dumped because: kasan: bad access detected
    Address belongs to variable sensor_6d1_idt+0x20/0x40
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e4f0>] kasan_report_error+0x3e0/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d8f0>] __asan_load1+0x78/0x80
    [<ffffffc000916b78>] i2c_device_match+0xc8/0xf0
    [<ffffffc0006d9d54>] __driver_attach+0x3c/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc000917fc0>] i2c_register_driver+0x48/0xc8
    [<ffffffc001795344>] sensor_6d1_load+0x18/0x24
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc00120ed80: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 fa fa
     ffffffc00120ee00: fa fa fa fa 00 00 06 fa fa fa fa fa 00 00 00 00
    >ffffffc00120ee80: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
                       ^
     ffffffc00120ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc00120ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ==================================================================

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agofimc-is: fix wrong index access for dt child nodes
Seung-Woo Kim [Tue, 1 Sep 2015 07:59:03 +0000 (16:59 +0900)]
fimc-is: fix wrong index access for dt child nodes

This patch fixes wrong index access for dt child nodes. This fixes
following use after free:
    ==================================================================
    BUG: KASan: use after free in fimc_is_parse_children_dt+0x6c/0xe8 at addr ffffffc08d27ffa8
    Write of size 8 by task swapper/0/1
    page:ffffffbdc2b49fc0 count:0 mapcount:0 mapping:          (null) index:0x0
    flags: 0x0()
    page dumped because: kasan: bad access detected
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e510>] kasan_report_error+0x400/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d38c>] __asan_store8+0x94/0xb0
    [<ffffffc000991900>] fimc_is_parse_children_dt+0x68/0xe8
    [<ffffffc000959368>] fimc_is_probe+0xc0/0xed8
    [<ffffffc0006dc724>] platform_drv_probe+0x64/0xf8
    [<ffffffc0006d9ae8>] driver_probe_device+0x1f0/0x3a8
    [<ffffffc0006d9de0>] __driver_attach+0xc8/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc0006dc618>] __platform_driver_register+0xa8/0xb8
    [<ffffffc0017952c0>] fimc_is_driver_init+0x18/0x24
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc08d27fe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
     ffffffc08d27ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    >ffffffc08d27ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                      ^
     ffffffc08d280000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc08d280080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ==================================================================

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agophy: phy-exynos-mipi-video: Add sentinel element in match array
Seung-Woo Kim [Tue, 1 Sep 2015 07:51:56 +0000 (16:51 +0900)]
phy: phy-exynos-mipi-video: Add sentinel element in match array

This patch adds sentinel element in match array to fix following
out of bounds access:
    ==================================================================
    BUG: KASan: out of bounds access in __of_match_node+0x38/0xb8 at addr ffffffc001024010
    Read of size 1 by task swapper/0/1
    page:ffffffbdc0840900 count:1 mapcount:0 mapping:          (null) index:0x0
    flags: 0x400(reserved)
    page dumped because: kasan: bad access detected
    Address belongs to variable exynos_mipi_video_phy_of_match+0x190/0x3c0
    CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e4f0>] kasan_report_error+0x3e0/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d8f0>] __asan_load1+0x78/0x80
    [<ffffffc000a5aaa4>] __of_match_node+0x34/0xb8
    [<ffffffc000a5ab5c>] of_match_node+0x34/0x60
    [<ffffffc000a5d2cc>] of_match_device+0x2c/0x50
    [<ffffffc0006dcd58>] platform_match+0x68/0x130
    [<ffffffc0006d9d54>] __driver_attach+0x3c/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc0006dc618>] __platform_driver_register+0xa8/0xb8
    [<ffffffc0017855f4>] exynos_mipi_video_phy_driver_init+0x14/0x20
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc001023f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc001023f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    >ffffffc001024000: 00 00 fa fa fa fa fa fa 00 00 00 fa fa fa fa fa
                             ^
     ffffffc001024080: 00 00 00 fa fa fa fa fa 00 00 00 01 fa fa fa fa
     ffffffc001024100: 00 00 06 fa fa fa fa fa 00 00 03 fa fa fa fa fa
    ==================================================================

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoextcon: max77843: add guard element in array
Seung-Woo Kim [Tue, 1 Sep 2015 07:42:44 +0000 (16:42 +0900)]
extcon: max77843: add guard element in array

This patch adds guard element in cable array to check last element.
This fixes following out of bounds access:
    ==================================================================
    BUG: KASan: out of bounds access in extcon_dev_register+0xc0/0x978 at addr ffffffc001bcc440
    Read of size 8 by task swapper/0/1
    page:ffffffbdc086f300 count:1 mapcount:0 mapping:          (null) index:0x0
    flags: 0x400(reserved)
    page dumped because: kasan: bad access detected
    Address belongs to variable max77843_extcon_cable+0x60/0xf00
    CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e4f0>] kasan_report_error+0x3e0/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d2dc>] __asan_load8+0x94/0xb0
    [<ffffffc000a78904>] extcon_dev_register+0xbc/0x978
    [<ffffffc000a791f8>] devm_extcon_dev_register+0x38/0x90
    [<ffffffc000a7cab8>] max77843_muic_probe+0x1e0/0x5f0
    [<ffffffc0006dc724>] platform_drv_probe+0x64/0xf8
    [<ffffffc0006d9ae8>] driver_probe_device+0x1f0/0x3a8
    [<ffffffc0006d9de0>] __driver_attach+0xc8/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc0006dc618>] __platform_driver_register+0xa8/0xb8
    [<ffffffc00179f6c0>] max77843_muic_init+0x14/0x20
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc001bcc300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc001bcc380: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
    >ffffffc001bcc400: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
                                               ^
     ffffffc001bcc480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc001bcc500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ==================================================================

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoLOCAL / ARM: defconfig: Enable Mali400 R4P0 on Trats2
Krzysztof Kozlowski [Tue, 1 Sep 2015 04:19:07 +0000 (13:19 +0900)]
LOCAL / ARM: defconfig: Enable Mali400 R4P0 on Trats2

Enable Mali400 R4P0 drivers to utilize GPU.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: dts: Add GPU/G3D node to exynos4412-trats2
Krzysztof Kozlowski [Tue, 1 Sep 2015 04:13:47 +0000 (13:13 +0900)]
LOCAL / ARM: dts: Add GPU/G3D node to exynos4412-trats2

Enable usage of Mali400 on Trats2 board.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Enable Tizen Global Lock for Mali on Odroid-U3
Krzysztof Kozlowski [Tue, 18 Aug 2015 00:32:05 +0000 (09:32 +0900)]
LOCAL / ARM: defconfig: Enable Tizen Global Lock for Mali on Odroid-U3

Tizen Global Lock is needed for Mali400 R4P0 on Odroid-U3.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Enable Mali400 R4P0 on Odroid-U3
Krzysztof Kozlowski [Mon, 10 Aug 2015 01:00:15 +0000 (10:00 +0900)]
LOCAL / ARM: defconfig: Enable Mali400 R4P0 on Odroid-U3

Enable Mali400 to utilize GPU.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agodrm/exynos: Staticize local function in exynos_drm_gem.c
Krzysztof Kozlowski [Thu, 13 Aug 2015 02:00:15 +0000 (11:00 +0900)]
drm/exynos: Staticize local function in exynos_drm_gem.c

The exynos_drm_gem_mmap_buffer() is not used outside so make it static.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Enable SMACK permissive mode as workaround on Trats2
Krzysztof Kozlowski [Tue, 1 Sep 2015 03:55:12 +0000 (12:55 +0900)]
LOCAL / ARM: defconfig: Enable SMACK permissive mode as workaround on Trats2

Fix display/Xorg on Trats2 by using a workaround (SMACK permissive
mode).

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Fix display on Trats2
Krzysztof Kozlowski [Tue, 1 Sep 2015 03:45:50 +0000 (12:45 +0900)]
LOCAL / ARM: defconfig: Fix display on Trats2

Enable config necessary for display/Xorg on Trats2: TIZEN_GLOBAL_LOCK

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agodrm/exynos: Remove unused vma field of exynos_drm_gem_obj
Krzysztof Kozlowski [Fri, 19 Jun 2015 05:23:29 +0000 (14:23 +0900)]
drm/exynos: Remove unused vma field of exynos_drm_gem_obj

The field 'vma' of 'exynos_drm_gem_obj' structure was introduced in
2a3098ff6c21 ("drm/exynos: add userptr feature for g2d module") but is
not referenced anywhere.

One instance of 'exynos_drm_gem_obj' may be mapped to multiple
user-space VMAs so 'vma' field does not look useful anyway.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 years agodrm/exynos: iommu: improve a check for non-iommu dma_ops
Marek Szyprowski [Wed, 3 Jun 2015 08:26:24 +0000 (10:26 +0200)]
drm/exynos: iommu: improve a check for non-iommu dma_ops

DRM Exynos driver is relying on dma-mapping internal structures when used
with IOMMU enabled. This patch partially hides dma-mapping internal things
by using proper get_dma_ops/set_dma_ops calls.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
[k.kozlowski: Backport to 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agodrm/exynos: initialize VIDCON0 when fimd is disabled
Joonyoung Shim [Fri, 12 Jun 2015 08:27:16 +0000 (17:27 +0900)]
drm/exynos: initialize VIDCON0 when fimd is disabled

When the fimd is disabled by fimd_disable(), enabled overlay layers also
are disabled. If clocks for fimd are enabled by fimd_enable() on this
case, it can lead IOMMU page fault. The reason is that VIDCON0_ENVID and
VIDCON0_ENVID_F bits of VIDCON0 register are set still even though fimd
is disabled, so it may continue display output of prior when clocks for
fimd are enabled again.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
[k.kozlowski: Backport to 4.1, rebasing required]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Fix boot hang on Trats2 around DRM
Krzysztof Kozlowski [Mon, 31 Aug 2015 09:19:54 +0000 (18:19 +0900)]
LOCAL / ARM: defconfig: Fix boot hang on Trats2 around DRM

Disabling framebuffer console fixes boot hang on Trats2 board after:
[    1.136523] [drm] Initialized drm 1.1.0 20060810
[    1.143789] exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops)
[    1.149944] exynos-drm exynos-drm: bound 11c80000.dsi (ops exynos_dsi_component_ops)
[    1.157366] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.163954] [drm] No driver support for vblank timestamp query.
[    1.169893] [drm] Initialized exynos 1.0.0 20110530 on minor 0

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ARM: defconfig: Enable MAX77693 charger and haptic on Trats2
Krzysztof Kozlowski [Mon, 31 Aug 2015 09:18:36 +0000 (18:18 +0900)]
LOCAL / ARM: defconfig: Enable MAX77693 charger and haptic on Trats2

Enable the Maxim 77693 charger and input/haptic drivers in Trats2
defconfig.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoRevert "LOCAL / drm/exynos: fimd: Remove unused 'ret' variable"
Krzysztof Kozlowski [Mon, 31 Aug 2015 08:08:19 +0000 (17:08 +0900)]
Revert "LOCAL / drm/exynos: fimd: Remove unused 'ret' variable"

This reverts commit aacf1c3ffc5a1a1ba1d51e258b4af722d68c6407 to fix
build error (tizen_trats2_defconfig):
../drivers/gpu/drm/exynos/exynos_drm_fimd.c: In function ‘fimd_bind’:
../drivers/gpu/drm/exynos/exynos_drm_fimd.c:1037:3: error: ‘ret’ undeclared (first use in this function)
../drivers/gpu/drm/exynos/exynos_drm_fimd.c:1037:3: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [drivers/gpu/drm/exynos/exynos_drm_fimd.o] Error 1

7 years agov4l2-compat-ioctl32: fix struct v4l2_event32 alignment
Andrzej Hajda [Fri, 21 Aug 2015 09:50:09 +0000 (11:50 +0200)]
v4l2-compat-ioctl32: fix struct v4l2_event32 alignment

Union v4l2_event::u is aligned to 8 bytes on arm32. On arm64 v4l2_event32::u
is aligned to 4 bytes. As a result structures v4l2_event and v4l2_event32 have
different sizes and VIDOC_DQEVENT ioctl does not work from arm32 apps running
on arm64 kernel. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agodrm/exynos: ipp: introduce last_buf_id
Hyungwon Hwang [Wed, 26 Aug 2015 02:11:07 +0000 (11:11 +0900)]
drm/exynos: ipp: introduce last_buf_id

There is no reason to tie the buf idx from userspace and the real HW DMA
channel. So to separate them, the buf idx from userspace must be stored
to return the idx when the processing is done. This patch introduces
last_buf_id to store the current processing buf id for that purpose.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agomedia: s5p-mfc: fix mfc context buffer size
Ingi Kim [Wed, 12 Aug 2015 00:09:35 +0000 (09:09 +0900)]
media: s5p-mfc: fix mfc context buffer size

When video file was decoded by H/W MFCv8. It occured IOMMU page fault
because of accessing abnormal memory of mfc ctx buf

So this patch supports buffer size of mfc context more.
Relevant page fault error is below.

[ 3524.617147] PAGE FAULT occurred at 0x10108000 by 11200000.sysmmu(Page table base: 0x6d86c000)
[ 3524.624192]  Lv1 entry: 0x6c27d001
[ 3524.627567]   Lv2 entry: 0x0
[ 3524.630482] ------------[ cut here ]------------
[ 3524.635020] kernel BUG at drivers/iommu/exynos-iommu.c:358!
[ 3524.640567] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 3524.646373] Modules linked in:
[ 3524.649410] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-00001-g0ff9b87-dirty #18
[ 3524.657117] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[ 3524.663184] task: c0e4aff0 ti: c0e3c000 task.ti: c0e3c000
[ 3524.668566] PC is at exynos_sysmmu_irq+0x1b8/0x2c4
[ 3524.673330] LR is at vprintk_emit+0x2b8/0x58c
[ 3524.677657] pc : [<c037cc78>]    lr : [<c00704a4>]    psr: 600d0193
[ 3524.677657] sp : c0e3dd90  ip : 00000000  fp : c0e3ddcc
[ 3524.689092] r10: ee29a110  r9 : 00000000  r8 : ee29a128
[ 3524.694292] r7 : ed812810  r6 : 10108000  r5 : ed86c000  r4 : 00000000
[ 3524.700791] r3 : c0ec9bd8  r2 : 00000000  r1 : 00000000  r0 : ed82ff00
[ 3524.707292] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[ 3524.714656] Control: 10c5387d  Table: 6b08c06a  DAC: 00000015
[ 3524.720375] Process swapper/0 (pid: 0, stack limit = 0xc0e3c210)
[ 3524.726354] Stack: (0xc0e3dd90 to 0xc0e3e000)
[ 3524.730689] dd80:                                     c0e3dd9c c0069d68 ee58c338 6d86c000
[ 3524.738836] dda0: ee58c338 ee298c40 ee2915a0 0000003b c0e64ef4 c0e3c000 00000000 00000000
[ 3524.746981] ddc0: c0e3de14 c0e3ddd0 c0071ef4 c037cacc ffffffff a00d0193 c0e3ddf4 ee291540
[ 3524.755126] dde0: c0ec793c c0ec7928 7fffffff ee291540 ee2915a0 ee298c40 c0e64ef4 ee004660
[ 3524.763272] de00: ee010800 c0e3df00 c0e3de34 c0e3de18 c0072138 c0071e9c 00020000 ee291540
[ 3524.771418] de20: ee2915a0 00000016 c0e3de4c c0e3de38 c0075130 c00720f8 0000003b ee028300
[ 3524.779563] de40: c0e3de64 c0e3de50 c0071450 c0075068 00000100 00000012 c0e3de8c c0e3de68
[ 3524.787708] de60: c030d240 c0071420 c030d19c 00000016 00000000 00000016 00000000 00000001
[ 3524.795854] de80: c0e3dea4 c0e3de90 c0071450 c030d1a8 00000092 c0e37a1c c0e3ded4 c0e3dea8
[ 3524.804000] dea0: c0071790 c0071420 c0e3df00 f000200c 00000016 c0e440a8 c0e3df00 f0002000
[ 3524.812145] dec0: c095bc8c 00000001 c0e3defc c0e3ded8 c0008730 c0071710 c0010d88 c0010d8c
[ 3524.820290] dee0: 600d0013 ffffffff c0e3df34 c0ec7eb4 c0e3df54 c0e3df00 c0014780 c00086fc
[ 3524.828436] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000
[ 3524.836581] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c
[ 3524.844727] df40: 600d0013 ffffffff c0e3df94 c0e3df58 c0062690 c0010d50 c0ec75f0 00000001
[ 3524.852872] df60: c0e3df84 c0e4353c c0e39580 c0e43e84 c0e3c000 00000002 c0e3df58 c0e38b88
[ 3524.861018] df80: c0952b9c ffffffff c0e3dfac c0e3df98 c094d1b8 c00622d4 c0e3c000 c0e43e10
[ 3524.869163] dfa0: c0e3dff4 c0e3dfb0 c0d86d30 c094d130 ffffffff ffffffff c0d866f0 00000000
[ 3524.877309] dfc0: 00000000 c0df06d8 00000000 c0ee3f14 c0e434c0 c0df06d4 c0e4c20c 4000406a
[ 3524.885454] dfe0: 410fc073 00000000 00000000 c0e3dff8 40008074 c0d86970 00000000 00000000
[ 3524.893610] [<c037cc78>] (exynos_sysmmu_irq) from [<c0071ef4>] (handle_irq_event_percpu+0x64/0x25c)
[ 3524.902615] [<c0071ef4>] (handle_irq_event_percpu) from [<c0072138>] (handle_irq_event+0x4c/0x6c)
[ 3524.911454] [<c0072138>] (handle_irq_event) from [<c0075130>] (handle_level_irq+0xd4/0x14c)
[ 3524.919773] [<c0075130>] (handle_level_irq) from [<c0071450>] (generic_handle_irq+0x3c/0x4c)
[ 3524.928180] [<c0071450>] (generic_handle_irq) from [<c030d240>] (combiner_handle_cascade_irq+0xa4/0x110)
[ 3524.937624] [<c030d240>] (combiner_handle_cascade_irq) from [<c0071450>] (generic_handle_irq+0x3c/0x4c)
[ 3524.946981] [<c0071450>] (generic_handle_irq) from [<c0071790>] (__handle_domain_irq+0x8c/0xfc)
[ 3524.955646] [<c0071790>] (__handle_domain_irq) from [<c0008730>] (gic_handle_irq+0x40/0x78)
[ 3524.963966] [<c0008730>] (gic_handle_irq) from [<c0014780>] (__irq_svc+0x40/0x74)
[ 3524.971412] Exception stack(0xc0e3df00 to 0xc0e3df48)
[ 3524.976441] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000
[ 3524.984586] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c
[ 3524.992729] df40: 600d0013 ffffffff
[ 3524.996205] [<c0014780>] (__irq_svc) from [<c0010d8c>] (arch_cpu_idle+0x48/0x4c)
[ 3525.003567] [<c0010d8c>] (arch_cpu_idle) from [<c0062690>] (cpu_startup_entry+0x3c8/0x4a4)
[ 3525.011805] [<c0062690>] (cpu_startup_entry) from [<c094d1b8>] (rest_init+0x94/0x98)
[ 3525.019516] [<c094d1b8>] (rest_init) from [<c0d86d30>] (start_kernel+0x3cc/0x3d8)
[ 3525.026963] Code: e34c30ec e5932004 e3520000 ca000018 (e7f001f2)
[ 3525.033028] ---[ end trace 71ed544f653b4d46 ]---

Signed-off-by: Ingi Kim <ingi2.kim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agomedia: s5p-mfc: skip incomeplete frame
Donghwa Lee [Thu, 31 Jul 2014 06:01:59 +0000 (15:01 +0900)]
media: s5p-mfc: skip incomeplete frame

Currently, when incomplete frame is recieved in the middle of
decoding, driver have treated it to error, so src/dst queue and
clock are cleaned. Although it is obviously error case, it is need
to maintain video decoding in case of necessity. This patch
supports skip incomplete frame to next.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoARM: dts: exynos5433-tm2: add missing pinctrl states for fimc_is_ch1_i2c
Marek Szyprowski [Wed, 26 Aug 2015 13:05:35 +0000 (15:05 +0200)]
ARM: dts: exynos5433-tm2: add missing pinctrl states for fimc_is_ch1_i2c

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agos5p-mfc: end-of-stream handling for newer encoders
Andrzej Hajda [Thu, 20 Aug 2015 12:35:23 +0000 (14:35 +0200)]
s5p-mfc: end-of-stream handling for newer encoders

MFC encoder supports end-of-stream handling for encoder
in version 5 of hardware. This patch adds it also for newer version.
It was successfully tested on MFC-v8.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
7 years agolocal/pci: pcie-designware: call pci_bus_add_devices()
Jaehoon Chung [Thu, 20 Aug 2015 05:07:19 +0000 (14:07 +0900)]
local/pci: pcie-designware: call pci_bus_add_devices()

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL/ARM64: defconfig: enable support for fimc-is
Sylwester Nawrocki [Tue, 27 Jan 2015 17:41:42 +0000 (18:41 +0100)]
LOCAL/ARM64: defconfig: enable support for fimc-is

This patch enables fimc-is and its sub drivers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agofimc-is: fixup for v4.1 rebase
Marek Szyprowski [Wed, 12 Aug 2015 08:29:23 +0000 (10:29 +0200)]
fimc-is: fixup for v4.1 rebase

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: get rid of struct v4l2_subdev_core_ops::init usage
Sylwester Nawrocki [Thu, 30 Jul 2015 04:21:48 +0000 (13:21 +0900)]
fimc-is: get rid of struct v4l2_subdev_core_ops::init usage

init is too limited to be used in this driver, it is deprecated
and usage of this callback should be removed anyway.
There is no device nodes for subdevs so ioctl is no exposed to
user space.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Fix/add vidioc_querycap for several video nodes
Sylwester Nawrocki [Thu, 30 Jul 2015 01:55:38 +0000 (10:55 +0900)]
fimc-is: Fix/add vidioc_querycap for several video nodes

This allows us to get rid of a warning from v4l2-core.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: fail device open when called from udev
Marek Szyprowski [Thu, 13 Aug 2015 12:52:20 +0000 (14:52 +0200)]
fimc-is: fail device open when called from udev

This workaround avoids driver state change on system boot when udev checks
all video nodes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: Workaround to ensure proper video open sequence
Sylwester Nawrocki [Tue, 28 Jul 2015 05:06:58 +0000 (14:06 +0900)]
fimc-is: Workaround to ensure proper video open sequence

This a workaround to prevent system crash when video nodes are opened
in random sequence during system booting.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
fimc-is: hack video node open to require companion to be opened

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: Add memory barriers in place of vb2_ion_sync_for_device() calls
Sylwester Nawrocki [Mon, 27 Jul 2015 01:17:35 +0000 (10:17 +0900)]
fimc-is: Add memory barriers in place of vb2_ion_sync_for_device() calls

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: do not skip enabling enabled regulators
Marek Szyprowski [Thu, 6 Aug 2015 08:09:24 +0000 (10:09 +0200)]
fimc-is: do not skip enabling enabled regulators

Regulators have proper on/off refcount, so use it instead of strange
is_enabled() based logic.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: temporary hack to ensure proper structure size
Marek Szyprowski [Thu, 23 Jul 2015 07:33:18 +0000 (09:33 +0200)]
fimc-is: temporary hack to ensure proper structure size

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: temporary workaround for more strict vb2 buffer state tracking
Marek Szyprowski [Fri, 7 Aug 2015 08:42:08 +0000 (10:42 +0200)]
fimc-is: temporary workaround for more strict vb2 buffer state tracking

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: Correct error logs in fimc-is-groupmgr.c
Sylwester Nawrocki [Mon, 20 Jul 2015 01:53:30 +0000 (10:53 +0900)]
fimc-is: Correct error logs in fimc-is-groupmgr.c

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Fix printk format in wq_func_general() function
Sylwester Nawrocki [Mon, 20 Jul 2015 01:48:56 +0000 (10:48 +0900)]
fimc-is: Fix printk format in wq_func_general() function

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Remove unneeded variable declarations
Sylwester Nawrocki [Mon, 20 Jul 2015 01:46:25 +0000 (10:46 +0900)]
fimc-is: Remove unneeded variable declarations

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Use proper type for FIMC-LITE register region pointer
Sylwester Nawrocki [Fri, 17 Jul 2015 05:20:40 +0000 (14:20 +0900)]
fimc-is: Use proper type for FIMC-LITE register region pointer

Aside of dropping the pointless TO_WORD_OFFSET() macro this let's
us avoid errors on a 64-bit system where size of unsigned long is
8 bytes, as opposed to 4 bytes on 32-bit machines.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Fix data type errors in debug printks
Sylwester Nawrocki [Fri, 17 Jul 2015 05:17:48 +0000 (14:17 +0900)]
fimc-is: Fix data type errors in debug printks

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Remove unused function declarations from fimc-is-hw.h
Sylwester Nawrocki [Fri, 17 Jul 2015 05:15:33 +0000 (14:15 +0900)]
fimc-is: Remove unused function declarations from fimc-is-hw.h

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: Use proper type for CSIS register region pointer
Sylwester Nawrocki [Fri, 17 Jul 2015 04:32:45 +0000 (13:32 +0900)]
fimc-is: Use proper type for CSIS register region pointer

Aside of dropping the pointless TO_WORD_OFFSET() macro this let's
us avoid errors on a 64-bit system where size of unsigned long is
8 bytes, as opposed to 4 bytes on 32-bit machines.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: fix crc32 code for arm64
Marek Szyprowski [Thu, 16 Jul 2015 08:59:37 +0000 (10:59 +0200)]
fimc-is: fix crc32 code for arm64

fimc-is: Fix getCRC() function return type

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: set correct paths to firmware files
Marek Szyprowski [Mon, 13 Jul 2015 10:43:39 +0000 (12:43 +0200)]
fimc-is: set correct paths to firmware files

fimc-is-ois: correct sd card path
fimc-is: change firmware path to /lib/firmware to avoid confusion

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: use the same iommu address space for all fimc-is/sensors blocks
Marek Szyprowski [Wed, 5 Aug 2015 13:38:28 +0000 (15:38 +0200)]
fimc-is: use the same iommu address space for all fimc-is/sensors blocks

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: use own IOMMU domain (base=0x10000000, size=0x80000000)
Marek Szyprowski [Thu, 6 Aug 2015 08:03:46 +0000 (10:03 +0200)]
fimc-is: use own IOMMU domain (base=0x10000000, size=0x80000000)

FIMC-IS doesn't work properly with IO address space configured from zero
address, so use separate IO address space (domain) with base address set
to 0x10000000 and 0x80000000 bytes large.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: add fimc-is log dump on driver close
Marek Szyprowski [Fri, 7 Aug 2015 08:41:39 +0000 (10:41 +0200)]
fimc-is: add fimc-is log dump on driver close

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove ION integration code
Marek Szyprowski [Thu, 6 Aug 2015 07:43:41 +0000 (09:43 +0200)]
fimc-is: remove ION integration code

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: Add support for MIPI PHY power/reset control
Sylwester Nawrocki [Mon, 11 May 2015 14:46:35 +0000 (16:46 +0200)]
fimc-is: Add support for MIPI PHY power/reset control

Change-Id: Id7afb8b99a87a664a16f74ff0d3e6c28904cce1b
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: fix all possible casting issues and function signature incompatibilities
Marek Szyprowski [Thu, 6 Aug 2015 10:59:20 +0000 (12:59 +0200)]
fimc-is: fix all possible casting issues and function signature incompatibilities

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: fix includes and make the code to compile on ARM64
Marek Szyprowski [Fri, 7 Aug 2015 08:41:03 +0000 (10:41 +0200)]
fimc-is: fix includes and make the code to compile on ARM64

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove pin_config_set dependency
Marek Szyprowski [Fri, 10 Jul 2015 12:21:45 +0000 (14:21 +0200)]
fimc-is: remove pin_config_set dependency

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: Add exynos_smc() implementation (temporary workaround)
Sylwester Nawrocki [Fri, 8 May 2015 14:35:05 +0000 (16:35 +0200)]
fimc-is: Add exynos_smc() implementation (temporary workaround)

Ported from arch/arm64/kernel/exynos-smc.S, include/linux/smc.h
from LSI kernel.

Change-Id: I94a82210ab1f4cfdeff12b87e51592f8d417a060
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
7 years agofimc-is: disable support for V4L2_CID_IS_MAP_BUFFER
Marek Szyprowski [Thu, 9 Jul 2015 08:28:58 +0000 (10:28 +0200)]
fimc-is: disable support for V4L2_CID_IS_MAP_BUFFER

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: configure clocks on companion open
Marek Szyprowski [Fri, 7 Aug 2015 08:17:23 +0000 (10:17 +0200)]
fimc-is: configure clocks on companion open

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove conditional runtime PM support
Marek Szyprowski [Fri, 7 Aug 2015 06:37:00 +0000 (08:37 +0200)]
fimc-is: remove conditional runtime PM support

remove conditional runtime pm code

7 years agofimc-is: replace hardcoded PMU register access with regmap calls
Marek Szyprowski [Fri, 7 Aug 2015 08:36:26 +0000 (10:36 +0200)]
fimc-is: replace hardcoded PMU register access with regmap calls

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: read fimc-lite and csis regs and irqs from dt
Marek Szyprowski [Fri, 7 Aug 2015 08:36:35 +0000 (10:36 +0200)]
fimc-is: read fimc-lite and csis regs and irqs from dt

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: provide stubs for mipiphy control
Marek Szyprowski [Tue, 11 Aug 2015 08:28:56 +0000 (10:28 +0200)]
fimc-is: provide stubs for mipiphy control

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: enable build
Marek Szyprowski [Thu, 6 Aug 2015 13:39:42 +0000 (15:39 +0200)]
fimc-is: enable build

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove ncp6335b support (unused)
Marek Szyprowski [Thu, 6 Aug 2015 10:55:07 +0000 (12:55 +0200)]
fimc-is: remove ncp6335b support (unused)

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove pm qos support
Marek Szyprowski [Fri, 7 Aug 2015 08:35:52 +0000 (10:35 +0200)]
fimc-is: remove pm qos support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove unused conditional code
Marek Szyprowski [Fri, 7 Aug 2015 08:35:42 +0000 (10:35 +0200)]
fimc-is: remove unused conditional code

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove completely dead code
Marek Szyprowski [Fri, 7 Aug 2015 08:35:30 +0000 (10:35 +0200)]
fimc-is: remove completely dead code

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove ENABLE_DVFS support
Marek Szyprowski [Fri, 7 Aug 2015 08:35:19 +0000 (10:35 +0200)]
fimc-is: remove ENABLE_DVFS support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove ENABLE_CLOCK_GATE support
Marek Szyprowski [Fri, 7 Aug 2015 08:35:09 +0000 (10:35 +0200)]
fimc-is: remove ENABLE_CLOCK_GATE support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
7 years agofimc-is: remove USE_OWN_FAULT_HANDLER support
Marek Szyprowski [Fri, 7 Aug 2015 08:34:57 +0000 (10:34 +0200)]
fimc-is: remove USE_OWN_FAULT_HANDLER support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>