Commit Graph

1271806 Commits

Author SHA1 Message Date
Chandler Chen
0bb1c89c19 video: rockchip: mpp: rkvdec: add spinlock for mmu fault handle
Change-Id: I181ad3c6bb821ec36152e3317e5ba4c0847d8f68
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-29 11:37:13 +08:00
Chandler Chen
3bd8034095 video: rockchip: mpp: mask mmu irq before reg dump
Change-Id: I54c9b01296c7ae21e164dd8a2c3635b7eb4d2dd5
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-05-29 11:34:49 +08:00
Zhang Yubing
74016d114b drm/rockchip: dw-dp: print sink request info when autotest SI
Change-Id: Ib54270da1e9e823a65b0cd5e4363a823e865ede1
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 20:24:16 +08:00
Zhang Yubing
1eab7dd4f8 drm/rockchip: dw-dp: init audio when register encoder
According to Documentation/driver-api/driver-model/driver.rst,
a warning as follow:
-EPROBE_DEFER must not be returned if probe() has already created
child devices, even if those child devices are removed again
in a cleanup path. If -EPROBE_DEFER is returned after a child
device has been registered, it may result in an infinite loop of
.probe() calls to the same driver.

To avoid this issue, we do the audio init work when register
encoder.

Change-Id: I2f527f29a32ca8cb28a0044b3689933845b7108a
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 20:22:46 +08:00
William Wu
bf2d6a4286 arm64: dts: rockchip: rk3562: Add usb power-domains for rockchip_suspend
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I946f9ac2ad549a78eab0a3022fc660df66fcf857
2024-05-28 20:22:13 +08:00
William Wu
9b22c41c15 arm64: dts: rockchip: rk3588: Add usb power-domains for rockchip_suspend
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iae086aa1db15087010160ffc30be9c0f9650ed46
2024-05-28 20:22:13 +08:00
Wangqiang Guo
4146d113d3 media: rockchip: hdmirx: modify ioctl return hdcp status.
Change-Id: I983fa605815944fc5d157ae7bd00d66cf43e7513
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2024-05-28 20:21:12 +08:00
Finley Xiao
3fcfa6749a soc: rockchip: system_monitor: Fix max frequency when use high_limit_table
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie45f3c704b89867274f929dad5c6fcfbd56c2052
2024-05-28 20:07:28 +08:00
Finley Xiao
ec744ad8e3 arm64: dts: rockchip: rk3576: Add early min volt for dmc and vop
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I19997be1d0015ce3a93d25538104610d9fed31b5
2024-05-28 20:07:08 +08:00
Finley Xiao
d16a3075b4 soc: rockchip: system_monitor: Add multiple regulator support for early min volt
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ife4bfeea52b1f857c36dfe523c8269f70b9e9005
2024-05-28 20:06:59 +08:00
Finley Xiao
6b63014398 arm64: dts: rockchip: rk3576: Add power-domains for rockchip_suspend
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id95a412b1ec9314c3b1d04155daeddda96b8a419
2024-05-28 20:01:28 +08:00
Finley Xiao
82eac53250 soc: rockchip: pm_config: Add pm runtime support
Add support to power up pd for usb otg when some devices failed to suspend.
This patch fixes the following panic.

Kernel panic - not syncing: Asynchronous SError Interrupt
Call trace:
dump_backtrace+0xf4/0x118
show_stack+0x18/0x24
dump_stack_lvl+0x60/0x7c
dump_stack+0x18/0x38
panic+0x16c/0x388
nmi_panic+0xa4/0xa8
arm64_serror_panic+0x6c/0x94
do_serror+0xc4/0xd0
el1h_64_error_handler+0x34/0x48
el1h_64_error+0x68/0x6c
readl+0x0/0x8c
dwc3_core_init_for_resume+0x40/0x1f4
dwc3_resume_common+0x3c/0x25c
dwc3_resume+0x40/0x78
dpm_run_callback+0x44/0x174
__device_resume+0x1c8/0x360
dpm_resume+0x100/0x278
dpm_resume_end+0x1c/0x38
suspend_devices_and_enter+0x8a0/0xb5c
pm_suspend+0x17c/0x5ac
state_store+0x104/0x144
kobj_attr_store+0x30/0x48
sysfs_kf_write+0x54/0x6c
kernfs_fop_write_iter+0x104/0x1a4
vfs_write+0x1e0/0x2c8
ksys_write+0x78/0xe8
__arm64_sys_write+0x1c/0x2c
invoke_syscall+0x58/0x11c
el0_svc_common+0xb4/0xf4
do_el0_svc+0x2c/0xb0
el0_svc+0x2c/0xa4
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x1a4/0x1a8

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4b548c04feb009063e8aaa05865ec4e4ff23cb72
2024-05-28 20:01:28 +08:00
Andy Yan
a981063f36 drm/rockchip: Move register of dw-hdmi-qp hdcp device to encoder->late_register
w-hdmi-qp-hdcp device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Note: Documentation/driver-api/driver-model/driver.rst

Change-Id: I99ec2bcbe7ef39a91a4bd01cd73b8f251db8b42d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Andy Yan
17394b0ff4 drm/rockchip: Move register of dw-hdmi-qp cec device to encoder->late_register
dw-hdmi-qp-cec device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Note: Documentation/driver-api/driver-model/driver.rst

Change-Id: Id7b04b8f65fe8a99b6bb6492553774bd0d13bcc2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Andy Yan
4cbfbec8ce drm/rockchip: Move register of dw-hdmi-qp audio device to encoder->late_register
dw-hdmi-qp-i2s-audio device is very easy to register and probe it's
driver, move it out of bind callback to avoid create child device when
hdmi driver or other components run probe(this may cause infinite loop
probe as these components are very easy run into defer probe).

Change-Id: Iabfc5e1714cceff26bfbcf559ab66003cc258d84
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-28 17:15:56 +08:00
Zhang Yubing
c451304a3a drm/rockchip: dw-dp: retry trigger act when it auto clear timeout
Change-Id: I9ec8a46d6adbdf7a69993aa4bed252a01265d114
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-28 10:09:33 +08:00
Andy Yan
620675e654 drm/rockchip: dw_hdmi: Avoid run shutdown if hdmi component is not bind
If dw_hdmi_rockchip_bind is bind failed or other related
components(dp/dsi) bind failed, dw_hdmi_rockchip_unbind will
be called, then some resources like hdmi->workqueue will be
destroyed. So we should not reference this resources at ->shutdown.

Change-Id: Ie9ddf431d62ac217126620d3deb6e18eecc9a46a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-27 18:41:56 +08:00
Alex Wang
5349fa33ec arm64: dts: rockchip: rk3576-evb-input-keymap: update HOME KeyCode of key_table
Change-Id: Ia86ff1fc139dee356399304a5c7d20e7cf17a66f
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2024-05-27 18:41:06 +08:00
Andy Yan
cd76b108b5 drm/bridge: dw-hdmi-qp: Rename __dw_hdmi_probe/remove to dw_hdmi_qp_probe/remove
Make it much clearer.

Change-Id: Id78fa7d9f66fe1e6cc816afd7b5d50a664221366
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2024-05-27 18:31:29 +08:00
Tao Huang
4d91117006 arm64: dts: rockchip: Add rk3576-cpu-swap.dtsi
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22bdf4a116f8324513193c5057883066c28c054c
2024-05-27 18:22:20 +08:00
Tao Huang
6ff03d2d70 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-vehicle-evb.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0802429be68d58b087979cbd992fafacb8dff76e
2024-05-27 18:22:20 +08:00
Tao Huang
817483ec0c arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-test2.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2740041f036a58b2e8a44acc2d536226c6ba782a
2024-05-27 18:22:20 +08:00
Tao Huang
b1098ad39b arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-test1.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I009a72420f50344ad9173fe9b83ac81057c3f349
2024-05-27 18:22:20 +08:00
Tao Huang
0f2880b94d arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-iotest.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie0b70135b4e139f9912d57ef4be6b846eda1e93f
2024-05-27 18:22:20 +08:00
Tao Huang
f7fc553dd0 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-industry-evb.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9ce306c89653f23eb18fb32149b061883b4478c1
2024-05-27 18:22:20 +08:00
Tao Huang
e0c84bcdc6 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-evb2.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7c4e3a81c9a101b9669abe875f235351bb2e0fa5
2024-05-27 18:22:20 +08:00
Tao Huang
9cd3119169 arm64: dts: rockchip: Move rk3576.dtsi out of rk3576-evb1.dtsi
Allow the final dts to modify the contents of rk3576.dtsi,
e.g. including rk3576-cpu-swap.dtsi.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I981c1bd2541c6bb3a5fc7c1ff8126f358f85beee
2024-05-27 18:22:20 +08:00
Zhibin Huang
7e70102b91 misc: rk628: bt1120: fix read bt1120_dec clock frequency error
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I40f80f9d6a0daee6aedbae07cadfe24e7e171e56
2024-05-27 11:05:00 +08:00
Zhibin Huang
86b285adeb misc: rk628: bt1120: set up a tolerance of 2% for bt1120 decoder clk
BT1120 dec clk is a 4-bit integer division, which is inaccurate in
most resolutions.

For example, In bt1120->HDMI 1024x768@60Hz scenario, the actual
required clk frequency is 65MHz, while the CPLL frequency is 1188MHz.
After frequency division, the obtained frequency is 62.5MHz, which
deviates too much from the actual clk and causes the screen to be
unable to display.

So if the frequency division is not accurate, apply for a fault
tolerance of up 2% in frequency setting, so that the obtained
frequency is slightly higher than the actual required clk, so that
the deviation between the actual clk and the required clk frequency
is not significant.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ib04c55d60211ea0cdc56a3bcc3ce49db1ceef8a8
2024-05-27 11:04:59 +08:00
Zhibin Huang
3d48d95ae9 misc: rk628: bt1120: y2r enable is handled in the post_process
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I9c3c6d0ce917d80b0d4ce1369133439a79bf2df9
2024-05-27 11:04:59 +08:00
Zhibin Huang
f12b2d73bb misc: rk628: fix 64-bit division error when compiling arm platform
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I1bf1319de734979735ff3af95bd83f12ffcd3c5c
2024-05-27 11:04:59 +08:00
XiaoDong Huang
e8ce498b96 arm64: dts: rockchip: rk3576-evb: rockchip_suspend; add rockchip,regulator-on-before-mem
Change-Id: Ib1f83b18c8861707f436e7f4482c5e67f110126b
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2024-05-27 10:43:09 +08:00
XiaoDong Huang
d06dc052ef soc: rockchip: pm_config: support to enable regulator before sleep
If we want to enable regulators before system leep, just configure
property "rockchip,regulator-on-before-mem = <xx>, <xx>, <xx>..."
in rockchip-suspend node.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ic421498650f0a208a070c8ceacb94f57ed897609
2024-05-27 10:43:09 +08:00
XiaoDong Huang
6c3dd070c7 soc: rockchip: pm_config: rename on_off_regs_list to on_off_regs_dev_list
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I40ef08d5c85413b521da5a26b44c3246cfccfc3e
2024-05-27 10:24:14 +08:00
Damon Ding
4427d8f548 drm/rockchip: rgb: add dclk_delayline config for rk3576
The dclk_delayline is to adjust the phase between dclk
and data for bt1120/bt656/rgb interface.

According to the rk3576 SI test report, the dclk_delayline
should be 0x5 in order to improve signal quality.

Change-Id: I93d3b865d0b012588ce022876af81ccc47451f32
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-05-24 19:02:27 +08:00
Luo Wei
a72be40c93 mfd: display-serdes: add max96745 bridge split support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I038592b035a9623962e7f129881ec197261e4c22
2024-05-24 16:09:34 +08:00
Tao Huang
70fde854ea arm64: rockchip_linux_defconfig: Use CONFIG_HZ_250
Which is default.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib6cd6ea9a22e238ff9b97d69f93a4ce50b4b4331
2024-05-24 15:26:53 +08:00
Tao Huang
74ff804eba arm64: rockchip_linux_defconfig: Disable CPU errata 2441007 (Cortex-A55)
According to ANDROID commit a9567a35d0 ("ANDROID: arm64: Disable workaround
for CPU errata 2441007 and 2441009"):

CPU errata 2441007 (Cortex-A55) and 2441009 (Cortex-A510) are categorised
as "rare" by Arm and consequently the workaround is not intended to be
deployed in practice as the issue is not expected to occur in real-world
environments.

Given that the cost of the workaround, which issues additional broadcast
TLB invalidation requests, has been shown to impact kswapd significantly
on Pixel devices, disable the workaround following Arm's recommendation.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I794d048a094714c1370752bfaa47bee2afd57d53
2024-05-24 15:26:53 +08:00
Huibin Hong
9fbcb7ca5b serial: 8250_port: fix dma tx issue on rockchip
Fixes: e8ffbb71f7 ("serial: 8250: use THRE & __stop_tx also with DMA")

Change-Id: I8c30f0413a3ff7f9f36ee089ee1be5f3f4a0d045
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2024-05-24 15:08:14 +08:00
Yu Qiaowei
171188308c video: rockchip: rga3: scheduler needs to be locked when operating registers
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I729f1e0dac96022ffe01b3367a964d61e4e739e1
2024-05-24 14:07:56 +08:00
Yu Qiaowei
4f91478b80 video: rockchip: rga3: query job state when clearinga timeout job
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ia78895878e5ed2a0658e827ec16ffd3314235edb
2024-05-24 14:07:56 +08:00
Yu Qiaowei
d60dbd00ed video: rockchip: rga3: support querying hardware work cycle
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7884f17590ed8a11134664897534eb0cc911275d
2024-05-24 14:07:56 +08:00
Tao Huang
c6a0b5d0c7 arm64: rockchip_linux_defconfig: Disable AMPERE/A520 erratum
-CONFIG_AMPERE_ERRATUM_AC03_CPU_38
-CONFIG_ARM64_ERRATUM_2966298

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iac5a07f0190dac519f7ab4570b0de7963be0c90c
2024-05-24 11:04:55 +08:00
Tao Huang
13f5c96469 ARM: dts: rockchip: Sort dtb entries in Makefile
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idde8ca2faf4faf1767c4b140a920af68a5e1ebf4
2024-05-24 10:22:37 +08:00
Yandong Lin
4938e4ee1b video: rockchip: mpp: optimize the schedule of enc/dec
Remove the isr thread to reduce one thread schedule.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4721fc6066c8580e5955f8c79025e46b96c82d85
2024-05-24 10:22:08 +08:00
Zhibin Huang
d420d65bec drm/rockchip: dsi2: optimize drive probe process
Put "component_add" in the attach call so that dsi host and dsi device
(panel or bridge) can be regarded as a component as a whole.

dsi calls "mipi_dsi_host_register" so that the panel executes the probe
process or the bridge successfully executes "mipi_dsi_device_register_full"
during the probe process. The panel or bridge triggers "component_add"
by calling mipi_dsi_attach after the probe is successful.

Through the above modifications, you can avoid dsi defer probe infinitely
due to panel configuration errors.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ic8782e9902a6133990fca728ab12e530e50b6d68
2024-05-23 11:28:09 +08:00
Tao Huang
50f19f66e6 soc: rockchip: pm_config: better module support
Use __is_defined(MODULE) to replace "#ifndef MODULE".

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I41ad334a9c4c6459bdcd0902098b16113d34c6e5
2024-05-23 10:18:13 +08:00
Zorro Liu
88a2bf21f1 soc: rockchip: rockchip_system_monitor: modify ebc dmc policy
Change-Id: If621bcdc3caad5c25545696b4daf2f640c44d2b6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-05-23 10:12:29 +08:00
Finley Xiao
3d41eb3c90 PM / devfreq: rockchip_dmc: Add ebc system status support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I17c359d119e5ea6c0124d05bb0ab55e3d540643b
2024-05-23 10:12:29 +08:00
Finley Xiao
2bb3dc2155 drm/rockchip: vop2: Set single vop status when only one active video port
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I30b924023af3058409ec40ff1d47259ff20c3aeb
2024-05-23 10:12:29 +08:00