Commit Graph

604648 Commits

Author SHA1 Message Date
Tao Huang
28628bb291 rockchip/vcodec: add support for rk3128
Also move set clk_sel from vpu_service_power_on to vcodec_subdev_probe.
It only need set one time.

Fixes: 1cace329a8 ("video: rockchip: vpu: use device tree to find out target SoC")
Change-Id: I41aed6296188ed2fb5eb26a2430b19dcc2916b22
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 16:43:40 +08:00
Zheng Yang
06fa21989e drm/rockchip: dw-hdmi: fix color depth check in YCBCR420 mode
If sink does't support YCBCR420 deep color, we return default
8bit.

In YCBCR420 mode, tmdsclock is half of RGB444 mode.

Change-Id: Ie3a1f8ca4bbe4b3bae5d7c9ea823fc798721a73a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:45 +08:00
Zheng Yang
c9ed636f38 drm: bridge: dw-hdmi: fix phy cpce setting in YCBCR420 mode
To support YCBCR420 10bit, we need to enable mpll output divider.
It is also compatible with YCBCR420 8bit mode.

Change-Id: I6028cfb045efd05c2cb2b9920e32901ea5aa95dc
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:33 +08:00
Zheng Yang
55c75a9da2 drm: bridge: dw-hdmi: fix GCP default phase in deep color mode
According to HDMI 1.4b specification: If the transmitted video
format has timing such that the phase of the first pixel of
every Video Data Period corresponds to pixel packing phase 0
(e.g. 10P0, 12P0, 16P0), the Source may set the Default_Phase
bit in the GCP. The Sink may use this bit to optimize its filtering
or handling of the PP field.

This means that for 10-bit mode the Htotal must be dividable by 4;
for 12-bit mode, the Htotal must be divisible by 2.

Change-Id: I02e632d095141cbabcba06dc1321ae0dc69dc736
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:23 +08:00
Zheng Yang
0df3354f3a drm/rockchip: vop: introduce vop_update_csc
After supportting atomic update flush for connector, output color
may be changed in the atomic update flush. It is need to separate
vop color configuration into a new function vop_update_csc, and
update output color both in atomic flush and vop_crtc_enable.

Change-Id: Ie530aaba846ddac0c68f114e081a12968b783476
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:14 +08:00
Zheng Yang
d2e0476319 drm: bridge: dw-hdmi: Implement connector atomic_flush
Introduce dw_hdmi_connector_atomic_flush to implement connector
atomic_flush.

Only when enc_in_encoding/enc_out_encoding/enc_in_bus_format/
enc_out_bus_format changed, dw_hdmi_setup is called.

Introduce previous_pixelclock/previous_tmdsclock/mtmdsclock to
determine whether PHY needs initialization. If phy is power off,
or mpixelclock/mtmdsclock is different to previous value, phy is
neet to be reinitialized.

Change-Id: I1984fb188ba486de18f6d51b7a51320bbf2bc27d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:39:39 +08:00
Mark Yao
8eb3838532 drm: support atomic update flush for connector
Change-Id: I101111c489b769244f9ef5e1c1ba78d31b272ae8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-16 14:39:25 +08:00
Zorro Liu
c9f2fcd388 arm64: rockchip_defconfig: add gyro mpu6500 sensor
Change-Id: Ia6351af3884b21f6d1c7a8297493d127c4270338
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-16 14:38:37 +08:00
Zorro Liu
ab372c6336 driver: input: sensor: calibration data store in vendor storage
Change-Id: I338475309e716774c0b9ef81d9cbb425088b58a2
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-16 14:38:32 +08:00
Yankun Zheng
4451e1457b ARM: dts: rockchip: rk3229-at-common.dtsi: modify pmic interrupt
pin for android things SOM

Change-Id: I035899301f1766999ff3ca74eedc545661fce968
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-11-16 14:07:45 +08:00
Tao Huang
d123dfc168 rk: rm include/linux/rockchip/cru.h
Change-Id: I2fb8ea2911598959763b9ded6c204f4743b77108
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 11:02:35 +08:00
Yang Shi
15ade53d8f UPSTREAM: arm64: disable kasan when accessing frame->fp in unwind_frame
When boot arm64 kernel with KASAN enabled, the below error is reported by
kasan:

BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr ffffffc064d57ba0
Read of size 8 by task pidof/499
page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x0()
page dumped because: kasan: bad access detected
CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
Hardware name: Freescale Layerscape 2085a RDB Board (DT)
Call trace:
[<ffffffc00008d078>] dump_backtrace+0x0/0x290
[<ffffffc00008d32c>] show_stack+0x24/0x30
[<ffffffc0006a981c>] dump_stack+0x8c/0xd8
[<ffffffc0002e4400>] kasan_report_error+0x558/0x588
[<ffffffc0002e4958>] kasan_report+0x60/0x70
[<ffffffc0002e3188>] __asan_load8+0x60/0x78
[<ffffffc00008c92c>] unwind_frame+0xec/0x260
[<ffffffc000087e60>] get_wchan+0x110/0x160
[<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
[<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
[<ffffffc0003ac840>] proc_single_show+0x88/0xd8
[<ffffffc000345be8>] seq_read+0x370/0x770
[<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
[<ffffffc00030c0ec>] vfs_read+0x94/0x168
[<ffffffc00030d458>] SyS_read+0xb8/0x128
[<ffffffc000086530>] el0_svc_naked+0x24/0x28
Memory state around the buggy address:
 ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
 ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                  ^
 ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Since the shadow byte pointed by the report is 0, so it may mean it is just hit
oob in non-current task. So, disable the instrumentation to silence these
warnings.

Change-Id: I8ec400370efa3ae63e99d459f50a319685a7b150
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit bcaf669b4b)
2017-11-16 10:32:03 +08:00
Tao Huang
e85d7dbaa0 rk: rm include/linux/rockchip/iomap.h
Change-Id: If3323fba5bfd820e526db5f863d7ba05b56672d5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 10:15:02 +08:00
Tao Huang
347ead41d8 arm64: rockchip_cros_defconfig: remove CONFIG_RK31XX_LVDS
Change-Id: I8dae3b7ed056c203c1f21ff6a1517625f6f44dd9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 10:15:02 +08:00
Tao Huang
d853b87248 ASoC: rk312x_codec: remove references to RK_GRF_VIRT
Change-Id: I43f8ae6beee64a0feaa8a43a1cc3d0ef9e8d0635
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 10:01:41 +08:00
Jianqun Xu
835c1e8cbb ARM: dts: rockchip: rk312x-android: add ion node
Support cma use reserved memory region.

Change-Id: I4675a30ab3b4440245bab32c3d0ee20d615eda5d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-16 09:59:42 +08:00
Jianqun Xu
a23fb9ee19 staging: ion: rockchip: reserve memory region for ion
Support to reserve memory region for ion device.

Change-Id: Ib951abd2f24560a204de94f3d51b79c7c1ad75da
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-16 09:54:31 +08:00
Xinhuang Li
f99830dc70 video: rockchip: iep: increase the compatibility of rk3126c
Change-Id: I4a2def80d91d43cafc056ec1a6a64bca8ab372c4
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-16 09:52:03 +08:00
Xinhuang Li
a32eab7ce7 ARM: dts: rockchip: rk3126c-bnd-d708: enabled iep iep_mmu
Change-Id: Iee4c3c5d108f514ca6c0e371d3427d78c4a785cd
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-16 09:48:53 +08:00
Zorro Liu
2b5d85d7b2 driver: input: sensor: fix unbalanced enable for some sensor irq
[   31.190438] Unbalanced enable for IRQ 163
[   31.190481] ------------[ cut here ]------------
[   31.190495] WARNING: at kernel/irq/manage.c:513
[   31.190505] Modules linked in: bcmdhd
[   31.190525]
[   31.190544] CPU: 1 PID: 270 Comm: sensors@1.0-ser Not tainted 4.4.93 #175
[   31.190561] Hardware name: Rockchip rk3368 xkp board (DT)
[   31.190575] task: ffffffc076ac2700 task.stack: ffffffc076b28000
[   31.190601] PC is at __enable_irq+0x34/0x74
[   31.190614] LR is at __enable_irq+0x34/0x74
...
[   31.198173] [<ffffff80080f5d84>] __enable_irq+0x34/0x74
[   31.198188] [<ffffff80080f5e30>] enable_irq+0x6c/0x94
[   31.198207] [<ffffff800868e11c>] sensor_enable+0x78/0x13c
[   31.198222] [<ffffff800868e8a8>] light_dev_ioctl+0x1a4/0x1d4
[   31.198240] [<ffffff80081c71d4>] do_vfs_ioctl+0x5e4/0x720
[   31.198254] [<ffffff80081c7370>] SyS_ioctl+0x60/0x88
[   31.198270] [<ffffff8008082930>] el0_svc_naked+0x24/0x28

Change-Id: Ieba4a76910fde7381ea4b8113cca20fa068fabbd
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-16 09:43:05 +08:00
Zhou weixin
024b72d737 mfd: rk808: set buck4 output ripple voltage 3%
Change-Id: I6db5db62edb0a8e1e543f8ff6c021b6dbca475b2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-11-16 09:37:09 +08:00
Peng Zhou
00b6248f20 rockchip: vip: remove unused head-file
Add deinit gpiod for camera sensor when probe failed.
The video_device->ctrl_handler = NULL in soc_camera, in order to
VIDIOC_CTRL call v4l2_ioctl_ops.

Change-Id: Idf2d8bf2c8d56ec921084dcd74220ed3c5541427
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-11-15 20:37:10 +08:00
Chris Zhong
12e3fb626f ARM: dts: rk3066a-rayeager: bring up wifi
Change-Id: Iffcf4970fdd5bf1976860a9be695452a748bdc2a
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2017-11-15 20:04:22 +08:00
Sandy Huang
467dd9f466 drm/rockchip: vop: add HDR for rk3328
Change-Id: Id5f7e627c3a7ec00d5b7a413b0d1d4e8f64e53e0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-15 19:38:15 +08:00
Sandy Huang
2b2d5620b4 drm/rockchip: vop: add BCSH support for rk3328
Change-Id: I04652f46c1613d54745934c277d24958081d08d6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-15 19:37:45 +08:00
Caesar Wang
0434d83d5c ARM: dts: rockchip: fixed the 1GHz cpu frequency for rk3036-kylin
As the cpu frequency is less than 816MHz, the HDMI display maybe
probably cause a flower screen as below log[0]. And Kylin used the rk3036g
series SoCs that the max cpu frequency supported the 1GHz, not 1.2GHz.

In a word, keep the cpu frequency to 1GHz for kylin board.

log[0]:
[26.498843] rk_iommu 10118300.iommu: Enable stall request timed out,
status: 0x000011
[26.528809] rk_iommu 10118300.iommu: Disable paging request timed out,
status: 0x000011
[26.598849] rk_iommu 10118300.iommu: Enable stall request timed out,
status: 0x000011
[26.607579] rockchip-vop 10118000.vop: Failed to attach iommu device
[26.614916] rockchip-vop 10118000.vop: failed to attach dma mapping, -110
..

Change-Id: I8e1d4527b649d8857a9d80a121c10935a4cd1030
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-15 19:19:35 +08:00
Caesar Wang
aa2cbb707e net: wireless: rockchip_wlan: avoid the unused the print
As the ap6212 used on kylin board, the kylin always got the error log
when we connected the AP. Says:
..
[   70.169440] CFG80211-ERROR) wl_cfg80211_get_station :
    wl_cfg80211_get_station: if_counters not supported ret=-23
[   70.184371] CFG80211-ERROR) wl_cfg80211_get_station :
    wl_cfg80211_get_station: if_counters not supported ret=-23
..

And the normal status, the ap6212 wifi always print the ssid and channel
message for output. Says:
..
[  125.172243] wl_run_escan: LEGACY_SCAN sync ID: 4, bssidx: 0
[  178.181897] wl_run_escan: LEGACY_SCAN sync ID: 5, bssidx: 0
[  241.192452] wl_run_escan: LEGACY_SCAN sync ID: 6, bssidx: 0
..

The AP6212 don't need these logs for default status.

Change-Id: I43455bcc277e380daf15ee91a1436cdc81a95039
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-15 19:16:21 +08:00
Randy Li
83103fa74e rockchip: video: vpu: disable auto clock boost
Some platform doesn't support that, disable this feature at
the probing time.

Change-Id: I80618ea52a6796f932ce5748288c4fa61bef51ea
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-11-15 19:13:51 +08:00
Tao Huang
08c0b9e1e1 soc: rockchip: cpuinfo: init rockchip_soc_id for rk3288/rk312x
Change-Id: Ida9342d2c64e586e41aceaec991887115b3db80c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-15 18:45:00 +08:00
Binyuan Lan
5815eebd8e ARM: dts: rockchip: rk3126-bnd-d708: add codec
Change-Id: I8f5d73c6241de5e92e0efe641c4c2d2308555029
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-15 15:51:13 +08:00
Binyuan Lan
37b11e436a ARM: dts: rockchip: add codec for rk312x
Change-Id: I0b521865f195d231c17f05790a5a467623aff033
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-15 15:50:51 +08:00
Binyuan Lan
eb8bafd40b ARM: rockchip_defconfig: enable CONFIG_SND_SOC_RK312X
Change-Id: I30f11d269f4ce25a12e597455418573899a45756
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-15 15:50:03 +08:00
Binyuan Lan
7eaf6ded21 ASoC: rockchip: add support for rk312x codec
Change-Id: Idb73b8999ed0fdc790e144ec18ad9a03b431311a
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2017-11-15 15:49:46 +08:00
Tao Huang
df8f6bcc81 pstore/console: ignore log level
When printk to pstore console, we ignore log level. So
/sys/fs/pstore/console-ramoops-0 should keep full kernel log.

Change-Id: I87ea3418741c117523a9e872ae7ace4dac0cd9d3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-15 14:48:58 +08:00
Alex Zhao
5eb1607259 ARM64: dts: rockchip: px5: add rtl8723ds bt support
Change-Id: I81c612610a5a5310d5149489045a77180d4ea5ca
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-14 19:25:57 +08:00
Alex Zhao
07e3824bd6 net: wireless: rockchip_wlan: update rtl8723cs
update rtl8723cs wifi driver to version v5.2.1.7_25082.20171108_COEX20170626-1a00

Change-Id: Ibe11dcb9b3592dfd7f554c20814b3233da87ff24
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-14 19:25:34 +08:00
Alex Zhao
c56fa46c21 net: wireless: rockchip_wlan: update rtl8723ds
update rtl8723ds wifi driver to version v5.2.15.1_25011.20171107_COEX20171025-2020

Change-Id: Ifbf94c2ebc7c7d8e529910d77f6094d0ae4f7907
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-14 19:25:24 +08:00
Peng Zhou
5ea7a94a66 arm64: dts: rockchip: rk3368-android: move cif from dtsi to dts
Move cif from rk3368-android.dtsi to rk3368-px5-evb-android.dts.
Redefine pinctrl for isp in rk3368-px5-evb-android.dts.

Change-Id: Ie8cd56cef507482b7d5e974a02f79279f0984aed
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-11-14 15:33:34 +08:00
Zorro Liu
3702779897 ARM64: dts: rockchip: update sensor config for rk3368-p9 board
Change-Id: I1dd416b6737f4c197c732b11f6d209f9b33871e0
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:32:25 +08:00
Zorro Liu
7f1ae55f96 driver: input: sensor: gyro: add new and to pass vts
1.add mpu6500 gyro driver
2.mpu6500 and mpu6880 to pass vts

Change-Id: I7a18578847e92c2cacd8d9b545455840b3a7b318
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:54 +08:00
Zorro Liu
49c623158c driver: input: sensor: update mpu6500 and mpu6880 accel driver
rate is not correct in interrupt mode, so just return and we
always use poll mode

Change-Id: I494600852907a8fff6599305195f5b4ccdb0bf7c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:24 +08:00
Zorro Liu
42d5ef26c7 driver: sensor: add gyro sensor calibration function
Change-Id: Ic1e638631541f84d51c5e2c5bb3813e5a45a3fbe
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-14 15:31:13 +08:00
Peng Zhou
465219ff46 arm: dts: rk3126-bnd-d708.dts: add cif and sensor
Add new file for rk3126-m708-cif-sensor.dtsi

Change-Id: I882084dc84afbc43398fb6eb41eb09a712b645bf
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-11-14 11:35:22 +08:00
Takashi Iwai
d67947186e UPSTREAM: ALSA: timer: Call notifier in the same spinlock
snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock.  This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock.

The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.

Bug: 37240993
Change-Id: Ib90099f88c8b04928a8cdd2808cd9e16da6d519c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Siqi Lin <siqilin@google.com>
2017-11-14 09:59:54 +08:00
Tao Huang
384b95a76a rockchip/cru.h: rm rk3288_cru_set_soft_reset
Change-Id: I6b52488e8b6b153bf9c6e5ca275b3157cb082e35
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-13 19:55:15 +08:00
Tao Huang
ae9a5f91a2 rockchip/vcodec: remove references to RK_GRF_VIRT
Change-Id: If16be2cfadad9b06af7f249522456de96ca237e9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-13 19:55:15 +08:00
Caesar Wang
bfdc2b5ffd ARM: dts: rk3036: enable watchdog on kylin board
Change-Id: I50e2323742695671dcc99232aedd35618961a42f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-13 19:27:32 +08:00
Caesar Wang
cd4bc097fe ARM: dts: rk3036: support the watchdog
Change-Id: I2630993b1b9c5f6d3c4e3405303bfb3ebac07e8b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-13 19:27:18 +08:00
Langlang Wang
f53a50d221 arm: rockchip_defconfig: add gsensor mc3230 for 3126c_bnd
Change-Id: I95f82d0d7437cd5a81b8ffd8ec96bf66d7cf1335
Signed-off-by: Langlang Wang <langlang.wang@rock-chips.com>
2017-11-13 19:26:53 +08:00
Wu Liangqing
2c8423fff7 ARM: dts: rockchip: rk3126c-bnd: add panel power contrl
Change-Id: I80d177fe2ab660ef4c3e43832937cbf936ea98c4
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: Bi Weiyong <bivvy.bi@rock-chips.com>
2017-11-13 19:14:25 +08:00