Commit Graph

613233 Commits

Author SHA1 Message Date
Baoyou Xie
519570ad4e UPSTREAM: drm: bridge: analogix/dp: mark symbols static where possible
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1053:5: warning: no previous prototype for 'analogix_dp_get_modes' [-Wmissing-prototypes]
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1097:1: warning: no previous prototype for 'analogix_dp_detect' [-Wmissing-prototypes]

In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks both functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474788764-6069-1-git-send-email-baoyou.xie@linaro.org

Change-Id: Idea810a90652d2f75416bcd0dd590444e1b269a8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 089cfdd9b0)
2018-10-11 12:11:58 +08:00
Sean Paul
c9f39a454c BACKPORT: drm/bridge: analogix_dp: Don't read EDID if panel present
If there's a panel connected to the analogix_dp bridge, rely on
the panel driver for modes, rather than reading EDID *and* calling
get_modes() on the panel.

This allows panels with a valid EDID to read it in the panel driver
(e.g. simple_panel), and panels with invalid EDID to homebrew modes
in their get_modes implementation.

Signed-off-by: Sean Paul <seanpaul@chromium.org>

Change-Id: Ic144db2fedfcc10bc5b740cd6aa4f8f4e8452427
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 8c77e2c2a4)
2018-10-11 12:11:58 +08:00
Tomeu Vizoso
4c06e137d2 BACKPORT: drm/bridge: analogix_dp: Remove duplicated code
Remove code for reading the EDID and DPCD fields and use the helpers
instead.

Besides the obvious code reduction, other helpers are being added to the
core that could be used in this driver and will be good to be able to
use them instead of duplicating them.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Yakir Yang <ykk@rock-chips.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Archit Taneja <architt@codeaurora.org>

Change-Id: I7d1bf2f13cc68e5c89f871bada33c5b10b87a859
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 0d97ad03f4)
2018-10-11 12:11:58 +08:00
Masahiro Yamada
fdc5efe649 UPSTREAM: drm/bridge: analogix_dp: squash lines for simple wrapper functions
Remove unneeded variables and assignments.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[seanpaul added analogix prefix to subject]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-4-git-send-email-yamada.masahiro@socionext.com

Change-Id: Ia7c0e75f667ff4140719bf1b11738a0854a820da
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 03d6356d45)
2018-10-11 12:11:58 +08:00
Frank Wang
2c0460f796 ARM64: dts: rockchip: add hwlock node for rk1808
This patch adds Hardware spinlock node support for rk1808 SoC.

Change-Id: I53b3413bfca6a7310a192d029c9fe922fe48964a
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:01:42 +08:00
Frank Wang
5237212dd7 hwspinlock: rockchip: add hardware spinlock driver
The Hardware spinlock device on Rockchip platform provides hardware
assistance for synchronization between the multiple processors in the
system.

Change-Id: Ib118dfe38c2ceb665556d5ec3aaf7be13552d2d9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:01:02 +08:00
Frank Wang
2b57f38056 dt-bindings: hwlock: add the rockchip hwspinlock bindings document
Add binding documentation for the Rockchip Hardware spinlock.

Change-Id: Iec1bf55196f910323a2158ecd04f31223135242d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:00:54 +08:00
shengfei Xu
b60783fdae arm64: dts: rockchip: rk1808-evb: the sw1 interconvert with sw2
Change-Id: I18f5b8274716d0250fd22b4fac0de82c185b0dfb
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-10-11 10:37:52 +08:00
Elaine Zhang
5b3e79f430 arm64: dts: rockchip: modify gpll freq to 1188M for rk1808
set gpll 1188M is better for cif 27M\37.125M\74.25M

Change-Id: I05003333980da535b9f20f021c38a2dbcedf74f6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-11 09:49:17 +08:00
Elaine Zhang
c7e655d568 arm64: dts: rockchip: modify the ppll freq to 200M for rk1808
ppll set 200M is better for pcie and usb.

Change-Id: If1e14aa09e6231e7cbd5cf7d6fc8947d38a8f11a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-11 09:47:41 +08:00
Elaine Zhang
45721e5976 clk: rockchip: rk1808: support npu half divider
Change-Id: I78d8734b96e5982e2f0dcd08cf1747ff3d8f6e21
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-11 09:47:19 +08:00
shengfei Xu
9b53e92014 arm64: configs: rk1808_linux: enable CONFIG_INPUT_RK8XX_PWRKEY
Change-Id: I86b9dea075b3242e23eb0cbd2a1a9910b4ff5f35
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-10-11 09:46:31 +08:00
Hu Kejun
79a732a593 media: rk-isp10: Fix AE information is not correct when updating exposure by each frame
Change-Id: Ibec00465ff42f2e985e9d2ec6b54bb2294830484
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-10 20:49:00 +08:00
Hu Kejun
4199db0812 media: rk-isp10: fix lose buffer in qduf ioctl
Change-Id: If1d8cf228642f08745d22856b19677164eaba980
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-10 20:48:38 +08:00
Hu Kejun
dc72529740 media: rk-isp10: fix one vb is in queue.done_list twice
vb with done state is can't added to stream.buf_queue
when another stream is started, because this vb is
in queue.done_list.

Change-Id: I7b60d6941953509e5962efae723d36b516b4185c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-10 20:48:25 +08:00
Sandy Huang
a0028c7825 drm/rockchip: rgb: fix rgb data sync bypass config error
Change-Id: I6a7e99c232e3568b62de95293220f8219588c00f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-10 20:47:55 +08:00
Tao Huang
2a84d6959e ARM: rockchip_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Change-Id: I9415f90c536cf9960f7dd69457d437184e6172ee
Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 20:47:29 +08:00
Tao Huang
a18dc3e071 arm64: rockchip_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Change-Id: Iceacfa9d79a1c1fe1b8ab97fe5257ad894d596b9
Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 20:04:01 +08:00
Tao Huang
d376ad8f23 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (1212 commits)
  ANDROID: sdcardfs: Change current->fs under lock
  ANDROID: sdcardfs: Don't use OVERRIDE_CRED macro
  ANDROID: restrict store of prefer_idle as boolean
  BACKPORT: arm/syscalls: Optimize address limit check
  UPSTREAM: syscalls: Use CHECK_DATA_CORRUPTION for addr_limit_user_check
  BACKPORT: arm64/syscalls: Check address limit on user-mode return
  BACKPORT: x86/syscalls: Check address limit on user-mode return
  BACKPORT: lkdtm: add bad USER_DS test
  UPSTREAM: bug: switch data corruption check to __must_check
  BACKPORT: lkdtm: Add tests for struct list corruption
  UPSTREAM: bug: Provide toggle for BUG on data corruption
  UPSTREAM: list: Split list_del() debug checking into separate function
  UPSTREAM: rculist: Consolidate DEBUG_LIST for list_add_rcu()
  BACKPORT: list: Split list_add() debug checking into separate function
  FROMLIST: ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.
  BACKPORT: arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
  ANDROID: arm64: mm: fix 4.4.154 merge
  BACKPORT: zsmalloc: introduce zs_huge_class_size()
  BACKPORT: zram: drop max_zpage_size and use zs_huge_class_size()
  ANDROID: tracing: fix race condition reading saved tgids
  ...

Change-Id: I9f23db35eb926b6fa0d7af7dbbb55c9a37d536fc
2018-10-10 19:37:13 +08:00
Tao Huang
90a00e3789 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: I06ad15523c629920cd3851c7e8f7ee4fc1391687
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 19:36:25 +08:00
Tao Huang
4800ce2b29 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I8e62cee144c07b4c5910fd3124aeece4640d0df9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 19:33:08 +08:00
Tao Huang
9b1d6cb325 staging: ion: rockchip: remove useless ION_IOC_GET_PHYS
Recent ION do not support ion_handle_get_by_id. So ION_IOC_GET_PHYS
is broken. Remove custom ioctl support entirely.

Change-Id: I591d4b8521a96d17cd2171c7b364e44d1b97cf24
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 18:50:25 +08:00
Hu Kejun
ea8f1b0e82 iommu/rockchip: add sclk
On some platform, it needs aclk/hclk/sclk for using iommu.

Change-Id: Iaf60124e225d418af8bbf1e0b4a31e907358fcfd
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-10 16:41:03 +08:00
Finley Xiao
ebfecc19e2 arm64: dts: rockchip: Enable tsadc for rk1808-evb-v10
Change-Id: I8379e218afdbbd702e5094d96991d85cba10dd55
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-10 16:39:29 +08:00
Elaine Zhang
b1680c7da9 arm64: dts: rockchip: rk1808: add pinctrl for clkin/out_32k
Change-Id: I31cb6a789e43933d759c1b667f97d20cd2c97eda
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-10 16:37:39 +08:00
Elaine Zhang
54e75c20ac clk: rockchip: rk1808: add clk ID for clk_rtc32k_frac
Change-Id: Iecde141adbee536285155c64267580bde2ce5b13
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-10 11:32:20 +08:00
Finley Xiao
701dfebbed arm64: dts: rockchip: rk1808: Add opp table for cpu
Change-Id: Ie9d683c59d61a83cb1e5e7df73e56bedffa56cfd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-10 10:46:50 +08:00
Tao Huang
0b9b266a6c arm64: rk1808_linux_defconfig: enable CPU_IDLE
Change-Id: I9a3b58bfa1d333575afb7b448de62fe922dfbe1f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-09 20:36:49 +08:00
Bian Jin chen
f1963f7c9a arm: rockchip_defconfig: enable CONFIG_F2FS_FS_ENCRYPTION.
Android Go device require this config for performance test,
enable it by default.

Test: ./performance_test/system/checkout_f2fs.sh

Change-Id: Id5a9b33da24eec768d60e158af72dd9af216f653
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2018-10-09 15:49:06 +08:00
Elaine Zhang
cf68108ad4 arm64: dts: rockchip: rk1808-evb: fix up the polarity for syr8xx vsel gpio
Set vsel gpio low to disable vdd_npu.
Set vsel gpio high to enable vdd_npu.
The vsel pin is pull up by hw default.

Change-Id: I86ef1f2d6d2a0dd26a128cba1e52a140e6844291
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 15:31:57 +08:00
Bian Jin chen
d0f8f60d0b arm64: rockchip_defconfig: enable CONFIG_F2FS_FS_ENCRYPTION.
Android Go device require this config for performance test,
enable it by default.

Test: ./performance_test/system/checkout_f2fs.sh

Change-Id: If6d07a82546759f672df8519d113a702c3bcfbe3
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2018-10-09 15:11:30 +08:00
Finley Xiao
2e53d62c04 thermal: rockchip: Use incremental code table for rk1808
Change-Id: I2d0f379fb08eaf4a4819bc36bcb61e5ca4a50d45
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-09 15:02:39 +08:00
Elaine Zhang
1c450a8082 clk: rockchip: rk1808: rename SCLK_GPIO to DBCLK_GPIO
Change-Id: I1ed6fe175fb2e640a7a61e1a2e799e94e76b435f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 14:59:04 +08:00
Tao Huang
c7f27e053c rk: gcc-wrapper.py: set LC_ALL=C when run gcc
Make sure messages are not affected by locale environment variables.

Change-Id: Id5606c1a8e1f7a8f09d4e14c4531daebaceef2bf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-09 14:43:04 +08:00
Elaine Zhang
43ab68e6c6 clk: rockchip: rk1808: add FRAC_MAX_PRATE limit for vop/uart/i2s/pdm
Change-Id: I444203484272e442fc0798a3daaaba0aee2dda31
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 11:52:47 +08:00
Wyon Bi
0ef8e328e9 drm/rockchip: dsi: support request ACK from peripheral
Allow enables the acknowledge request after each packet transmission.

Change-Id: Ie8b2e49da0f2cae8bf99b4b555d42fbb640f8e37
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 11:51:48 +08:00
Wyon Bi
3ef4c2204f drm/rockchip: dsi: Bypass TLP clock lane and data lanes counter threshold
Most of TLP is contributed by the counter programming:
	TLP = ((counter_threshold + 1) x TXBYTECLKHS) + constant_time
where:
	constant_time corresponds to internal D-PHY FSM state and
	Analog Front End (AFE) timing variation

Change-Id: Icee77dee0772afbcecc5e883572061162ed0fc4f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 11:51:48 +08:00
Ziyuan Xu
472f9736a6 arm64: dts: rockchip: rk1808: change the clock resource index
The pinctrl-rockchip driver get the clock resource by of_clk_get
within the index 0 which requires the index of pclk_gpio should
be fixed to 0.

Change-Id: I619f12cb53002996d96f142c8889852be75c61e7
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-09 10:21:59 +08:00
Wyon Bi
b4a27215c5 drm/panel: simple: Add support for dcs backlight
Change-Id: Id9380a16c1db606f30032259a3bbba0884731c97
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 09:55:08 +08:00
Herman Chen
b4caa420fd arm64: rk1808_linux_defconfig: build vcodec driver
Build vcodec driver by default.

Change-Id: I4a4a084f14bf3408644f75fdaa7ecbc7846efd8f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:51:42 +08:00
Herman Chen
c48a5e5a92 arm64: dts: rockchip: rk1808-evb-v10: enable vcodec
Enable vcodec device.

Change-Id: I5edb27766088951ba6bd713c3457fe191c5bb75f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:51:28 +08:00
Herman Chen
6494f3f0b4 arm64: dts: rockchip: rename vpu to vpu_service
/dev/vpu is the old device name. New driver always use vpu_service
as default vcodec driver name.

Change-Id: I19896d92336291d0035fa4ed7b466cb64fd96d78
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:35:22 +08:00
Ziyuan Xu
50cf0c088c arm64: dts: rockchip: rk1808-evb: support adc keys
Change-Id: I602270b2fe4a32fa2ee3930eb411aef68167f9b9
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-09 09:34:45 +08:00
Elaine Zhang
fb4fc53dc8 dt-bindings: clock: rk1808-cru: fix up the ID number repetition
HCLK_ISP and HCLK_CIF ID num are all 205.

Change-Id: Ia43cf6a8cd65e43673b4ebfe63bd92a3115740ab
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 09:27:51 +08:00
Cai YiWei
c8b8e8b1e0 media: rk-isp10: rk3399 software reset instead of hardware reset
Change-Id: I9893bf237bda078b6dc16c8d504bdcdc16861cc9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-10-09 09:16:34 +08:00
Tao Huang
fc7271aeff Revert "arm64: dts: rockchip: fix reg length for cru on RK1808 SoCs"
This reverts commit 827031a1ca.

PMU_CRU offset is 0x4000

Change-Id: Ia535a255030b530949bc205414dca86ffd7ff6b6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-08 20:21:42 +08:00
Tao Huang
fd65ecb2e4 Revert "clk: rockchip: rk1808: fix PMU_CRU offset"
This reverts commit 3e9d3367b9.

PMU_CRU offset is 0x4000

Change-Id: Ibce2c7fc6b7995c128dde4809446b1b428f893aa
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-08 20:19:57 +08:00
Simon Xue
8bfddc4b60 arm64: dts: rockchip: rk1808-evb: enable saradc
Change-Id: I481c7d710c360422a2f42b2e03afe859bfad2c95
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-08 19:43:02 +08:00
Simon Xue
860d4f92e5 dt-bindings: adc: add description for rk1808 saradc
Change-Id: I047410349c527495f5b414d98054e535fc168524
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-10-08 19:32:21 +08:00
Simon Xue
0635448421 arm64: dts: rockchip: rk1808: add saradc
Change-Id: Ib3b2062ecd7190f9b33db3c6d8ffc72e7038d7f8
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-10-08 19:32:15 +08:00