Commit Graph

1065999 Commits

Author SHA1 Message Date
Li Huang
1d51332e49 video: rockchip: rve: update to 1.0.3
code optimization

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I89979160feb31a1154c3232a32f9c3bbab2bdf35
2022-04-29 14:16:49 +08:00
Li Huang
cc9f3d2606 video: rockchip: rve: support rve session
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ic141815933c5cdd4832b0581ceab1f6c69aa315f
2022-04-29 14:16:38 +08:00
Li Huang
31443cb761 video: rockchip: rve: fixup rmmod crash
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I832fcc9f4cd569232325ea62da95a641eaeb2e52
2022-04-29 14:16:38 +08:00
Ziyuan Xu
59bfbc5d42 ARM: configs: rockchip: rv1106-tb.config: build in MMC_DW/_PLTFM
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ibe856644c72a5520ff6c1a764287ff498c749e81
2022-04-29 14:14:45 +08:00
Ziyuan Xu
2f27a48ee3 mmc: dw_mmc: fixes crash when CONFIG_ROCKCHIP_THUNDER_BOOT=y
[  100.584484] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[  100.584500] pgd = 466047cd
[  100.584509] [00000000] *pgd=00000000
[  100.584526] Internal error: Oops - BUG: 17 [#1] THUMB2
[  100.584534] Modules linked in: dw_mmc_rockchip(+) rknpu snd_soc_rv1106 rockit(O) mpp_vcodec(O) rga3
[  100.584586] CPU: 0 PID: 9 Comm: kworker/u2:1 Tainted: G           O      5.10.66 #9
[  100.584593] Hardware name: Generic DT based system
[  100.584618] Workqueue: events_unbound async_run_entry_fn
[  100.584638] PC is at dw_mci_probe+0x10a/0x7dc
[  100.584655] LR is at clk_core_enable_lock+0x19/0x1c
[  100.584667] pc : [<b038428a>]    lr : [<b02f79ef>]    psr: 60000033
[  100.584676] sp : b00a1e88  ip : b1caf580  fp : af8c29f4
[  100.584686] r10: 00000000  r9 : af8c2c04  r8 : af8c29f4
[  100.584696] r7 : b00cc4e4  r6 : 00000001  r5 : b1caf450  r4 : b1c8c010
[  100.584706] r3 : 00000000  r2 : b05b095c  r1 : 00000000  r0 : 00000000
[  100.584720] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
[  100.584731] Control: 50c53c7d  Table: 01c88059  DAC: 00000055
[  100.584743] Process kworker/u2:1 (pid: 9, stack limit = 0xc7a2c6f9)
[  100.584753] Stack: (0xb00a1e88 to 0xb00a2000)
[  100.584769] 1e80:                   00000001 00000001 ff9a0000 b02cce69 b1caf410 00000000
[  100.584787] 1ea0: b1c8c010 b00cc400 b00cc410 b00cc410 b00cc400 00000001 b00cc4e4 af8c29f4
[  100.584805] 1ec0: af8c2c04 0000000a 00000000 af8c2469 00000000 b00cc410 af8c2c04 b05b1e04
[  100.584822] 1ee0: 00000000 b031b3e3 b00cc410 00000000 b05b1e08 b031a775 00000000 b00cc410
[  100.584840] 1f00: af8c2c04 b1caf2c0 b0008000 00000000 00000000 b1caf2d4 00000000 b031a959
[  100.584858] 1f20: b00bed00 b00cc410 b05a1018 b031a989 b1caf2d0 b0223ad5 b002f8a0 b1caf2d0
[  100.584877] 1f40: b0007000 b021f917 b002f8a0 b1caf2d0 b002f8a0 b002f8b4 b0007000 b057ed20
[  100.584896] 1f60: b05a191c b0007014 b0007040 b021fbc3 b009d300 b0094920 ffffe000 b005bed0
[  100.584914] 1f80: b021fae1 b002f8a0 b009d320 b0222553 b0094920 b02224b1 00000000 00000000
[  100.584931] 1fa0: 00000000 00000000 00000000 b02082e9 00000000 00000000 00000000 00000000
[  100.584946] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  100.584962] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[  100.585012] [<b038428a>] (dw_mci_probe) from [<af8c2469>] (dw_mci_rockchip_probe+0x79/0xbc [dw_mmc_rockchip])
[  100.585049] [<af8c2469>] (dw_mci_rockchip_probe [dw_mmc_rockchip]) from [<b031b3e3>] (platform_drv_probe+0x2d/0x5a)
[  100.585074] [<b031b3e3>] (platform_drv_probe) from [<b031a775>] (really_probe+0x16f/0x23e)
[  100.585096] [<b031a775>] (really_probe) from [<b031a959>] (driver_probe_device+0x5d/0x6c)
[  100.585118] [<b031a959>] (driver_probe_device) from [<b031a989>] (__driver_attach_async_helper+0x21/0x32)
[  100.585139] [<b031a989>] (__driver_attach_async_helper) from [<b0223ad5>] (async_run_entry_fn+0x25/0xa0)
[  100.585165] [<b0223ad5>] (async_run_entry_fn) from [<b021f917>] (process_one_work+0xd5/0x136)
[  100.585191] [<b021f917>] (process_one_work) from [<b021fbc3>] (worker_thread+0xe3/0x190)
[  100.585213] [<b021fbc3>] (worker_thread) from [<b0222553>] (kthread+0xa3/0xac)
[  100.585237] [<b0222553>] (kthread) from [<b02082e9>] (ret_from_fork+0x11/0x28)
[  100.585248] Exception stack(0xb00a1fb0 to 0xb00a1ff8)

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ia0e2d83c53a757b1cf3703408a2803052ff78049
2022-04-29 14:14:45 +08:00
Lei Chen
2bf59d2fc5 arm64: configs: update rk3588_nvr.config
1) make ARCH=arm64 rockchip_linux_defconfig

2) cp .config tmp.config

3) make ARCH=arm64 rockchip_linux_defconfig rk3588_nvr.config

4) ./scripts/diffconfig -m tmp.config .config > arch/arm64/configs/rk3588_nvr.config

Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I18bddf7a5cfda7a8ef43d07e7637b03624255c47
2022-04-29 14:11:22 +08:00
Cai YiWei
5bcbbf90d3 media: rockchip: isp: fix imx327 hdr mode for isp21
Change-Id: I5388d3bae55cb1b35ff11cf6086313bc4b1a1e41
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-29 10:28:48 +08:00
Yiqing Zeng
b2e10ed41b media: i2c: sc500ai change mipi clk to continuous mode
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Iea7f389d53fe8f8cf7c9294f0aa31ea9ac316892
2022-04-28 20:08:13 +08:00
Andy Yan
fcc55f394e drm/rockchip: No support create gem handle for logo fb
logo fb is not supported for exporting to userspace.

We found Xserver may try to copy logo(drmmode_copy_fb) to usersapce,
but our logo fb don't support exporting to userspace.

So not supported this to avoid the following panic:

Unable to handle kernel NULL pointer dereference at virtual address
0000000000000758
[    9.450902] Mem abort info:
[    9.451154]   ESR = 0x96000005
[    9.451431]   EC = 0x25: DABT (current EL), IL = 32 bits
[    9.451899]   SET = 0, FnV = 0
[    9.452173]   EA = 0, S1PTW = 0
[    9.452449] Data abort info:
[    9.452720]   ISV = 0, ISS = 0x00000005
[    9.453064]   CM = 0, WnR = 0
[    9.453326] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000112171000
[    9.453890] [0000000000000758] pgd=0000000000000000,
p4d=0000000000000000, pud=0000000000000000
[    9.454658] Internal error: Oops: 96000005 [#1] SMP
[    9.455089] Modules linked in: bcmdhd
[    9.455421] CPU: 6 PID: 1092 Comm: Xorg Not tainted 5.10.66 #185
[    9.455951] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    9.456495] pstate: 00400009 (nzcv daif +PAN -UAO -TCO BTYPE=--)
[    9.457029] pc : __ll_sc__cmpxchg_case_acq_64+0x4/0x20
[    9.457484] lr : mutex_lock+0x2c/0x44
[    9.457812] sp : ffffffc0164f3ba0
[    9.458107] x29: ffffffc0164f3ba0 x28: 000000000000001c
[    9.458573] x27: 000000000000001c x26: 0000007fe0261f28
[    9.459038] x25: 00000000c01c64ad x24: ffffffc0164f3d28
[    9.459502] x23: ffffffc0106367b8 x22: ffffff810d754e00
[    9.459967] x21: ffffffc0164f3d40 x20: ffffff810d754e00
[    9.460433] x19: 0000000000000758 x18: 000000000000000a
[    9.460898] x17: 0000000000000000 x16: 0000000000000000
[    9.461363] x15: 000000000006dcf2 x14: ffffffc0964f38c7
[    9.461827] x13: ffffffffffffffff x12: 0000000000000030
[    9.462292] x11: 00000000fffffffe x10: ffffff8103a6a328
[    9.462757] x9 : 00000000000000dd x8 : ffffff8103a6a308
[    9.463222] x7 : 0000000000000000 x6 : 0000000000000000
[    9.463687] x5 : ffffffc011a1a808 x4 : 0000000000000000
[    9.464158] x3 : ffffffc010614b1c x2 : ffffff8112522940
[    9.464625] x1 : 0000000000000000 x0 : 0000000000000758
[    9.465093] Call trace:
[    9.465312]  __ll_sc__cmpxchg_case_acq_64+0x4/0x20
[    9.465736]  drm_gem_handle_create+0x30/0x50
[    9.466117]  drm_gem_fb_create_handle+0x34/0x44
[    9.466519]  drm_mode_getfb+0x11c/0x144
[    9.466856]  drm_ioctl_kernel+0x94/0x100
[    9.467204]  drm_ioctl+0x30c/0x34c
[    9.467510]  vfs_ioctl+0x58/0x68
[    9.467794]  __arm64_sys_ioctl+0x68/0x98
[    9.468142]  el0_svc_common.constprop.5+0x138/0x1ec
[    9.468566]  do_el0_svc+0x80/0x9c
[    9.468860]  el0_svc+0x1c/0x28
[    9.469132]  el0_sync_handler+0x64/0x12c
[    9.469481]  el0_sync+0x158/0x180

Change-Id: Ieb8d603ddc70fb1274771a905df2211ba9231225
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2022-04-28 18:34:16 +08:00
Wang Panzhenzhuan
30a25af28f media: i2c: add s5kjn1 sensor driver
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ic8a6639edadd9cecb0c49556d3be64a343828b76
2022-04-28 16:57:57 +08:00
Jianqun Xu
915a3a82ee soc: rockchip: restruct the rk_dmabuf procfs
This patch add a DMABUF_DEBUG_ADVANCED to try to attach and map
dmabufs who have no valid scatter list table.

Update the rk_dmabuf_procfs node to be a directory tree as:

/proc/rk_dmabuf/
  /proc/rk_dmabuf/dev
  /proc/rk_dmabuf/sgt
  /proc/rk_dmabuf/size

The "dev" to show all attached devices, such as:
ffffff816f8bb600 (null)           system-uncached        8288 KiB display-subsystem fb000000.gpu fb000000.gpu

The "sgt" to show scatter list table address range, such as
ffffff8124856200 (null)           system-uncached          52 KiB   0: 0x00000001712d0000..0x00000001712d0fff (         4 KiB)
                                                                    1: 0x00000001712d2000..0x00000001712d2fff (         4 KiB)
                                                                    2: 0x00000001712c6000..0x00000001712c6fff (         4 KiB)
                                                                    3: 0x00000001712c8000..0x00000001712c8fff (         4 KiB)
                                                                    4: 0x00000001712ca000..0x00000001712cafff (         4 KiB)
                                                                    5: 0x00000001712cc000..0x00000001712ccfff (         4 KiB)
                                                                    6: 0x00000001712ce000..0x00000001712cefff (         4 KiB)
                                                                    7: 0x00000001712d1000..0x00000001712d1fff (         4 KiB)
                                                                    8: 0x00000001712c7000..0x00000001712c7fff (         4 KiB)
                                                                    9: 0x00000001712c9000..0x00000001712c9fff (         4 KiB)
                                                                   10: 0x00000001712cb000..0x00000001712cbfff (         4 KiB)
                                                                   11: 0x00000001712cd000..0x00000001712cdfff (         4 KiB)
                                                                   12: 0x00000001712cf000..0x00000001712cffff (         4 KiB)

The "size" to show total dmabuf size, such as:
Total: 79836 KiB

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I62292094407696e410e2ce2973a60f569964e8bd
2022-04-28 16:43:53 +08:00
Jianqun Xu
aa907e7134 dma-buf: support to debug dmabuf via procfsnode
This patch add a DMABUF_DEBUG to switch on/off the debug codes for
dmabuf, including set a name for each dmabuf.

Support to set a name with pid+taskname for a exported dmabuf, this is
enabled depends on DMABUF_DEBUG.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I84f2c3c66d407d7af29df1d7d85d62d0679d2218
2022-04-28 16:41:45 +08:00
Yiqing Zeng
2f7b112401 media: i2c: sc530ai change mipi clk to continuous mode
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: If1b9d1b62d61a73a499ca7a15725f0e67156da0b
2022-04-28 14:21:13 +08:00
David Wu
fad85a74d2 ARM: dts: rockchip: rv1106: Add status "okay" property at queue for gmac
The queue nodes will be deleted, the driver cannot get it, add
status "okay" attributes to avoid deletion.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia0a62d14b3a769e6cc3a631389a54c1190d9d6e2
2022-04-28 12:04:46 +08:00
William Wu
319371ca08 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>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I9151d49721e8e9d917fdb51228f3ca2627090156
2022-04-28 11:59:34 +08:00
William Wu
c7bcfa4a88 usb: dwc3: gadget: properly handle miss isoc event
If miss isoc event happens, the current code just set
the req status to -EXDEV and giveback the req to the usb
gadget driver, and then stop the active transfer with the
cmd DWC3_DEPCMD_ENDTRANSFER and wait for a XferNotReady
event to restart a transfer again. However, for isoc
ep in transfer, it cause to lost the isoc data of the
req.

This patch moves the miss isoc req to pending_list in
order to restart transfer immediately instead of give
back the req to the usb gadget driver.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Idf38d9fd4d483854473c18f792d1996fb5fcab4b
2022-04-28 11:38:15 +08:00
William Wu
2007d5815e usb: dwc3: gadget: properly skip over trbs on ep_dequeue
The commit a7027ca69d ("usb: dwc3: gadget: Give back
staled requests") move all started request to cancelled
list and expect to give back all the started requests.
However, it fails to give back the started requests
if the dep->flags isn't set to DWC3_EP_TRANSFER_STARTED,
in this case, we need to skip the trbs and giveback the
req. And we also need to skip the trbs of the req in the
pending_list to make the dequeue pointers useless.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I123ff779d5e2933449581f8b570e2e6ad6b75458
2022-04-28 10:00:56 +08:00
Yandong Lin
f673a58a7b video: rockchip: mpp: fix some 8k av1 video crash issue
1.Some 8K frames took more than 200ms to decode,causing software timeout.
Solution:
Increase the software timeout threshold to 500ms

2.After power off av1dec, read/write reg in cache irq causing kernel
crash.
Solution:
There are two irq for av1:
    a. vcd_irq is decode irq what we need to care about.
    b. cache irq what we do not need to care about.
  So disable the cache irq  temporarily.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I282b8e0614321b5adf0fac5f31bb88e2bdb2bf6c
2022-04-28 09:11:35 +08:00
Zhenke Fan
032b9a6afe ARM: dts: rockchip: rv1106-evb-cam: compatible to jx_k17
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Id6aa4dba93669b4cde79d75569946b2a28b025b7
2022-04-28 09:05:20 +08:00
Lei Chen
90d509fc73 drm/bridge: add ite-it6161 driver
Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I19f6aa405978d557bf1f98da7cc5532edd8c94a4
2022-04-27 18:44:13 +08:00
Tony Xie
909476ac67 firmware: rockchip_sip: support cpu on/off for amp os.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I723e20cb088063e8f9525b3d64e37090e0a10adf
2022-04-27 18:21:50 +08:00
Steven Liu
53d05c0005 soc: rockchip: amp: support amp driver
1.Protect clock and iomux resources used by AMP.
2.Support AMP cpu on/off.

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: If53e893fac916217bfa5618350b1706b742b34e7
2022-04-27 18:20:34 +08:00
Lin Jinhan
9044c677ec crypto: rockchip: Optimized the DMA_FD cache flushing policy
Reduce unnecessary DMA_FD flusher to improve performance.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I22f9a7c8373419b74e2e250517b5743034043728
2022-04-27 18:16:08 +08:00
Steven Liu
813cc8110a arm64: dts: rockchip: rk3568: add rk3568-amp.dtsi
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I93e64854e053866b6faca68107f6a496f22aa864
2022-04-27 16:47:07 +08:00
Lin Jinhan
16e4dcadf2 crypto: rockchip: rv1126 add gcm support
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I2ef6eec840a3a30547d61253ab1a50b96476d703
2022-04-27 16:45:21 +08:00
Sugar Zhang
6a0cd6ef6d dmaengine: pl330: Improve dma cyclic transfers efficiency
Currently, the driver implements cyclic transfers by desc list.
Each desc describes one period and started by CPU after last
one done(tasklet), which maybe delayed due to schedule or
heavy system load, which will cause device FIFO xrun.

Now, We introduced infinitely cyclic without CPU intervention
to fix this case: each period buffer elapsed, just throwing one
irq to CPU, and keep going transfer without CPU.

e.g. aplay with period-size: 1024, buffer-size: 4096

/# aplay -D hw:0,0 --period-size=1024 --buffer-size=4096 -r 48000
-c 2 -f s16_le /dev/zero

Dump MCGEN:

+ #define PL330_DEBUG_MCGEN

Before:

 916000:  DMAMOV CCR 0x9d0275
 916006:  DMAMOV SAR 0xa34000
 91600c:  DMAMOV DAR 0xffae8030
 916012:  DMALP_1 127
 916014:  DMAFLUSHP 22
 916016:  DMAWFPB 22
 916018:  DMALDB
 916019:  DMASTPB 22
 91601b:  DMALPENDA_1 bjmpto_7
 91601d:  DMASEV 0
 91601f:  DMAEND

 916100:  DMAMOV CCR 0x9d0275
 916106:  DMAMOV SAR 0xa35000
 91610c:  DMAMOV DAR 0xffae8030
 916112:  DMALP_1 127
 916114:  DMAFLUSHP 22
 916116:  DMAWFPB 22
 916118:  DMALDB
 916119:  DMASTPB 22
 91611b:  DMALPENDA_1 bjmpto_7
 91611d:  DMASEV 0
 91611f:  DMAEND

 916000:  DMAMOV CCR 0x9d0275
 916006:  DMAMOV SAR 0xa36000
 91600c:  DMAMOV DAR 0xffae8030
 916012:  DMALP_1 127
 916014:  DMAFLUSHP 22
 916016:  DMAWFPB 22
 916018:  DMALDB
 916019:  DMASTPB 22
 91601b:  DMALPENDA_1 bjmpto_7
 91601d:  DMASEV 0
 91601f:  DMAEND

 916100:  DMAMOV CCR 0x9d0275
 916106:  DMAMOV SAR 0xa37000
 91610c:  DMAMOV DAR 0xffae8030
 916112:  DMALP_1 127
 916114:  DMAFLUSHP 22
 916116:  DMAWFPB 22
 916118:  DMALDB
 916119:  DMASTPB 22
 91611b:  DMALPENDA_1 bjmpto_7
 91611d:  DMASEV 0
 91611f:  DMAEND

 916000:  DMAMOV CCR 0x9d0275
 916006:  DMAMOV SAR 0xa34000
 91600c:  DMAMOV DAR 0xffae8030
 916012:  DMALP_1 127
 916014:  DMAFLUSHP 22
 916016:  DMAWFPB 22
 916018:  DMALDB
 916019:  DMASTPB 22
 91601b:  DMALPENDA_1 bjmpto_7
 91601d:  DMASEV 0
 91601f:  DMAEND

 ...

After:

 916000:  DMAMOV CCR 0x9d0275
 916006:  DMAMOV SAR 0xa34000
 91600c:  DMAMOV DAR 0xffae8030
 916012:  DMALP_0 3
 916014:  DMALP_1 127
 916016:  DMAFLUSHP 22
 916018:  DMAWFPB 22
 91601a:  DMALDB
 91601b:  DMASTPB 22
 91601d:  DMALPENDA_1 bjmpto_7
 91601f:  DMASEV 0
 916021:  DMALPENDA_0 bjmpto_d
 916023:  DMALPFEA_1 bjmpto_1d

Change-Id: Ibbc92c416d0a9dd58633e7991176c86300c3da98
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-04-27 16:37:01 +08:00
Jianqun Xu
eb21d6476e video: rockchip: mpp: print err if mpp_task_attach_fd fail
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I0eacd83fb14cc9123a0ab150d93736b11d8f4b67
2022-04-27 16:13:09 +08:00
Jianqun Xu
de3a995b83 scripts/dtc: Support delete unused nodes when CONFIG_ROCKCHIP_MINI_KERNEL=y
Delete nodes in case of:
* node is null, without any property and children node
* node with 'status' property but not "okay" or "ok"

Change-Id: Ic7d2ba1cb60350c21fa6a46222c20870c74359d4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-04-27 14:47:48 +08:00
Tao Huang
1a11b0aed4 clk: rockchip: rv1106: Support driver probe only when build as module
before:
   text	   data	    bss	    dec	    hex	filename
   6301	  23000	      8	  29309	   727d	drivers/clk/rockchip/clk-rv1106.o
after:
   text	   data	    bss	    dec	    hex	filename
   5483	  22892	      8	  28383	   6edf	drivers/clk/rockchip/clk-rv1106.o

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibb023c4353fa3bbd85b15d415c46d70774f4fcca
2022-04-27 14:46:48 +08:00
Cai YiWei
94b7ed76f1 media: rockchip: isp: limit bay3d bwsaving config for isp32
Change-Id: Ibf65867506128309076871f682f652021495d641
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-27 14:33:27 +08:00
Yu Qiaowei
a29facebc2 video: rockchip: rga3: Fix physical continuous dma_fd not working
Use the driver's mmu configuration to replace the user's mmu configuration.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib6c535bf0f8d714e6535c27cc0181f5c3a39d7ae
2022-04-27 09:17:53 +08:00
Wang Panzhenzhuan
fd1ab46714 media: i2c: otp_eeprom: fix table_size
1. fix table_size.
2. fix ioctl return value.
3. add version control.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ie6c77d359c1b6c3308b339d129e719eeeae2ddee
2022-04-27 09:15:25 +08:00
Yandong Lin
4f110adae7 media: rockchip: isp: Refine 1/4 notification msg
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ibf29ecc480458739b6a12a39f7219c81ab3a9db5
2022-04-26 17:33:23 +08:00
Yandong Lin
6c87036e08 video: rockchip: dvbm: Optimize notify frame info to vepu
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib15aed541efdcc4ff1230c7be9e9fa30d816f706
2022-04-26 17:33:23 +08:00
Yu Qiaowei
dfdd460a14 video: rockchip: rga3: initialize temporary ctx
Update driver version to 1.2.10

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1132b9d7c7d5fc8817c211dc938a6ca5da7c0cfe
2022-04-26 16:36:26 +08:00
Yu Qiaowei
4214a1b887 video: rockchip: rga3: Remove useless structures
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I28e8843c8fc181bdc5652f226e905edd65ba5e6b
2022-04-26 16:36:19 +08:00
Yu Qiaowei
59483bb7f3 video: rockchip: rga3: Refactor rga2_mmu_info.c
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iee7c73e388c05079d7713e1575dc34a589a7190a
2022-04-26 16:36:11 +08:00
Yu Qiaowei
9985c89e5f video: rockchip: rga3: Remove duplicate logic code in rga_dma_buf.c
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I02f28d80438564a082c691a4116f4a15f161e0db
2022-04-26 16:36:11 +08:00
Yu Qiaowei
0a016e48a9 video: rockchip: rga3: Added YUV420 10bit support in rga_mm
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0ae7f1015cecae24492e3719a4772985eee9333b
2022-04-26 16:36:11 +08:00
Yu Qiaowei
66a7f7e972 video: rockchip: rga3: Switching single-task mode memory processing to rga_mm
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I53a405ca5b9a72e3dc34fc9493a7e89c47e62fad
2022-04-26 16:36:11 +08:00
Shaoxing Chen
49ef86deb9 arm64: dts: rockchip: Change i2c0 pinctrl to i2c0m2 for rk3588-evb4
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: I7c7baa71a0f7588d4d6a1e758b53210166971ee4
2022-04-26 16:17:44 +08:00
Jianqun Xu
6cc665a643 dma-buf: rk_heaps: rk-cma-heap replace orig_alloc by dmabuf->name
For dmabuf, owner has set a name for the buffer, use the dmabuf->name to
replace orig_alloc to save several memory.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ifad14ed886580d2a9f3000900e1849b0b5a3858e
2022-04-26 15:59:54 +08:00
William Wu
b0cf5382ef usb: gadget: uvc: prepare buffer with data offset for rockchip platform
For some Rockchip platforms (e.g. RV1106 UVC), it needs to
get the offset in the plane which used for the start of data
in the uvc buffer.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0144709f33b1d3ca955779be487134901468923f
2022-04-26 15:45:19 +08:00
William Wu
f93c20fa43 media: videobuf2: add plane data offset function
Add a new helper function to get the offset in the plane
to the start of data for the usb gadget uvc function.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id2d2c928a531d0272e6241b967fb0deaf3f3e122
2022-04-26 15:45:01 +08:00
Algea Cao
dbad11d42f drm/bridge: synopsys: dw-hdmi-qp: Support multiple HDMI debugfs nodes
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib7be546cba2130a84fe4a82194800d143cdb61d9
2022-04-26 15:43:24 +08:00
Zhang Yubing
0e3de5a3c2 drm/rockchip: dw-dp: add hsync limit less than 32
For DPTX controller, It may be work abnormal when hsync less
than 32. Filtering the display mode whose hsyncd is less
than 32.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I857b1f7af51f7c04633526ae9239917e75e3e0d0
2022-04-26 15:19:05 +08:00
Algea Cao
9aeea00e3d phy: rockchip-samsung-hdptx-hdmi: Improve signal quality
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I079521615373b508502e90bf24fea4b7e79815ae
2022-04-26 15:18:11 +08:00
Shawn Lin
3eefc7e584 mmc: dw_mmc: Move FIFO check to other upcoming request for rv1106 sdmmc
We now don't wait FIFO status at the end of request but
at the beginning of upcoming request, which is the same way
we did for unbusy check in the past. By doing that, we can
hand out cpu.

Fixes: 6eca689b99 ("mmc: dw_mmc: Workaround for RV1106/1103 sdmmc")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie5934b49d2babada81cc447763bb8f980b4884ec
2022-04-26 14:39:48 +08:00
William Wu
9d8c6e4254 usb: dwc2: hcd: only allow to write packet into TxFIFO in slave mode
The dwc2_queue_transaction() do data transfer for DMA
mode if both the params.host_dma and chan->qh are true.
In a test-case with an otg cable hot plug stress test
in DMA mode, if the chan->qh is NULL, it is possible to
do dwc2_hc_write_packet() which should only be called
in Slave mode and cause a crash:

[  633.852937] usb 1-1: reset high-speed USB device number 71 using dwc2
[  633.853115] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
...
[  633.974040] Call trace:
[  633.974289]  dwc2_hc_write_packet.isra.6+0xfc/0x128
[  633.974734]  dwc2_queue_transaction+0xc4/0x1f0
[  633.975142]  dwc2_hcd_queue_transactions+0x10c/0x4b8
[  633.975595]  dwc2_release_channel+0x12c/0x2a8
[  633.975992]  dwc2_complete_non_periodic_xfer.isra.5+0x2c/0x48
[  633.976514]  dwc2_hc_xfercomp_intr+0x370/0x488
[  633.976921]  dwc2_hc_n_intr+0x2c8/0x840
[  633.977282]  dwc2_handle_hcd_intr+0x424/0x7e0
[  633.977677]  _dwc2_hcd_irq+0x10/0x18
[  633.978018]  usb_hcd_irq+0x2c/0x48

Change-Id: I33f7976710d6cdceb1b4758655dba7890488585d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-04-26 14:15:25 +08:00
Ziyuan Xu
9c7320f123 ARM: dts: rockchip: rv1106g-evb2: change sfc_max_freq to 125MHz
The parent clock of sclk_sfc are 500m_300m_200m_24m, so that can't set
sclk_sfc to 118.8MHz.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I71b60000a465c23e88155ac9da95cf046717a6d8
2022-04-26 14:08:50 +08:00