Commit Graph

844124 Commits

Author SHA1 Message Date
Biswajit Paul
9c23eefd23 ANDROID: kernel: Restrict permissions of /proc/iomem.
The permissions of /proc/iomem currently are -r--r--r--. Everyone can
see its content. As iomem contains information about the physical memory
content of the device, restrict the information only to root.

Change-Id: If0be35c3fac5274151bea87b738a48e6ec0ae891
CRs-Fixed: 786116
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
Signed-off-by: Avijit Kanti Das <avijitnsec@codeaurora.org>
(cherry picked from https://android.googlesource.com/kernel/msm
 commit 3b1ac3a37ce5e6c31c82ca85604705575cb570d6)
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-26 20:00:46 +08:00
Tao Huang
bd67d49f2b mfd: rk808: avoid NULL pointer dereferencing when shutdown
rk808->pins maybe NULL.

Fixes: cfe40315e8 ("pinctrl: support pinctrl driver for the RK817&RK809 PMIC")
Change-Id: Ia2c25f2717498c06d0707f17d27b0a85ee23f229
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-26 20:00:21 +08:00
Tao Huang
8ace8303d0 ipv6: ip6_output: fix for Android 7.1 CTS
After commit 23287661af ("ipv6: Inhibit IPv4-mapped src address on the wire.")
Android failed to pass DatagramSocketTest#test_getRemoteSocketAddress:
fail: java.net.ConnectException: Address family not supported by protocol

Android side has patch "Fix DatagramSocketTest#test_getRemoteSocketAddress".
Unfortunately, which may not merge to Android 7.1 branch, so we have to fixes
it on kernel side.

Change-Id: I7444c7636f02485abf6ddd4d7b9cad1f4e6d06e1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-26 18:54:17 +08:00
Shengfei Xu
e9684a4a18 arm64: configs: rockchip_defconfig: enable CONFIG_INPUT_RK805_PWRKEY
Change-Id: Ieec6f382f644ebc6da1c01eaea7b003b2d5b0ec8
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-09-26 17:48:51 +08:00
Shengfei Xu
8c7cc3c1e8 mfd: rk808: replace power key driver for rk809/rk816/rk817
remove the rk8xx-pwrkey.c file, it's function is same as rk805-pwerkey.c.

Change-Id: Ie8a0559c3a105ec9806f170d0c4d32c2691558c6
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-09-26 17:41:05 +08:00
Liang Chen
1a5744c324 arm64: dts: rockchip: rk3399: add power-domains for iep_mmu node
It will cause kernel halt if power-domains is not set in iep_mmu node.

Change-Id: I8752a6b777f579dfc214c5034005387d5f759aad
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-09-26 15:11:58 +08:00
Alex Zhao
2929d06045 net: rkwifi: initialize code to support rkwifi
Change-Id: Ia0724ebc628ba40afed947275d34ff5c47a410b4
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-09-25 15:46:49 +08:00
Sandy Huang
457d73d7b8 drm/rockchip: driver: fix compile error when disable vop
drivers/gpu/drm/panel/panel-simple.c:385: undefined reference to
`rockchip_drm_crtc_send_mcu_cmd'

Change-Id: I95f182dca7abcb1e8d8a3fc3bb6fd20db5f2db65
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-09-25 15:37:53 +08:00
Tao Huang
6d25a993d3 clk: Add COMMON_CLK_DEBUGFS
Make clk debugfs interface selectable.
Save about 15ms of boot time on RK1808 EVB if unselected.

Change-Id: Ie0095164d31f85491da755284f3a347dfb24cfdc
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 16:01:42 +08:00
Tao Huang
d2014f8b68 mm: slub: Add SLUB_SYSFS
Make slub sysfs interface selectable.
Save about 4.8ms of boot time on RK1808 EVB if unselected.

Change-Id: I2587cc259c3c31a209604d99640d8e84a4ba78f4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 16:01:42 +08:00
Shunhua Lan
40094f11cb mfd: rk808: add rk817-codec cell
Change-Id: Ieea7bbeb01b5230e40285819e29f9be6e39cf8ec
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-09-24 15:21:17 +08:00
Shunhua Lan
836e41ae0d ASoC: rockchip: add support for rk817 codec
Change-Id: If8c5ce04703b94f7eb91e61efeab6bf7dcfca7ff
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-09-24 15:21:02 +08:00
Tao Huang
7a47fdb142 Input: gt1x - enable asynchronous probing
It takes a bit of time to go through controller power up sequence and
initialization. To not stall the overall boot progress let's probe the
controller asynchronously, given that userspace is usually prepared for
hot-plugging of input devices and thus does not rely on particular
ordering.

Save about 0.35s on RK1808 EVB.

Change-Id: I5f38ae7dd9cbebeff02a5e522f29e131d21473ba
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 14:47:13 +08:00
Liang Chen
469b43ee1f fiq_debugger: fix bug when define CONFIG_THREAD_INFO_IN_TASK
when define CONFIG_THREAD_INFO_IN_TASK, thread_info is in the task_struct,
and current_tread_info() is always point to the right current thread info
in irq/fiq mode, so do not change *current_tread_info().

Change-Id: Ic6476efc5f13cedb26405fd56646ee7c939dff45
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-09-24 14:42:06 +08:00
Tao Huang
9adb8639f1 mmc: core: mmc_delay 1ms in mmc_send_op_cond
For fast boot time.

Change-Id: Ia9eb483a2112bb582c3df4ba9f346d22930a8500
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 14:28:06 +08:00
Tao Huang
d5f6a40bd0 cpufreq: fix compile error if !CONFIG_CPU_FREQ
drivers/soc/rockchip/rockchip_system_monitor.c: In function 'rockchip_monitor_cpu_low_temp_adjust':
drivers/soc/rockchip/rockchip_system_monitor.c:684:3: error: implicit declaration of function 'cpufreq_update_policy'; [-Werror=implicit-function-declaration]

Change-Id: I0d47bdb848d22bd1e9d528a76ac0cfcf8fb62f2f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 14:21:10 +08:00
San Mehat
eccf203ed1 mmc: Add new API call 'sdio_reset_comm' for resetting communication with an SDIO device
Change-Id: I955f6c753235ae65014d6ea34c9e660e92277971
Signed-off-by: San Mehat <san@android.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 10:59:18 +08:00
Tao Huang
b7928dccbf mmc: core: export primary_sdio_host and mmc_host_rescan
Fixes: de208e40d9 ("mmc: porting legacy tactices into 4.19")
Change-Id: Ifb0118c755aa4284f59a7e281fa323cbe9d5ca3b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-24 10:59:18 +08:00
Liang Chen
f0b246aa52 arm64: dts: rockchip: rk3328: adjust opp-table for dmc
Change-Id: I2d65e2f03519e3a98d9f9e0fe0bc10ae601237cf
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-09-23 14:24:13 +08:00
Tao Huang
52837b4ed6 drm/rockchip: Remove depends on ROCKCHIP_IOMMU
Some CPUs without IOMMU but have VOP.

Change-Id: Ic11d1438851eb4773bc94e74879a2329964d012a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-23 14:22:30 +08:00
Wyon Bi
63b5a8b7e1 drm/dsi: Fix compilation when CONFIG_DRM_MIPI_DSI=n
drivers/gpu/drm/panel/panel-simple.o: In function `panel_simple_xfer_cmd_seq':
drivers/gpu/drm/panel/panel-simple.c:349: undefined reference to `mipi_dsi_device_transfer'
drivers/gpu/drm/panel/panel-simple.c:349:(.text+0xacc): relocation
truncated to fit: R_AARCH64_CALL26 against undefined symbol `mipi_dsi_device_transfer'

Fixes: 0f36136db1 ("drm/dsi: Export mipi_dsi_device_transfer()")
Change-Id: I34c6e4f732aa9c3fba5ef6d9ded012c53c8d107b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-09-23 14:05:51 +08:00
Jon Lin
06a228c889 soc: rockchip: including linux/fs.h
Change-Id: I3f74625e169982ce6e198fdf864a1547ff2b4a07
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-09-17 13:21:07 +08:00
Jon Lin
bb7fe4f322 drivers: rkflash: including seq_file.h
Change-Id: I20c74547873a44853c3b928267e512819c5fe7c3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-09-17 13:20:11 +08:00
Bian Jin chen
875d17e3ff arm64: configs: rockchip_defconfig: enable CONFIG_ION_SYSTEM_HEAP
Android 10 requires ion to allocate buffers for audio playback,
enable system heap by default to support it.

Change-Id: Id13e42254c7cfc2d07a33840d0dc4429e6fe7065
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-09-16 11:47:34 +08:00
Bian Jin chen
6f99d8c16b arm64: dts: rockchip: Add new dts file for rk3326-863-lp3-v10 rkisp1.
Add this dts to support camera hal3 and be compatible with android 10.

Change-Id: I4594f7e3eb7407a26cbd7dc119653236c622b22d
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-09-14 14:19:41 +08:00
Bian Jin chen
4784cbfe9a arm64: dts: rockchip: px30: Add an alias for reboot-mode.
Change-Id: Ib7cd022790fcc381899be97bcecb6c21a3d76157
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-09-10 17:08:24 +08:00
Tao Huang
3922f84286 soc: rockchip: All Rockchip CPU default n
For small system.

Change-Id: Ib76fdf45a090b80f2e85c0ca2df611cc86308ec8
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 15:35:21 +08:00
Simon Xue
e3fb92c722 iommu/rockchip: make compatible to extra sclk
Change-Id: Ia9821eb74effd0b61a42c5cb19ca12f9cf036b78
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-09-10 10:03:34 +08:00
Wang Panzhenzhuan
51556b4a24 media: i2c: gc0312 gc2145: synchronize with kernel4.4 and update to v01.01.01
Change-Id: I93a367cfb4e6376847748c693cc834996a599f9e
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-10 09:59:56 +08:00
Wang Panzhenzhuan
9d4d900830 media: i2c: gc2145/gc0312: fix compile error on kernel-4.19
Change-Id: Ib9c4b6b078289d7ef884a8b0fc4ebe6526bd109f
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-10 09:59:56 +08:00
Tao Huang
8eaa58d9a7 video: Add rockchip video drivers
Change-Id: Ice3ea34c4ea3862c29f5e9b561d19a390f2965c7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:27:26 +08:00
Grey Li
4d9cbff2d4 video: rockchip: iep: porting for kernel-4.19
Add compile condition of ION and DRM.
Adapt struct kref.
Modify drm's iommu domain get method.
Delete drm's common_iommu_setup_dma_ops.
Delete code about ion.

Change-Id: I340e1798c5930af0a82566f8c40ec93e78084fda
Signed-off-by: Grey Li <grey.li@rock-chips.com>
2019-09-10 09:26:30 +08:00
Tao Huang
7c81bf0ea3 video: rockchip: remove unused dp driver
Change-Id: I1976e8cfda813e82d31ffad062746d44b554d914
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
91908215ac video: rockchip: remove unused tve driver
Change-Id: I97f6910e5fb4c093e117f1357fd616a8b6a0ea79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
567278c61b video: rockchip: remove unused hdmi driver
Change-Id: I02744c042c5c29b79c98b5da17acf0da889a005e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
c620d25edd video: rockchip: remove unused transmitter driver
Change-Id: I01c7291b55c9183902ecb55c6b0b2e79d2aa3097
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
d96d147740 video: rockchip: remove unused fb driver
Change-Id: I13be9d40d44c2c3ed0bb9abf186410bf39636ec6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Shunqian Zheng
bbabed05f0 media: rockchip: rkisp1: keep active_sensor available when stream off
Currently, it's set active_sensor to NULL when stream off. But it
could be useful for ioctls (e.g. enum_frameintervals) to obtain
active sensor's infomations.

This patchs keep active_sensor always available and renew it
every time before starting stream in case media topology changed.
Meanwhile, get active_sensor info once async subdevice registered
completely.

Change-Id: I21eb3954d5932a4bc7c899d8f110e31b409c91d2
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Shunqian Zheng
d63f037b70 media: rockchip: rkisp1: restrict video output resolution
Currently the maximum size of video is 4416x3312. For those sensors(5M
or 8M), it's not a good idea to scale up to max resolution by ISP.

This avoid video output resolution exceeding the isp sub-device
size.

Change-Id: I4b2649cf3a8c3c7e81ff978eefba3e69e2c24d81
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Cai YiWei
7edacbdede media: rockchip: isp1: support get continuous memory from specific CMA region
If no IOMMU support for ISP, we prefer to alloc continuous
physical memory from our reserved CMA region than from system
reserved.

Change-Id: I1e598ee7309c9c53254649f5267a1e7f515c6361
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Cai YiWei
0cbd040137 media: rockchip: isp1: fix clk gate but isp working
power on->isp start->restart...->power off
isp reset will set clk config to default value, if
isp restart clk isn't to reconfigure.

Change-Id: I2b5ef9883c8ca5e9e142270d935f300395b0ea74
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
a8eb21def5 media: rockchip: isp1: add start/stop event for params video
This patch adds two v4l2 events, start/stop streaming, for
userspace to subscribe. With these events, userspace could
init/de-init 3A tuning in proper time.

Only if isp sub-device input format is Raw Bayer and output
format is YUV, the 3A tuning is required.

Change-Id: I027d603fcf6d6901ebcd3762d0889ef8f7603601
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Shunqian Zheng
c5dac11b8b media: rkisp1: enable userptr io mode
Enable VB2_USERPTR mode. vb2_dma_contig takes care
the rest of details except the vb2_plane_vaddr().

Change-Id: Id23e0c9ef7b3332fcb3be57c71c4178e181d7141
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
273b21ef08 media: rockchip: isp1: fix receive mipi isr before isp clock resume
The mipi interrupt is auto on in resume operation,
so we may receive interrupt before isp clock resume,
and the kernel will be dead when access isp register in mipi isr function.

Change-Id: I73779111cb103457b0a4f125d8e4c9420a2d8553
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
75591b28bd media: rockchip: isp1: change version to v0.1.5
Change-Id: I949db02da473e6f7b1824d2afda36b9f7b60a539
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
e1cd99a637 media: rockchip: isp1: fix rkisp1 subdev type is error
Change-Id: I466f6f3493b353e151802a60f87726ba34c789d4
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
9312ddd708 media: rockchip: isp1: remove unnessary register setting
Change-Id: I75ccc5b50a7f50e98264c3618e5f9c6b2cb87d52
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Algea Cao
6619930935 drm: rockchip: dw-hdmi: Add clk hclk_vio
Change-Id: If117c63f97c2af0811d29f322188ddc24470eadb
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 10:10:35 +08:00
xuhuicong
598534ea8c drm: bridge: dw-hdmi: add debugfs_remove_recursive when unbind
On RK3328, dw-hdmi driver is reloaded after bind and unbind
then it will use the first register debugfs address if no run
debugfs_remove_recursive, and cause system crash.

Change-Id: Iafa6b4059962b62c79157a9cf6c3e1d56df48f03
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2019-09-09 09:43:35 +08:00
algea.cao
f51d77a8b5 drm: bridge: dw-hdmi: fixup kernel crash when reboot with hdmi connected
when other devices bind failed,drm will unbind and re-bind all devices.
if don't cancel the delayed work but flush and destroy workqueue directly,
kernel point is likely to become NULL.

Change-Id: Ib48704186ee298cbd4daac1cdbbac5fb3906b6bb
Signed-off-by: algea.cao <algea.cao@rock-chips.com>
2019-09-09 09:43:35 +08:00