firefly-linux-kernel-4.4.55.git
6 years agoarm64: dts: rockchip: rk3368: export MIPI DPHY PLL clock
WeiYong Bi [Mon, 17 Jul 2017 02:58:32 +0000 (10:58 +0800)]
arm64: dts: rockchip: rk3368: export MIPI DPHY PLL clock

Change-Id: I15ef0a01cde0459d1993110f5653f6bf10f99a64
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366: export MIPI DPHY PLL clock
WeiYong Bi [Thu, 13 Jul 2017 07:12:14 +0000 (15:12 +0800)]
arm64: dts: rockchip: rk3366: export MIPI DPHY PLL clock

Change-Id: I99a4c252f877ff36a16f991ee2e94bb110401e47
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agophy: rockchip-inno-mipi-dphy: export PLL clock
WeiYong Bi [Thu, 13 Jul 2017 08:19:08 +0000 (16:19 +0800)]
phy: rockchip-inno-mipi-dphy: export PLL clock

Change-Id: I1eb96241930e380997dd66f3a3b479fe53a72a98
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoarm64: dts: rockchip: fix pwm3 pinctrl for rk3368
Zhou weixin [Mon, 24 Jul 2017 08:24:31 +0000 (16:24 +0800)]
arm64: dts: rockchip: fix pwm3 pinctrl for rk3368

Change-Id: I0e232a4df41d88afadd6a99011a71bbacab6e375
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
6 years agodrm/rockchip: vop: only initial pll for enabled vop
Mark Yao [Thu, 27 Jul 2017 03:27:24 +0000 (11:27 +0800)]
drm/rockchip: vop: only initial pll for enabled vop

Change-Id: I33521c7ca57869913e94522b19ff3a2a20250829
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: vop: move dclk pll into vop private data
Mark Yao [Thu, 27 Jul 2017 03:18:35 +0000 (11:18 +0800)]
drm/rockchip: vop: move dclk pll into vop private data

each vop only need one dclk pll reference, Save dclk pll
on rockchip_crtc_state would make things complex

Change-Id: Id779f1bf54d5bfa52aed413c238781083f333782
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoarm64: dts: rockchip: add rktimer device node for rk3366
tony.xie [Fri, 21 Jul 2017 08:10:52 +0000 (16:10 +0800)]
arm64: dts: rockchip: add rktimer device node for rk3366

Select rktimer0 as broadcast timer.

Change-Id: I1f9d80d920b063135c3b220b4df995eb5fcefa44
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
6 years agoARM: dts: rk3229-gva-sdk: update changes for new gva hardware.
Wenping Zhang [Tue, 25 Jul 2017 09:55:06 +0000 (17:55 +0800)]
ARM: dts: rk3229-gva-sdk: update changes for new gva hardware.

1. use emmc instead of nand.
2. enable cypress cy8c4024 touchpad support.

Change-Id: Ie9e72516601f2af8caaa1325b98d1574d010a22f
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
6 years agoARM: rockchip_defconfig: enable TOUCHSCREEN_CY8C40XX.
Wenping Zhang [Tue, 25 Jul 2017 09:52:43 +0000 (17:52 +0800)]
ARM: rockchip_defconfig: enable TOUCHSCREEN_CY8C40XX.

Change-Id: I2d21f06116f4af6a1dbcd1f0dd3444bded085487
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
6 years agoinput: touchscreen: add cy8c40xx touchpad support.
Wenping Zhang [Fri, 16 Jun 2017 02:17:01 +0000 (10:17 +0800)]
input: touchscreen: add cy8c40xx touchpad support.

Change-Id: I765177ee00472e19b8bc6fcbdb79db4ea914f3a9
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
6 years agoMerge tag 'lsk-v4.4-17.07-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
Huang, Tao [Wed, 26 Jul 2017 11:32:04 +0000 (19:32 +0800)]
Merge tag 'lsk-v4.4-17.07-android' of git://git.linaro.org/kernel/linux-linaro-stable.git

LSK 17.07 v4.4-android

* tag 'lsk-v4.4-17.07-android': (402 commits)
  dt/vendor-prefixes: remove redundant vendor
  Linux 4.4.77
  saa7134: fix warm Medion 7134 EEPROM read
  x86/mm/pat: Don't report PAT on CPUs that don't support it
  ext4: check return value of kstrtoull correctly in reserved_clusters_store
  staging: comedi: fix clean-up of comedi_class in comedi_init()
  staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
  tcp: fix tcp_mark_head_lost to check skb len before fragmenting
  md: fix super_offset endianness in super_1_rdev_size_change
  md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
  perf tools: Use readdir() instead of deprecated readdir_r() again
  perf tests: Remove wrong semicolon in while loop in CQM test
  perf trace: Do not process PERF_RECORD_LOST twice
  perf dwarf: Guard !x86_64 definitions under #ifdef else clause
  perf pmu: Fix misleadingly indented assignment (whitespace)
  perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
  perf tools: Remove duplicate const qualifier
  perf script: Use readdir() instead of deprecated readdir_r()
  perf thread_map: Use readdir() instead of deprecated readdir_r()
  perf tools: Use readdir() instead of deprecated readdir_r()
  ...

Conflicts:
Makefile
drivers/Kconfig
drivers/Makefile
drivers/usb/dwc3/gadget.c

Change-Id: Ib4aae2e34ebbf0d7953c748a33f673acb3e744fc

6 years agoarm64: dts: rockchip: rk3399: add cabc lut register
Mark Yao [Fri, 7 Jul 2017 09:06:26 +0000 (17:06 +0800)]
arm64: dts: rockchip: rk3399: add cabc lut register

Change-Id: Ia4b47301b58141b24e75e35544beb903325e0a19
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoUPSTREAM: drm/rockchip: Always signal event in next vblank after cfg_done
Tomasz Figa [Wed, 14 Sep 2016 12:55:00 +0000 (21:55 +0900)]
UPSTREAM: drm/rockchip: Always signal event in next vblank after cfg_done

This patch makes the driver send the pending vblank event in next vblank
following the commit, relying on vblank signalling improvements done in
previous patches. This gives us vblank events that always represent the
real moment of changes hitting on the screen (which was the case only
for complete FB changes before) and lets us remove the manual window
update check.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 41ee436700f41260663d0b201585551745b623d0)

Change-Id: Icb1d14cb8af942e39407cc6205a58b9c5e31122b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: fix mm_dump NULL pointer crash
Mark Yao [Wed, 26 Jul 2017 07:34:09 +0000 (15:34 +0800)]
drm/rockchip: fix mm_dump NULL pointer crash

drm mm is not initial on non-iommu context.

Fix crash:
[   11.635376] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   11.636148] pgd = ffffffc0de19d000
[   11.636474] [00000000] *pgd=0000000000000000, *pud=0000000000000000
[   11.637088] Internal error: Oops: 96000045 [#1] PREEMPT SMP
[   11.637594] Modules linked in:
[   11.637902] CPU: 4 PID: 424 Comm: sh Not tainted 4.4.71 #146
[   11.638406] Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
[   11.639050] task: ffffffc0de796800 ti: ffffffc0de260000 task.ti: ffffffc0de260000
[   11.639736] PC is at __mutex_lock_slowpath+0xa8/0x178
[   11.640198] LR is at __mutex_lock_slowpath+0x7c/0x178
[   11.788003] [<ffffff8008b85b5c>] __mutex_lock_slowpath+0xa8/0x178
[   11.788560] [<ffffff8008b85c58>] mutex_lock+0x2c/0x44
[   11.789024] [<ffffff800849e8d8>] rockchip_drm_mm_dump+0x30/0x5c
[   11.789560] [<ffffff80081d612c>] seq_read+0x1a8/0x3f8
[   11.790017] [<ffffff80081b4208>] __vfs_read+0x38/0xf4
[   11.790472] [<ffffff80081b4adc>] vfs_read+0x84/0x128
[   11.790927] [<ffffff80081b552c>] SyS_read+0x54/0xa4
[   11.791372] [<ffffff80080828b0>] el0_svc_naked+0x24/0x28

Change-Id: I342311da43d50b743257b81425dfc6a327306803
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366-android: enable vop lite
Mark Yao [Mon, 24 Jul 2017 07:33:34 +0000 (15:33 +0800)]
arm64: dts: rockchip: rk3366-android: enable vop lite

Change-Id: Ia10a57b86343048e038cb40a4e96de850cc707bc
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366: add vop lite support
Mark Yao [Mon, 24 Jul 2017 07:28:53 +0000 (15:28 +0800)]
arm64: dts: rockchip: rk3366: add vop lite support

Change-Id: I0e8afc5e7bc6b8e4f37b7d34e9126e931df68347
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: vop: add rk3366 vop lit support
Mark Yao [Mon, 24 Jul 2017 07:44:36 +0000 (15:44 +0800)]
drm/rockchip: vop: add rk3366 vop lit support

Change-Id: Iaf869f0fbf7b703dff3c38e9df4b8570d9260bd4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: vop: split dclk_pol from pin_pol
Mark Yao [Mon, 24 Jul 2017 07:43:40 +0000 (15:43 +0800)]
drm/rockchip: vop: split dclk_pol from pin_pol

Some vop have a difference pin_pol layout

Change-Id: I96c4dc9fbc00470828748a926d6248c5a5772c82
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoPM / OPP: add a summary tree in debugfs
Finley Xiao [Tue, 25 Jul 2017 07:49:17 +0000 (15:49 +0800)]
PM / OPP: add a summary tree in debugfs

On rk3399-evb-rev3 the opp_summary would for example look something like:
 device                rate(Hz)    target(uV)    min(uV)    max(uV)
-------------------------------------------------------------------
 platform-dmc
                      200000000       825000      825000      825000
                      300000000       850000      850000      850000
                      400000000       850000      850000      850000
                      528000000       900000      900000      900000
                      600000000       900000      900000      900000
                      800000000       900000      900000      900000
 platform-ff9a0000.gpu
                      200000000       800000      800000      800000
                      297000000       800000      800000      800000
                      400000000       825000      825000      825000
                      500000000       875000      875000      875000
                      600000000       925000      925000      925000
                      800000000      1100000     1100000     1100000
 cpu4
                      408000000       800000      800000      800000
                      600000000       800000      800000      800000
                      816000000       800000      800000      800000
                     1008000000       850000      850000      850000
                     1200000000       875000      875000      875000
                     1416000000       975000      975000      975000
                     1608000000      1025000     1025000     1025000
                     1800000000      1125000     1125000     1125000
 cpu0
                      408000000       800000      800000      800000
                      600000000       800000      800000      800000
                      816000000       800000      800000      800000
                     1008000000       850000      850000      850000
                     1200000000       925000      925000      925000
                     1416000000      1050000     1050000     1050000

Change-Id: I0d33bb84fd36d79df3c1630d98c84f1f6bc42728
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agoUPSTREAM: debugfs: add debugfs_lookup()
Omar Sandoval [Tue, 31 Jan 2017 22:53:17 +0000 (14:53 -0800)]
UPSTREAM: debugfs: add debugfs_lookup()

We don't always have easy access to the dentry of a file or directory we
created in debugfs. Add a helper which allows us to get a dentry we
previously created.

The motivation for this change is a problem with blktrace and the blk-mq
debugfs entries introduced in 07e4fead45e6 ("blk-mq: create debugfs
directory tree"). Namely, in some cases, the directory that blktrace
needs to create may already exist, but in other cases, it may not. We
_could_ rely on a bunch of implied knowledge to decide whether to create
the directory or not, but it's much cleaner on our end to just look it
up.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit a7c5437b0bbec5165df6eb1efc5e37dc40b9e05d)

Change-Id: I77b6f2c7df32f904099d23771a53065315cfdc12

6 years agodrm/rockchip: vop: fix background color
Mark Yao [Tue, 25 Jul 2017 10:10:42 +0000 (18:10 +0800)]
drm/rockchip: vop: fix background color

Change-Id: Idbd43b4456df80e2243ce09c3bc69d8be6e0af6a
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: configure grf register for 3399
Xubilv [Tue, 25 Jul 2017 10:13:30 +0000 (18:13 +0800)]
drm/rockchip: dw-mipi-dsi: configure grf register for 3399

Change-Id: I6ad75b05a02b15fc8744f5f25fc996cd0d4bc2fb
Fixes: 39d1c0c4a328 ("drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_encoder_enable function")
Signed-off-by: Xubilv <xbl@rock-chips.com>
6 years agodrm/edid: improve cea_db_offsets compatibility
Zheng Yang [Mon, 24 Jul 2017 03:51:22 +0000 (11:51 +0800)]
drm/edid: improve cea_db_offsets compatibility

The cea[2] is equal to the real value minus one in some sink edid,
found on a Konka LCD TV. the last data block offset plus the payload
length is equal to cea[2]. The end value need to plus one under this
scene.

Change-Id: I41b477559023ccd1cc4a5450dd9d35bed095f147
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3399-evb: enable dmc and dfi
Finley Xiao [Tue, 18 Jul 2017 06:33:41 +0000 (14:33 +0800)]
arm64: dts: rockchip: rk3399-evb: enable dmc and dfi

Change-Id: If372c3b73ce419c3ea31143e7318529f2e9c9e56
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agoARM: dts: rk3288-android: edp connect to vopb by default
xubilv [Mon, 24 Jul 2017 02:03:06 +0000 (10:03 +0800)]
ARM: dts: rk3288-android: edp connect to vopb by default

Change-Id: Id392ba8052eb67c544f3528c9b89a5f444fa4c36
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: backlight: fix null pointer error
Mark Yao [Mon, 24 Jul 2017 01:47:19 +0000 (09:47 +0800)]
drm/rockchip: backlight: fix null pointer error

drm backlight maybe not enabled, the private->backlight
can be null pointer.

[    1.842225] PC is at rockchip_drm_backlight_update+0x14/0xd0
[    1.842733] LR is at rockchip_atomic_commit_complete+0x34/0x70
[    2.012457] [<ffffff800849cb70>] rockchip_drm_backlight_update+0x14/0xd0
[    2.013057] [<ffffff800849f5c8>] rockchip_atomic_commit_complete+0x34/0x70
[    2.013666] [<ffffff800849f680>] rockchip_drm_atomic_commit+0x7c/0x9c
[    2.014244] [<ffffff800848c510>] drm_atomic_commit+0x64/0x70
[    2.014747] [<ffffff800849ed64>] show_loader_logo+0x83c/0x944
[    2.015260] [<ffffff800849f1f4>] rockchip_drm_bind+0x388/0x418
[    2.015783] [<ffffff800850dbf4>] try_to_bring_up_master.part.3+0xac/0x114
[    2.016390] [<ffffff800850dd24>] component_master_add_with_match+0xc8/0x124
[    2.017010] [<ffffff800849e008>] rockchip_drm_platform_probe+0x208/0x238
[    2.017609] [<ffffff8008514898>] platform_drv_probe+0x58/0xa4
[    2.018123] [<ffffff8008512b38>] driver_probe_device+0x118/0x2ac
[    2.018656] [<ffffff8008512e18>] __device_attach_driver+0x88/0x98
[    2.019200] [<ffffff8008510f40>] bus_for_each_drv+0x7c/0xac
[    2.019702] [<ffffff800851296c>] __device_attach+0xa4/0x124
[    2.020204] [<ffffff8008512f84>] device_initial_probe+0x10/0x18
[    2.020737] [<ffffff8008511fc4>] bus_probe_device+0x2c/0x8c
[    2.021238] [<ffffff8008512440>] deferred_probe_work_func+0x74/0xa0
[    2.021795] [<ffffff80080b715c>] process_one_work+0x218/0x3e0
[    2.022307] [<ffffff80080b7b5c>] worker_thread+0x2e8/0x404
[    2.022797] [<ffffff80080bc4a0>] kthread+0xf8/0x100
[    2.023235] [<ffffff8008082840>] ret_from_fork+0x10/0x50

Change-Id: Ib77e871402dfcb1276befa274fc3cf43b017d879
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agopinctrl: rockchip: Add rk3128 pinctrl support
David Wu [Thu, 20 Jul 2017 12:37:32 +0000 (20:37 +0800)]
pinctrl: rockchip: Add rk3128 pinctrl support

There are 3 IP blocks pin routes need to be switched, that are
emmc-cmd, spi, i2s. And there are some pins need to be recalced,
which are gpio2c4~gpio2c7 and gpio2d0.

Change-Id: I1152a2ac4e179ed839d02a3f18ccef5ded849312
Signed-off-by: David Wu <david.wu@rock-chips.com>
6 years agopinctrl: rockchip: Use common interface for recalced iomux
David Wu [Thu, 20 Jul 2017 12:04:52 +0000 (20:04 +0800)]
pinctrl: rockchip: Use common interface for recalced iomux

The other Socs also need the feature of recalced iomux, so
make it as a common interface like iomux route feature.

Change-Id: I8a58ae0af5edd497a545d3734d99c22bed177a43
Signed-off-by: David Wu <david.wu@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366: enable power domain
Finley Xiao [Fri, 21 Jul 2017 07:22:52 +0000 (15:22 +0800)]
arm64: dts: rockchip: rk3366: enable power domain

Change-Id: I5c4e48f29fd9aaab72e74c0de3aa840f9990b8e2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agosoc: rockchip: power-domain: vpu and rkvdec ignore idle request for rk3366
Finley Xiao [Fri, 21 Jul 2017 07:50:46 +0000 (15:50 +0800)]
soc: rockchip: power-domain: vpu and rkvdec ignore idle request for rk3366

As vpu and rkvdec use the common idle request, if vpu enable idle request
and rkvdec is working, the rkvdec will be crash, so let them both don't
do idle request.

Change-Id: I1fe2bc99c81d3b2018e86896548514e5e8093a4a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agoiommu/rockchip: Fix runtime status unsupported
Elaine Zhang [Fri, 21 Jul 2017 08:46:19 +0000 (16:46 +0800)]
iommu/rockchip: Fix runtime status unsupported

Change-Id: Ief14da568aa641470a3a22d011739f474b9ed1ad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
6 years agoarm64: rockchip_linux_defconfig: add chinese display support
Binyuan Lan [Thu, 20 Jul 2017 15:29:04 +0000 (23:29 +0800)]
arm64: rockchip_linux_defconfig: add chinese display support

Change-Id: I31002a63a38fa46fb0f170222b0ddceeaf27427c
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366: Add hdmi node
WeiYong Bi [Wed, 19 Jul 2017 06:56:22 +0000 (14:56 +0800)]
arm64: dts: rockchip: rk3366: Add hdmi node

Change-Id: I99b95a9fd3e70c70b6066729dd4213f8beb33e19
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoarm64: dts: rk3399-sapphire-excavator-linux: add camera node
zhoupeng [Thu, 20 Jul 2017 07:26:28 +0000 (15:26 +0800)]
arm64: dts: rk3399-sapphire-excavator-linux: add camera node

dts: support tc358749xbg for HDMI IN

Change-Id: I5a5874d08ea13c27cac7b3507a46bb1f2288e3f4
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
6 years agomedia: soc_camera: add tc358749xgb sensor driver
zhoupeng [Thu, 20 Jul 2017 07:49:59 +0000 (15:49 +0800)]
media: soc_camera: add tc358749xgb sensor driver

Change-Id: I66ccb856cb2689bf26a8a12069b29c7ec6dae6f0
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
6 years agoMALI: utgard: fix the too small "max_job_runtime" in platform information
chenzhen [Tue, 11 Jul 2017 07:01:20 +0000 (15:01 +0800)]
MALI: utgard: fix the too small "max_job_runtime" in platform information

The original setting of "max_job_runtime" is too small
that jobs are too easy to timeout and be killed.

Change-Id: I5316c2b594d94dd0b844ef9a297baa7b226c4665
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
6 years agoARM: dts: rockchip: rk3368-sheep add vsel gpio for syr827
Jianqun Xu [Fri, 21 Jul 2017 06:22:12 +0000 (14:22 +0800)]
ARM: dts: rockchip: rk3368-sheep add vsel gpio for syr827

Add vsel gpio for syr827, which is PMIC_SLEEP in hardware pcb.

The driver will parse the gpio and use it to indicate the chip
work status, as the following codes:

static int fan53555_is_enabled ()
if defined vsel_gpio
gpiod_get_raw_value
else
regmap_read

Before the patch, the log shows:
CPU4: update cpu_capacity 1024
CPU4: Booted secondary processor [410fd033]
  cache: parent cpu4 should not be sleeping
rk3x-i2c ff650000.i2c: timeout, ipd: 0x10, state: 1

Since cpu4 is the base core for cluster1, which need to initialize
cpufreq during boot up, finally call fan53555_is_enabled. But the
i2c is suspended at that time, can't get interrupt until timeout.

Change-Id: I301e95be3b60d2faa456759d88c06cf64c2019ca
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
6 years agoARM: dts: rockchip: rk3368-p9: add vsel gpio for syr827
Jianqun Xu [Fri, 21 Jul 2017 06:36:13 +0000 (14:36 +0800)]
ARM: dts: rockchip: rk3368-p9: add vsel gpio for syr827

Change-Id: I847334e0588659e5950b01a4e40bf0a24f5646bf
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
6 years agodrm/rockchip: vop: don't force enable post scale
Mark Yao [Thu, 20 Jul 2017 10:57:40 +0000 (18:57 +0800)]
drm/rockchip: vop: don't force enable post scale

Vop would always report post buf empty error if enable
post scale config with non-scale factor

Change-Id: Ibc3f27c674195e6467471069488f14471927f709
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: vop: add error irq handle
Mark Yao [Thu, 25 May 2017 01:40:34 +0000 (09:40 +0800)]
drm/rockchip: vop: add error irq handle

Change-Id: I84a3bc5c9798bbd4e0b11bc499f4df5ca1907cb7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: support backlight device
Mark Yao [Thu, 6 Jul 2017 08:02:16 +0000 (16:02 +0800)]
drm/rockchip: support backlight device

Change-Id: Ib793b0dec8fe62027ca8e3085089d2e431b59eb5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agophy: rockchip-inno-usb2: delay suspending phy if plug out device
William Wu [Thu, 20 Jul 2017 07:02:02 +0000 (15:02 +0800)]
phy: rockchip-inno-usb2: delay suspending phy if plug out device

The otg_sm_work will suspend the usb2 phy immediately
if it detects disconnection from host. However, the usb2
controller(e.g. DWC2) may need to reinit registers and
reset usb core after usb disconnect, and it needs to
keep the usb2 phy stay in power on state to get utmi clk
for these usb controller operation. We don't have a good
synchronization mechanism to operate usb2 phy between
usb2 phy driver and usb2 controller driver, so we delay
4s to suspend phy if detect otg device disconnect from
host, this can make sure that usb2 controller completes
reinitialization before suspend usb2 phy.

Change-Id: I79288b8c7b141bb16e6d96d80cfee75f7558d2c0
Signed-off-by: William Wu <william.wu@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: don't enable PHY PLL until it's configured
xubilv [Tue, 18 Jul 2017 03:46:48 +0000 (11:46 +0800)]
drm/rockchip: dw-mipi-dsi: don't enable PHY PLL until it's configured

Change-Id: Id28702ac62030b112dc57e4c3fc5b91cd1421a3f
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC
xubilv [Tue, 18 Jul 2017 03:38:16 +0000 (11:38 +0800)]
drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC

This matches other drivers.

Change-Id: I1e5773b926c274e99ea117a2a0fdc5ab096c49aa
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: fix escape clock rate
xubilv [Tue, 18 Jul 2017 03:24:39 +0000 (11:24 +0800)]
drm/rockchip: dw-mipi-dsi: fix escape clock rate

Use the same calculation as the vendor kernel to derive the escape clock
speed.

Change-Id: I7aff4dc7fa9598df164148eaf44304caad704f23
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: only request HS clock when required
xubilv [Tue, 18 Jul 2017 02:29:17 +0000 (10:29 +0800)]
drm/rockchip: dw-mipi-dsi: only request HS clock when required

Requesting the HS clock from the PHY before we initialize it causes an
invalid signal to be sent out since the input clock is not yet
configured.  The PHY databook suggests only asserting this signal when
performing HS transfers, so let's do that.

Change-Id: I7006f81d8c620dc84e84f99383c7b5414d6ac12d
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_get_hcomponent_lbcc function
xubilv [Mon, 17 Jul 2017 10:05:48 +0000 (18:05 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_get_hcomponent_lbcc function

Use the common interface to calculate

Change-Id: I21836061d1442048efaba3b2930811b8a0aab0aa
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: support read lane-rate from dts
xubilv [Mon, 17 Jul 2017 09:54:43 +0000 (17:54 +0800)]
drm/rockchip: dw-mipi-dsi: support read lane-rate from dts

It is convenient for the client to manually adjust
the value of lane rate.

Change-Id: Ic6d8c4d235eacc8cb7540d172bd69c29c2b277dd
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: analyze the platform parameters in the probe function
xubilv [Mon, 17 Jul 2017 08:24:22 +0000 (16:24 +0800)]
drm/rockchip: dw-mipi-dsi: analyze the platform parameters in the probe function

The analysis of platform parameters Only need to do it once,
if this in bind function, when return -EPROBE_DEFER,
it will be executed more than once.

Change-Id: I508021f930d39e1b79e1421c4262b9e7ab501b6c
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_video_mode_config function
xubilv [Fri, 14 Jul 2017 09:40:28 +0000 (17:40 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_video_mode_config function

Change-Id: Id11053734b1c35dc77028f2ac537bd39c096da7d
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: add mode_flags as a judgment condition
xubilv [Fri, 14 Jul 2017 08:59:13 +0000 (16:59 +0800)]
drm/rockchip: dw-mipi-dsi: add mode_flags as a judgment condition

This flag is used as a condition for the register configuration

Change-Id: I6741063b106ae00f4f1a690abde79d76bc529e95
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_set_mode function
xubilv [Fri, 14 Jul 2017 08:48:48 +0000 (16:48 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_set_mode function

Change-Id: I4ba2a1519c1e5ac485a4d7416c0066ad8ce6527a
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_encoder_disable function
xubilv [Fri, 14 Jul 2017 08:27:15 +0000 (16:27 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_encoder_disable function

Change-Id: I4c5ba54748bd1965a9f2cdea924efa6d449677a1
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_host_transfer function
xubilv [Fri, 14 Jul 2017 07:45:25 +0000 (15:45 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_host_transfer function

Change-Id: I2a9bf2f21950f9fffc89d244308d6270663d5ef2
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: add delay for panel power on
xubilv [Thu, 13 Jul 2017 11:40:00 +0000 (19:40 +0800)]
drm/rockchip: dw-mipi-dsi: add delay for panel power on

Change-Id: Ife1a3c421dd192fc76b1ff6c84dbfe4afb1b0a54
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agoARM: dts: rk3288: add delay for panel power on
xubilv [Thu, 13 Jul 2017 11:27:36 +0000 (19:27 +0800)]
ARM: dts: rk3288: add delay for panel power on

Change-Id: I132ee50b9b3e0d8a3641135c94723d0a23bb5c40
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/panel: simple: move panel_simple_dsi_send_cmds from enable to prepare
xubilv [Thu, 13 Jul 2017 11:21:38 +0000 (19:21 +0800)]
drm/panel: simple: move panel_simple_dsi_send_cmds from enable to prepare

Change-Id: I9fdd1192523bc5bd99ca2fdc37fdf2f4b06cbb8a
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agodrm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_encoder_enable function
xubilv [Thu, 13 Jul 2017 10:44:49 +0000 (18:44 +0800)]
drm/rockchip: dw-mipi-dsi: organize dw_mipi_dsi_encoder_enable function

Change-Id: I9d3f43f9d320cc33026bce2ce173a0baf3008ce0
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agoARM64: rockchip_defconfig: select CONFIG_TOUCHSCREEN_GSLX680_PAD
Jianqun Xu [Mon, 17 Jul 2017 08:36:07 +0000 (16:36 +0800)]
ARM64: rockchip_defconfig: select CONFIG_TOUCHSCREEN_GSLX680_PAD

Change-Id: I48bf260eedbabcd0ac8cdf827b4f5f629582e936
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3399 firefly android dts file
Jianqun Xu [Mon, 17 Jul 2017 02:46:32 +0000 (10:46 +0800)]
arm64: dts: rockchip: rk3399 firefly android dts file

Add dts file for firefly rk3399 board to run android os.
Support soc sub-system, vop, edp, rga, audio, wifi and
so on.

Change-Id: Ia921769b81d4a74784bb3e638b2cb01111c621c9
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
6 years agoarm: dts: rockchip: add names for vop register
Mark Yao [Tue, 27 Jun 2017 02:47:30 +0000 (10:47 +0800)]
arm: dts: rockchip: add names for vop register

Change-Id: I463cc2dc92f233b5b4b6f91b71cf78af92d4a2c1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: hdmi: Add support for rk3366
WeiYong Bi [Wed, 12 Jul 2017 06:20:54 +0000 (14:20 +0800)]
drm/rockchip: hdmi: Add support for rk3366

Change-Id: I086533ed5c94110f913ab88f4760d452beaf12d1
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoARM64: dts: rockchip: rename mipi to dsi for rk3368
WeiYong Bi [Thu, 13 Jul 2017 08:10:11 +0000 (16:10 +0800)]
ARM64: dts: rockchip: rename mipi to dsi for rk3368

Change-Id: Ied02b4d521ad3c49ce7b7a591a3d3f8544182e12
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoARM64: dts: rockchip: rename mipi to dsi for rk3366
WeiYong Bi [Fri, 14 Jul 2017 07:26:41 +0000 (15:26 +0800)]
ARM64: dts: rockchip: rename mipi to dsi for rk3366

Change-Id: I677f4554bdc0d6df9cfdffa86eebe0fa4e1759dd
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agodrm/rockchip: lvds: add loader protect
WeiYong Bi [Mon, 10 Jul 2017 08:30:02 +0000 (16:30 +0800)]
drm/rockchip: lvds: add loader protect

Change-Id: Ia0866cb9125a98ffb4ce99be26be9e0ccd665765
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoARM: dts: sync tinker board dts
Jacob Chen [Wed, 19 Jul 2017 08:15:35 +0000 (16:15 +0800)]
ARM: dts: sync tinker board dts

Sync our kernel with asus to reduce rebase work.

origin:
https://github.com/TinkerBoard/debian_kernel/blob/linux4.4-rk3288/arch/arm/boot/dts/rk3288-miniarm.dts
with dmc and camera nodes deleted

Change-Id: I7e699ca57465c03f41acb4ae47e5e70794118489
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3288: add dts file for lvds panel
Huang Jiachai [Fri, 14 Jul 2017 06:51:31 +0000 (14:51 +0800)]
arm64: dts: rockchip: rk3288: add dts file for lvds panel

Change-Id: I5991d0301935b5bdf51aead7719f84b6aa9264c5
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
6 years agophy: rockchip-inno-hdmi-phy: update 3328 phy pixclock in the recalc_rate
Zheng Yang [Thu, 20 Jul 2017 02:15:32 +0000 (10:15 +0800)]
phy: rockchip-inno-hdmi-phy: update 3328 phy pixclock in the recalc_rate

If default phy pre-pll output pixclock is same to the requested rate,
the set_rate function is not called, inno->pixclock is zero and
make phy work not ok. This patch update inno->pixclock both in the
recalc_rate and set_rate, make pixclock be the real value.

Change-Id: Ifd4e145c499c2e82f96918ca62235627bf326734
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
6 years agodrm/panel: support drm_find_panel_by_connector
Mark Yao [Thu, 6 Jul 2017 07:43:10 +0000 (15:43 +0800)]
drm/panel: support drm_find_panel_by_connector

Change-Id: Iee970e013ff8b1558a060f334c700dea36c38d0f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: vop: add rk3399 cabc registers
Mark Yao [Fri, 7 Jul 2017 06:56:08 +0000 (14:56 +0800)]
drm/rockchip: vop: add rk3399 cabc registers

Change-Id: Ia7929e4c62ac031453fdb50ed4dcb20d11faee95
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agodrm/rockchip: add cabc support
Mark Yao [Wed, 28 Jun 2017 07:11:01 +0000 (15:11 +0800)]
drm/rockchip: add cabc support

CABC(Content Adaptive Backlight Control) is used to
increase the contrast of such LCD-screens the backlight
can be (globally) dimmed when the image to be displayed
is dark (i.e. not comprising high intensity image data)
while the image data is numerically corrected and adapted
to the reduced backlight intensity.

Change-Id: I0bd84375264675943f1b601f0cac8b843567087d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3399: add 528MHz and 600MHz for dmc
Finley Xiao [Tue, 18 Jul 2017 03:21:31 +0000 (11:21 +0800)]
arm64: dts: rockchip: rk3399: add 528MHz and 600MHz for dmc

Only 200MHz, 300MHz, 400MHz, 528MHz, 600MHz, 666MHz, 732MHz and
800MHz are available at present.

Change-Id: I3a376b389fe6b06b3b32f0c695de2cbde05dfeea
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agodrm/rockchip: lvds: set correct step to power off lvds
Huang Jiachai [Fri, 14 Jul 2017 06:59:33 +0000 (14:59 +0800)]
drm/rockchip: lvds: set correct step to power off lvds

Change-Id: I6ce0fea548a0bc66c231ac184b45b74fd9acaf1f
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3368: fix compatible string for lvds node
WeiYong Bi [Thu, 13 Jul 2017 01:46:02 +0000 (09:46 +0800)]
arm64: dts: rockchip: rk3368: fix compatible string for lvds node

Replace "rockchip,rk33xx-lvds" with "rockchip,rk3368-lvds"

Change-Id: I065de5d994f167129591025e4251944478fa43e7
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agodrm/rockchip: lvds: Add support for rk3366
WeiYong Bi [Wed, 12 Jul 2017 06:20:34 +0000 (14:20 +0800)]
drm/rockchip: lvds: Add support for rk3366

Change-Id: Iaf54c4667042b0b24a9083cb7ca931c1b0603804
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoarm64: rockchip_defconfig: remove CONFIG_RK31XX_LVDS
WeiYong Bi [Fri, 14 Jul 2017 07:49:42 +0000 (15:49 +0800)]
arm64: rockchip_defconfig: remove CONFIG_RK31XX_LVDS

Change-Id: Ie7716e38dd68876ab037cc3ed6072dba4118a798
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3368-r88: Select xin32k from pwm1 out
Zhangbin Tong [Mon, 17 Jul 2017 08:00:22 +0000 (16:00 +0800)]
arm64: dts: rockchip: rk3368-r88: Select xin32k from pwm1 out

Change-Id: Iff675d47600cd7bf1d30564ca82697ce3b1fd9f4
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
6 years agoarm64: rockchip_defconfig: enable CONFIG_COMMON_CLK_PWM
Zhangbin Tong [Mon, 17 Jul 2017 07:58:46 +0000 (15:58 +0800)]
arm64: rockchip_defconfig: enable CONFIG_COMMON_CLK_PWM

Change-Id: Ie8c076e6d4c1a0a81c90f7dcd5653bef424b27e2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
6 years agoUPSTREAM: clk: pwm: Use pwm_get_args() where appropriate
Stephen Boyd [Tue, 1 Mar 2016 19:00:18 +0000 (11:00 -0800)]
UPSTREAM: clk: pwm: Use pwm_get_args() where appropriate

The PWM framework has clarified the concept of reference PWM config (the
platform dependent config retrieved from the DT or the PWM lookup table)
and real PWM state.

Use pwm_get_args() when the PWM user wants to retrieve this reference
config and not the current state.

This is part of the rework allowing the PWM framework to support
hardware readout and expose real PWM state even when the PWM has just
been requested (before the user calls pwm_config/enable/disable()).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit dd0b38b7ca0d8c8aadcf8a17d7c90d36ab8ab6e4)

Change-Id: I54c4b3853359b5fa41f8f949b504f82c6f069034
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
6 years agodrm/rockchip: lvds: if port is null return -EINVAL
Huang Jiachai [Tue, 18 Jul 2017 03:59:59 +0000 (11:59 +0800)]
drm/rockchip: lvds: if port is null return -EINVAL

Change-Id: I9503b4f2d317a12d91ce136213d8d2e629b72823
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
6 years agoARM: dts: rk3288: rename mipi to dsi
xubilv [Thu, 13 Jul 2017 09:04:54 +0000 (17:04 +0800)]
ARM: dts: rk3288: rename mipi to dsi

Change-Id: I35d348068df3720608fc9cd22f97be0264a03f67
Signed-off-by: xubilv <xbl@rock-chips.com>
6 years agousb: dwc_otg_310: fix bad unlock balance issue
William Wu [Mon, 17 Jul 2017 12:10:46 +0000 (20:10 +0800)]
usb: dwc_otg_310: fix bad unlock balance issue

There is a bad unlock balance issue in the following case:
1. Use micro USB 2.0 interface;
2. Vbus 5v is always powered on;
3. Wait until DWC2 completes initialization, and then plug
   in OTG to Host cable;
4. Plug out the OTG cable, and then we will reproduce this
   issue, and we'll get the following log if we enable the
   kernel lock debugging.

=====================================
[ BUG: bad unlock balance detected! ]
4.4.71 #303 Not tainted
-------------------------------------
swapper/0/0 is trying to release lock (&(sl)->rlock) at:
[<c0795848>] dwc_otg_pcd_suspend_cb+0x20/0x48
but there are no more locks to release!

other info that might help us debug this:
1 lock held by swapper/0/0:

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.71 #303
Hardware name: Rockchip (Device Tree)
[<c0110018>] (unwind_backtrace) from [<c010c04c>] (show_stack+0x10/0x14)
[<c010c04c>] (show_stack) from [<c0423e28>] (dump_stack+0x9c/0xd4)
[<c0423e28>] (dump_stack) from [<c021803c>] (print_unlock_imbalance_bug.part.7+0x8c/0xb8)
[<c021803c>] (print_unlock_imbalance_bug.part.7) from [<c018ce74>] (lock_release+0x284/0x54c)
[<c018ce74>] (lock_release) from [<c0c0e03c>] (_raw_spin_unlock+0x18/0x54)
[<c0c0e03c>] (_raw_spin_unlock) from [<c0795848>] (dwc_otg_pcd_suspend_cb+0x20/0x48)
[<c0795848>] (dwc_otg_pcd_suspend_cb) from [<c0792cc4>] (dwc_otg_handle_usb_suspend_intr+0x68/0x37c)
[<c0792cc4>] (dwc_otg_handle_usb_suspend_intr) from [<c079329c>] (dwc_otg_handle_common_intr+0x2c4/0xd58)
[<c079329c>] (dwc_otg_handle_common_intr) from [<c0786a18>] (dwc_otg_common_irq+0xc/0x18)
[<c0786a18>] (dwc_otg_common_irq) from [<c0199e48>] (handle_irq_event_percpu+0x188/0x4d4)
[<c0199e48>] (handle_irq_event_percpu) from [<c019a1cc>] (handle_irq_event+0x38/0x5c)
[<c019a1cc>] (handle_irq_event) from [<c019d654>] (handle_fasteoi_irq+0xa8/0x124)
[<c019d654>] (handle_fasteoi_irq) from [<c0199454>] (generic_handle_irq+0x18/0x28)
[<c0199454>] (generic_handle_irq) from [<c0199754>] (__handle_domain_irq+0x88/0xb0)
[<c0199754>] (__handle_domain_irq) from [<c01014b4>] (gic_handle_irq+0x4c/0x94)
[<c01014b4>] (gic_handle_irq) from [<c010cbb8>] (__irq_svc+0x58/0x98)

It's because that when plug in OTG to host cable, the
core_if->lock will be initialized to hcd->lock (check_id()->
id_status_change()->cil_hcd_start()->dwc_otg_hcd_reinit()),
so we should release core_if->lock before call cil_pcd_suspend()
rather than release the pcd->lock inside of callback function.

Change-Id: I1e32f37c701d1a8d741947b6bf385c1bbcb6da78
Signed-off-by: William Wu <william.wu@rock-chips.com>
6 years agoarm64: dts: rockchip: add vpu for rk3366 android7.1
Zorro Liu [Fri, 14 Jul 2017 03:22:33 +0000 (11:22 +0800)]
arm64: dts: rockchip: add vpu for rk3366 android7.1

Change-Id: I798a6518a2a74fe07ae2bb82abaca2da501ae07b
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
6 years agoFROMLIST: drm: skip wait on vblank for set plane
Jonas Karlman [Tue, 2 May 2017 05:53:15 +0000 (07:53 +0200)]
FROMLIST: drm: skip wait on vblank for set plane

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
(am from https://github.com/LongChair/LibreELEC.tv/commit/debdec6)

Change-Id: I20d3d03638388fbb1e84215cba187f2e89089a62
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoUPSTREAM: drm/rockchip: Replace custom wait_for_vblanks with helper
Tomasz Figa [Wed, 14 Sep 2016 12:54:58 +0000 (21:54 +0900)]
UPSTREAM: drm/rockchip: Replace custom wait_for_vblanks with helper

Currently the driver uses a custom function to wait for flip to complete
after an atomic commit. It was needed before because of two problems:
 - there is no hardware vblank counter, so the original helper would
   have a race condition with the vblank interrupt,
 - the driver didn't support unreferencing cursor framebuffers
   asynchronously to the commit, which was what the helper expected.
Since both problems have been solved by previous patches, we can now
make the driver use the generic helper and remove custom waiting code.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 81c248f75a130c1ce46c67e8b05b37e8ffbbb33e)

Change-Id: Ida5a38b71f9e7812f415eb8889d906d2fe3b093e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoUPSTREAM: drm/rockchip: Unreference framebuffers from flip work
Tomasz Figa [Wed, 14 Sep 2016 12:54:57 +0000 (21:54 +0900)]
UPSTREAM: drm/rockchip: Unreference framebuffers from flip work

Currently the driver waits for vblank and then unreferences old
framebuffers from atomic commit code path. This is however breaking the
legacy cursor API, which requires the updates to be fully asynchronous.
Instead of just adding a special case for cursor, we can have actually
smaller amount of code to unreference any changed framebuffer from a
flip work.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 47a7eb4597775ecdc29d2630d875a991f0449bf3)

Change-Id: Id36cdef1ea3962ac8c9a99549732d1810c57c4f9
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoUPSTREAM: drm/rockchip: Avoid race with vblank count increment
Tomasz Figa [Wed, 14 Sep 2016 12:54:56 +0000 (21:54 +0900)]
UPSTREAM: drm/rockchip: Avoid race with vblank count increment

Since VOP does not have a hardware vblank count register, the ongoing
commit might be racing with a requested vblank interrupt, which would
increment the software vblank counter before the changes being committed
actually happen.

To avoid this, we can extend .atomic_flush(), so after it sets cfg_done
bit, it polls the vblank interrupt bit until it's inactive to make sure
that any old vblank interrupt gets to the handler and then uses
synchronize_irq(vop->irq) to make sure the handler finishes running.

The polling case should happen very rarely, but even if, the total wait
time should be relatively low and in practice almost equal to the vop
hardirq handler running time.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 7caecdbec1128a934ee628f399110dff8a50c9a1)

Change-Id: Ic5f6231300214485ea569a2296c990aa123f6ff7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoARM: dts: rockchip: add node for ov8858 on rk3288 evb
Jacob Chen [Wed, 12 Jul 2017 03:33:36 +0000 (11:33 +0800)]
ARM: dts: rockchip: add node for ov8858 on rk3288 evb

Disabled by default to avoid error messages.

Change-Id: I4fc05c0a782d6b1035b9e4bc7b31cc462d65166a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
6 years agoARM: dts: rockchip: use iommu for rk3288 v4l2 isp
Jacob Chen [Tue, 11 Jul 2017 05:26:40 +0000 (13:26 +0800)]
ARM: dts: rockchip: use iommu for rk3288 v4l2 isp

we have videobuf2 cip isp support now

Change-Id: I7f6da305f2a4a658a4097e06361c694ca6ba9a18
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
6 years agomfd: rk808: add rk816 support
shengfei Xu [Fri, 7 Jul 2017 09:18:10 +0000 (17:18 +0800)]
mfd: rk808: add rk816 support

include sub modules: regulator, rtc, gpio, pwrkey

Change-Id: I59cc4b943403f1e0b1210a314cfcbf61fc193bdf
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
6 years agoARM: config: enable MIPI CSI config for rockchip linux
Jacob Chen [Mon, 17 Jul 2017 00:35:33 +0000 (08:35 +0800)]
ARM: config: enable MIPI CSI config for rockchip linux

Change-Id: I32d3b569ffeb44132b2e28efdb0f2759f9f8498c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
6 years agoarm64: dts: rockchip: fix lcd pinctrl define error for rk3368
Huang Jiachai [Fri, 14 Jul 2017 07:17:20 +0000 (15:17 +0800)]
arm64: dts: rockchip: fix lcd pinctrl define error for rk3368

Change-Id: I843049573cda97cc226730e34f043bd54021951e
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
6 years agoarm64: dts: rockchip: rk3366: add leakage nvmem-cells for cpu
Finley Xiao [Fri, 14 Jul 2017 09:39:20 +0000 (17:39 +0800)]
arm64: dts: rockchip: rk3366: add leakage nvmem-cells for cpu

Change-Id: I5e546ecbf5e1d8cc0a36d8ebd439663e1658f23b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
6 years agoarm64: dts: rockchip: Remove the rk3366-tb build
David Wu [Fri, 14 Jul 2017 09:43:42 +0000 (17:43 +0800)]
arm64: dts: rockchip: Remove the rk3366-tb build

Change-Id: I8260d583da480f49834647ad114f3d1346ef1bbd
Signed-off-by: David Wu <david.wu@rock-chips.com>
6 years agodrm/atomic: export drm_atomic_replace_property_blob_from_id
Mark Yao [Wed, 28 Jun 2017 07:00:51 +0000 (15:00 +0800)]
drm/atomic: export drm_atomic_replace_property_blob_from_id

Change-Id: Iebca91e396f6770b0b2ce588093119ea321f3fb5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
6 years agoMerge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Alex Shi [Tue, 18 Jul 2017 06:31:54 +0000 (14:31 +0800)]
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android

6 years ago Merge tag 'v4.4.77' into linux-linaro-lsk-v4.4
Alex Shi [Tue, 18 Jul 2017 04:05:46 +0000 (12:05 +0800)]
 Merge tag 'v4.4.77' into linux-linaro-lsk-v4.4

 This is the 4.4.77 stable release

6 years agoMerge branch 'v4.4/topic/optee-lsk-mainline' into linux-linaro-lsk-v4.4
Alex Shi [Mon, 17 Jul 2017 14:17:03 +0000 (22:17 +0800)]
Merge branch 'v4.4/topic/optee-lsk-mainline' into linux-linaro-lsk-v4.4

6 years agodt/vendor-prefixes: remove redundant vendor
Alex Shi [Mon, 17 Jul 2017 14:10:16 +0000 (22:10 +0800)]
dt/vendor-prefixes: remove redundant vendor

78668d8100b8b0756f6e7b72d2b90b7e6192db73 dt/bindings: add bindings for optee
introduce a redundant vendor
+licheepi       Lichee Pi
Need to remove it.

Reported-by: Victor Chong <victor.chong@linaro.org>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
6 years agoLinux 4.4.77
Greg Kroah-Hartman [Sat, 15 Jul 2017 09:58:03 +0000 (11:58 +0200)]
Linux 4.4.77