Commit Graph

865264 Commits

Author SHA1 Message Date
Jianqun Xu
47e86f6791 arm64: mm: export __flush_dcache_all
Change-Id: I268a515f98361a4fd152d399262307aadb058344
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-06 09:42:01 +08:00
Jianqun Xu
4370fdf1a4 staging: ion: do sync once for DMA TYPE HEAP
Change-Id: If1d3d778b43fe59f771e9bdc994f9e1740de564b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-06 09:42:01 +08:00
Jianqun Xu
bfce6910d4 staging: ion: bypass for start cpu access if dir is DMA_TO_DEVICE
From the final function
ENTRY(__dma_unmap_area)
	cmp	w2, #DMA_TO_DEVICE
	b.ne	__dma_inv_area
	ret
ENDPIPROC(__dma_unmap_area)

if the direction isn't DMA_TO_DEVICE, it will do __dma_inv_area. So
directly return if the dir is DMA_TO_DEVICE.

Change-Id: I9ec2affddb8efb431a165100d78afca7fe6b2a45
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-06 09:42:01 +08:00
Jianqun Xu
ea0a51bb9d dma-buf: buffer should align to cacheline size
Fixes: 0f4763b1c6 ("dma-buf: add DMA_BUF_IOCTL_SYNC_PARTIAL support")
Change-Id: Iff8b633cb89337bba3f7693a28657034a6aa2223
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-06 09:42:01 +08:00
Finley Xiao
e497827ad3 arm64: dts: rockchip: rk3568: Modify sustainable-power
The cpufreq cooling doesn't support calculating static power in 5.10
and the cpu and gpu opp table are changed.

Change-Id: Ia1abaf6d7614b874081159db7cc41e910bf47462
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-05 18:32:32 +08:00
Finley Xiao
8593cc2d8d soc: rockchip: ipa: Fix getting error power model node
The power model node must be the child node of the device node.

Change-Id: Ib16e37c31e573f183ea304b072d2a7912e155197
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-05 18:32:01 +08:00
Wang Panzhenzhuan
cbb6b0b79d media: platform: cif: fix multi dev issue
if rkcif_dvp & rkcif_mipi_all registered,
close rkcif_dvp streams alone can't reset rkcif,
only rkcif_dvp & mipi dev all close can do reset.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I103ca247a0866629d351699f752293af028d29d5
2021-08-05 16:42:25 +08:00
Yu Qiaowei
8cf5c599ca video/rockchip: rga2: Fix rga2_dma_flush_page warnning
"uninitialized symbol 'paddr'."

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ia97afed916b5121a2d0bd20413ed31f1d6702217
2021-08-05 09:29:00 +08:00
Huang zhibao
ef484cbba2 arm64: dts: rockchip: rk3568-nvr: enabled rknpu_mmu
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I2e28ca3322822cedceaa629baa7a407c5f99dd8c
2021-08-04 19:39:08 +08:00
Lei Chen
400987462f drm/rockchip: analogix_dp: clear the eDP flag in output_if
To dynamically configure eDP to different VP ports, clear flags.

Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I68a9eb32f860e791e68d73fa2c083d0ce5bafb8d
2021-08-04 19:38:28 +08:00
Algea Cao
ffbc5b745c drm/rockchip: dw_hdmi: Add property to show whether sink is DVI
Add property output_type_capacity:
enums: DVI=0 HDMI=1

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iad09b386b55c52e21b01f98e81fadfd5aa1a42d3
2021-08-04 19:36:34 +08:00
Algea Cao
b4644bfc5a drm/rockchip: dw_hdmi: Add property to switch HDMI/DVI mode
Add property output_hdmi_dvi:
enums: auto=0 force_hdmi=1 force_dvi=2

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic048fb5c004f332b60bbbeca857de4abe9c0ca08
2021-08-04 19:36:34 +08:00
Algea Cao
bab03f605f drm/rockchip: dw_hdmi: Support set quant range take effect immediately
When set property hdmi_quant_range, quant range was changed immediately.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib8c14404cc3dde645012399b6155d047b4e9609a
2021-08-04 19:36:34 +08:00
Algea Cao
474fc0a025 drm/bridge: dw-hdmi: Make sure to output full range RGB in DVI mode
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I0858fe28139ead5fba6fc797cb6f3bec00f333fa
2021-08-04 19:36:34 +08:00
Steven Liu
67dd166442 serial: 8250_port: fix UART DL check when setting divisor.
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I907480ec39c6603bca7bb30e5f889bac3e57057c
2021-08-04 15:49:36 +08:00
Yu Qiaowei
b35dcbe150 video/rockchip: rga2: Remove the useless code about the src1 channel
1. Remove the useless code about the coordinate after rotation in
   the src1 channel.
2. Remove 4 alignment of the src1 channel.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib780c0143a76e4bfc50c0be95e483c503525ab9f
2021-08-04 15:45:16 +08:00
Yiqing Zeng
fa0b8533c1 media: i2c: ov7251 support 640x480@120fps mode
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ic00cfd746ebc91458452ce91c9ae16c078a9db5b
2021-08-04 11:06:46 +08:00
Yiqing Zeng
5eb4e05072 media: i2c: support os08a20 sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I54ad0fdf782832fe410e42063b569ba15aa40109
2021-08-04 11:02:53 +08:00
Yiqing Zeng
a7a66fc7a7 media: i2c: support sc5239 sensor driver
support linear/hdr 2560*1920@15fps mode

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I5ba1c881d009ee2348fe7e982e5fc531d2cbbb31
2021-08-04 11:01:58 +08:00
Wang Panzhenzhuan
3491315711 media: i2c: gc032a: set default stream off state
Set sensor in stream off state by default,
to avoid sending abnormal data in the early stage.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iaae2fd3be95a5fcac05ebaf39a68614b7b807d4a
2021-08-04 11:00:15 +08:00
Cai YiWei
eb37718088 media: rockchip: ispp: reset at frame end
Change-Id: I83d1bd9c4464fc138bf87f349e3f464b74eefd38
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-04 09:29:57 +08:00
Cai YiWei
20e9c1ac54 media: rockchip: ispp: frame buffer done early
config wait-line to ispp virtual device dts node,
or ispp debug node before open ispp video.
/sys/module/video_rkispp/parameters/wait_line

for example: output is 2688x1520, config
wait-line to 768 (128 align), vb2 buffer
will done when poll image processing greater
than 768, wait-line less than (height - 128) is valid.

Change-Id: I4a448cc6baffbb5794eef91965e4b2bc349aa5ed
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-04 09:29:57 +08:00
Cai YiWei
f28667e0c5 media: rockchip: isp: frame buffer done early
config wait-line to isp virtual device dts node,
or echo value to debug node before open isp video.
/sys/module/video_rkisp/parameters/wait_line

Change-Id: I5c73c90117455663620b4c025e78aa6233ca40b9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-04 09:29:48 +08:00
Sandy Huang
d8ab4596ea drm/rockchip: vop2: output error info when cluster use non afbc format
This is special feature at rk356x, the cluster layer only can support
afbc format and can't support linear format;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic8efc26c07a088c246969622fcf2973b00abd9c2
2021-08-03 19:53:23 +08:00
Wang Panzhenzhuan
307d8b27ba media: i2c: gc2375h: fix vblank set issue
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Idf54706a751766fd4a0221eb42a7035989c45c34
2021-08-03 15:45:08 +08:00
Dongbo Yang
8c60d24539 misc: add driver for rk803.
Signed-off-by: Dongbo Yang <db.yang@rock-chips.com>
Change-Id: Ieba56551c48ed42f7f24c631b117d40a6e14a8f4
2021-08-02 11:27:37 +08:00
Dongbo Yang
ea77184511 media: i2c: add strobe control & fix expsoure for ov9281.
Signed-off-by: Dongbo Yang <db.yang@rock-chips.com>
Change-Id: I12ba55000c1814b4aeedc414b9ce7f6ddfb8ed19
2021-07-30 20:26:05 +08:00
Dongbo Yang
25db7b2bb4 media: i2c: modify ov9281 driver for thunderboot.
Signed-off-by: Dongbo Yang <db.yang@rock-chips.com>
Change-Id: I17defb2b02913de0a1e70479068cec244b554593
2021-07-30 20:25:58 +08:00
Jianqun Xu
6863a5d24a staging: android: ion: fix partial sync for iommu
Fixes: 975372e2cb ("staging: android: ion: support partial cpu access")
Change-Id: Iabf3b04dbc838ca5c60fa1a0592bbb5aac496090
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-30 19:36:26 +08:00
Ziyuan Xu
d206db3376 ARM: configs: disable tb_isp as default for rv1126-tb
THUNDER_BOOT_ISP is used for snapshot first frame in risc-v, it's
useless for most of products.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Id64c514f9d21671dfae43b7eff927cae861ce733
2021-07-30 16:15:10 +08:00
Jon Lin
02cb79c93b drivers: rk_flash: set dma mask to 32bits
The nandc's DMA only supports 32bits. When the DDR capacity exceeds 4GB,
It need to configure DMA mask to 32bits and use API dma_map_single to
get the physical address.

Change-Id: I1510f7bbe2779ea20ff83a93e3a4dabb941263e3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-07-30 16:06:00 +08:00
Simon Xue
912b48e870 PCI: rockchip: fix subsys_irq_handler logic
Clear irq status first then handle the udma interrupt.

Change-Id: I3638524b7bd09ad21a431bfebd3ba0b5bfbe7b8e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-07-29 19:25:01 +08:00
William Wu
9697ead7cc arm64: dts: rockchip: rk3568: disable receiver detection in P3 for usb
RK3568 USB DWC3 controllers require to disable receiver detection
in P3 for correct detection of USB devices. And this quirk to set
the GUSB3PIPECTL.DISRXDETINP3, then the DWC3 core will change the
PHY power state to P2 and then perform receiver detection. After
receiver detection, the DWC3 core will change the PHY power state
to P3 state.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iaad3f7ce2c4dee1788539781e3bcfbb39458f5d6
2021-07-29 12:15:31 +08:00
William Wu
7b641cbfff usb: gadget: uvc: fix NULL pointer dereference when usb hotplug
When do uvc hotplug test on RV1126 EVB, it may crash in the
uvc_v4l2_streamon() with the following error log. Because
it tries to enable the video stream after usb disconnect.

[ 1748.947755] configfs-gadget gadget: uvc_function_disable
[ 1748.947947] android_work: sent uevent USB_STATE=DISCONNECTED
[ 1748.955347] Unable to handle kernel NULL pointer dereference at virtual address 00000003
[ 1748.956158] pgd = ef2a7e72
[ 1748.956550] [00000003] *pgd=6dde7835
[ 1748.956893] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 1748.957381] Modules linked in: galcore(O) bcmdhd
[ 1748.957819] CPU: 3 PID: 2706 Comm: uvc_gadget_pthr Tainted: G        W  O      4.19.111 #9
[ 1748.958567] Hardware name: Generic DT based system
[ 1748.959218] PC is at uvcg_video_enable+0xb8/0x228
[ 1748.959775] LR is at vb2_core_streamon+0x11c/0x15c
......
[ 1749.041063] [<b056a2cc>] (uvcg_video_enable) from [<b0569968>] (uvc_v4l2_streamon+0x28/0x70)
[ 1749.041906] [<b0569968>] (uvc_v4l2_streamon) from [<b0590b54>] (__video_do_ioctl+0x1c8/0x3a0)
[ 1749.042681] [<b0590b54>] (__video_do_ioctl) from [<b0594288>] (video_usercopy+0x200/0x494)
[ 1749.043475] [<b0594288>] (video_usercopy) from [<b0220c38>] (do_vfs_ioctl+0xac/0x798)
[ 1749.044178] [<b0220c38>] (do_vfs_ioctl) from [<b0221358>] (ksys_ioctl+0x34/0x58)
[ 1749.044843] [<b0221358>] (ksys_ioctl) from [<b0101000>] (ret_fast_syscall+0x0/0x4c)

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I6bb58133aaade0ff389fa4af2cfc05fe598de250
2021-07-28 20:46:26 +08:00
Sandy Huang
7751fcdc18 drm/rockchip: vop: Deal with display area out of display mode
Some linux display framework will set display area out of display mode,
this is incorrect config and will lead vop iommu pagefault, we add this
commit to avoid vop pagefault and output error info.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I50f9c93d807858b8939038aae9915b4895fe35e2
2021-07-26 10:01:06 +08:00
William Wu
3e74187d73 phy: rockchip: inno-usb2: support usb wakeup for rk3568
RK3568 usb phy0 and phy1 linestate irq can be set as
wakeup source, but the default linestate filter time
is based on the usb phy grf pclk 100MHz. So it needs
to reconfigure the linestate filter time base on 32KHz
clk when enter deep sleep.

In addition, it needs to enable the host port (usb3
host1 and usb2 host1) wakeup irq because of legacy
reason.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I9151d49721e8e9d917fdb51228f3ca2627090156
2021-07-23 17:26:54 +08:00
Guochun Huang
d83146c216 drm/rockchip/rk628: combtxphy: reducing DUAL LVDS power consumption
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I831dc7879f8f4656e9db63c629c37cc5709d3e35
2021-07-23 17:17:10 +08:00
Xu Hongfei
2e7a96b5d0 media: rockchip: ispp: fix bug that ispp register isn't included in SEI
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: Icfc0e722c2ea4734c863b0ea478df312ddbb826f
2021-07-23 16:45:14 +08:00
Shawn Lin
4dd2e70089 mmc: sdhci-of-dwcmshc: Adjust DLL_TXCLK_TAPNUM_DEFAULT to 0x10
This value is better to be 0x10 instead of 0x16 by new test report
to keep all RK356x work consistently.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I87a22f6e02a6206981fe484db353613ac9a3ede6
2021-07-23 16:40:52 +08:00
Yu Qiaowei
cc56c4b78f video/rockchip: rga2: Fix MMU base not shift forward.
Since the MMU base is not shifted forward, when the sync/async mode
is called together, the same memory is used to store the page table,
resulting in data errors.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If4807da8159e98a8d807cc24b4d6533793eeefa8
2021-07-23 11:18:56 +08:00
Yu Qiaowei
557096465c video/rockchip: rga2: adapt to kernel 5.10
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id7854aaa8bf39c272d9e29f721e38d49d2222727
2021-07-23 11:18:56 +08:00
Jon Lin
a6cf6aca12 drivers: rkflash: Ajudst the dll strategy
1.max_dll_cells is 0x1FF when sfc_ver_4
2.sfc_set_delay_lines to zero means disable dll
3.bypass dll training when there is no device
4.Adjust the dll_value to from the middle of the dll window to
the better one
5.Change RKSFC_DLL_THRESHOLD_RATE to ">50MHz"

Change-Id: Ibd669420899925272c74e190fee8c62c09db8d14
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-07-22 20:01:59 +08:00
Sandy Huang
81633ee291 drm/rockchip: vop2: enable dither up when input rgb565
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I554924b979735e2377b1e9d06b22b2d9b35450a4
2021-07-22 11:12:40 +08:00
Ziyuan Xu
f5d4d3c289 ARM: configs: add rv1126-snapshot.config
Change-Id: If17c72edc26526c4d4e697b09b9db971827c760a
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-07-22 11:10:28 +08:00
Ziyuan Xu
1e4601090a ARM: dts: rockchip: add rv1126-snapshot.dts
The rv1126-snapshot products aim to capture the camera frames as soon
as possible, that use RISC-V to get the camera frames after 'fastae'.

Change-Id: I62fc197279e9188c87616f0cbbaa747b05042e1b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-07-22 11:09:02 +08:00
Ziyuan Xu
410876acbd ARM: dts: rockchip: separate common device node to rv1126-bat-evb-v10.dtsi
Change-Id: I50b0e7f69f2b03bbb3c9987fdc10b0c2c19376d6
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-07-22 10:47:14 +08:00
Algea Cao
1dd8f442b8 drm/bridge: synopsys: dw-hdmi: Remove dw_hdmi_setup when atomic_check
There is no need to call dw_hdmi_setup() when atomic_check.
dw_hdmi_color_changed() will check if color format changed and
call a mode_set.
If call dw_hdmi_setup() to enable hdmi when the first plug in
atomic_check, HPLL has not been configured in rk356x, there will
be display err in some monitor.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I83f3d1d3ff45e3e07910449d8d03f94b82fc0abe
2021-07-22 09:38:30 +08:00
Cai YiWei
293999cf8f media: rockchip: isp1: add 150m isp clk for rk3326
Change-Id: Ia87c9274f1dce6667b0c3aba3d009cf99191a353
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-07-22 09:21:30 +08:00
Cai YiWei
404b75f3b2 media: rockchip: isp1: fix buf done state
Change-Id: Idc2fc19c3972935d6991bd6d6af10e1f9cdbd7e7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-07-22 09:21:30 +08:00
Binyuan Lan
93b6df5c15 ASoC: rockchip: rk817-codec: Solve pop problems
DIGEN_CLKE can only be controlled when the amplifier is turned off

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I5758cab8f20bd2ede008d1ad138cdadcaa55e39d
2021-07-21 17:45:10 +08:00