Commit Graph

1272077 Commits

Author SHA1 Message Date
Jason Zhu
76925444bd arm64: configs: rockchip_linux_defconfig: enable CONFIG_SND_SOC_ROCKCHIP_ASRC
Change-Id: Ibd6091631da1cba254c571e59553b0f427d38637
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-07-10 20:13:46 +08:00
Jason Zhu
f5409b59ef arm64: dts: rockchip: rk3576: add asrc node
Change-Id: Id122295e5acf838705ccdc87acd6249ef6af340a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-07-10 20:12:15 +08:00
Jason Zhu
d4a03cf620 ASoC: rockchip: multicodecs: support DPCM
Change-Id: I1e856b305bb949791962a1c157bae8981b2663f9
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-07-10 20:10:58 +08:00
Zhibin Huang
b39062142f arm64: dts: rockchip: add kernel logo for rk3576-rk628 hdmi2gvi
Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ia62e4741b0d1116bdc54969ef089ea73a40a6fd2
2024-07-10 15:31:07 +08:00
Sugar Zhang
9b72f7d254 ASoC: rockchip: i2s-tdm: Check stream is valid
Do nothing when stream is invalid, especially for
HDMI-TX-DLP with multi-dais situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ieb056147875ca2707b85f8d9962a5593e66abb21
2024-07-10 15:00:24 +08:00
Sugar Zhang
602e6eab74 ASoC: rockchip: sai: Check stream is valid
Do nothing when stream is invalid, especially for
HDMI-TX-DLP with multi-dais situation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5b7387779c6fc166196fff1ef9ab35907b268021
2024-07-10 15:00:18 +08:00
Sugar Zhang
e22dfe2e09 ASoC: hdmi-codec: Add support for HDMI-TX DLP
Support for HDMI-TX Audio Digital Loopback.

e.g.

&hdmi {
	audio,digital-loopback;
};

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id5b4490b8bd96559b49fb8225cf93feac7c3d5c2
2024-07-10 15:00:18 +08:00
Sugar Zhang
e06eeb1d57 ASoC: rockchip: Add debug for TRCM
Used for measure the time cost between dma guard and stream.

Change-Id: I626f6b892faa31fbf06e7b1100fdf0b0fa3347f7
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2024-07-10 15:00:02 +08:00
Sugar Zhang
8b3a1e4cee ASoC: rockchip: i2s-tdm: Optimize WL for TDM mode
TDM mode use all FIFOs, the max burst is 16 word of DMAC,
so we used the max FIFO to cover DDR dmc windows.

4 FIFOs controller:

TDL:

16 word: WL = ((32 * 4) - 16) / 4 = 28

RDL:

16 word: WL = 16 / 4 = 4

Change-Id: Idd88e0615d7fd4ec8c36c72af1c0b1b2d716b43e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2024-07-10 15:00:02 +08:00
Sugar Zhang
730ca484ba ASoC: rockchip: i2s_tdm: Fix params check for TDM mode
especially fixed for always-on TDM situation.

Change-Id: I2d544320028daa8ca7031f786beb8ba8880d06bb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2024-07-10 15:00:02 +08:00
Zhibin Huang
7997753375 drm/rockchip: panel-notifier: avoid duplicate register notifier
If user mistakenly registers the notifier repeatedly, a panic occurs
at the following location:

pc : __list_add_valid+0x68/0xb8
lr : __list_add_valid+0x68/0xb8
sp : ffffffc00abe3a00
x29: ffffffc00abe3a00 x28: ffffff8003048020 x27: ffffff8003048028
x26: ffffff800324d3d0 x25: 0000000000000002 x24: 000000000000000a
x23: ffffffc00a663040 x22: ffffff80032da350 x21: ffffff8004930940
x20: ffffff80032da350 x19: ffffff80047be010 x18: ffffffc00aab1088
x17: 3035336164323330 x16: ffffffffffffffff x15: 0000000000000004
x14: ffffffc00a00d6e0 x13: 000000000000ffff x12: 0000000000000003
x11: 00000000fffeffff x10: c0000000fffeffff x9 : 55386e6b9a94b100
x8 : 55386e6b9a94b100 x7 : 205b5d3836393437 x6 : 382e33202020205b
x5 : ffffffc00a9e3617 x4 : ffffffc00abe3757 x3 : 0000000000000000
x2 : 0000000000000000 x1 : ffffffc00abe37c0 x0 : 0000000000000058
Call trace:
 __list_add_valid+0x68/0xb8
 devm_rockchip_panel_notifier_register+0x9c/0xfc
 panel_simple_probe+0x458/0x514
 panel_simple_platform_probe+0x88/0xc8
 platform_probe+0xa8/0xd0
 really_probe+0x174/0x350
 __driver_probe_device+0xa0/0x128
 driver_probe_device+0x44/0x210
 __device_attach_driver+0x12c/0x154
 bus_for_each_drv+0x84/0xd0
 __device_attach+0xf0/0x170
 device_initial_probe+0x14/0x20
 bus_probe_device+0x34/0x98
 deferred_probe_work_func+0x7c/0xd8
 process_one_work+0x1a8/0x3b8
 worker_thread+0x300/0x430
 kthread+0xec/0x1b8
 ret_from_fork+0x10/0x20

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

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: If2bb65ed80d79d9d930d8bf6e82c45a43fd123b1
2024-07-09 18:12:29 +08:00
Zhang Yubing
302af18f80 arm64: dts: rockchip: rk3576-evb1: add mux node for dp
Change-Id: I5896df25268af73003d4baf1ac400a06ca769bfa
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:39:12 +08:00
Zhang Yubing
68caa7651d arm64: dts: rockchip: rk3588-evb1: add mux node for dp
Change-Id: I23fd7869e6f1c8f23655fbb315a38c685962c909
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:39:11 +08:00
Zhang Yubing
9553deccf2 drm/rockchip: dw-dp: support get hpd status from Type-C interface
Change-Id: I92f30af67c9c5c1e8720d2cdd8a8e1e5c85618a7
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:39:11 +08:00
Zhang Yubing
09d452118b phy: rockchip: usbdp: support not trigger dp hpd
If a mux device in DPTX driver, usbdp phy should not trigger
dp hpd. DPTX driver will call phy_set_mode to transfer this
info.

Change-Id: I1d13858a9115a688bd9560eb41a2f86c76e73316
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:38:40 +08:00
Zhang Yubing
b41a87b16c drm/rockchip: dw-dp: support dynamic control power domain
Change-Id: I8692e967d2873a10385bec5d6998ad73cf8f4fa7
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:22:38 +08:00
Zhang Yubing
010bf50479 phy: rockchip: usbdp: don't access vo grf in phy power on
The power domain for vo grf may not enable when phy power
on. To access vo grf in other callback function to ensure
the power domain enable before access vo grf.

Change-Id: Iba5f8e6b62670bc01084616506ce146fb22d8e3c
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-07-09 16:05:11 +08:00
Chaoyi Chen
6913ee05a3 drm/rockchip: debugfs: Add vop dump buffer version output prompt
Change-Id: Ia5afee51ce86224d14eb15c6662e500ae91d1075
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-07-09 15:32:25 +08:00
Chaoyi Chen
daf6d9c8c5 drm/rockchip: debugfs: Remove unused enable option for vop buffer dump
The vop buffer dump feature no longer needs to be explicitly enabled via
debugfs, removing the code associated with it.

Change-Id: I73581514fc69616c97047adb4967d488261cee86
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-07-09 15:32:25 +08:00
Yu Qiaowei
6e5641b333 video: rockchip: rga3: support RV1103B
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7a4fda6fd994418c6d2e4dea825f03017abdcf5a
2024-07-09 11:26:23 +08:00
Tao Huang
49807b4717 soc: rockchip: fiq_debugger: Fix console sleep too long
usleep_range() will take too long on !CONFIG_HIGH_RES_TIMERS,
replace with schedule() and nice.

Change-Id: I2dc6e4620fe4c56f491f1700e7d6c1f54d1c36e9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-07-09 11:23:36 +08:00
Tao Huang
74c68a1e8a clk: rockchip: Disable CLK_INV/CLK_PVTM on CPU_RV1103B
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5bc5e2e9b12cadb07bc8a31a00a21deb36b88916
2024-07-09 11:06:17 +08:00
Tao Huang
32b44fe550 video: rockchip: mpp_osal: ROCKCHIP_MPP_OSAL depends on CPU_RV1103B
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ieddb8123fbe06f1ebbc65e23f0a1140a55ce61da
2024-07-09 11:06:17 +08:00
Tao Huang
054daf6edc soc: rockchip: ROCKCHIP_MINI_KERNEL default y if CPU_RV1103B
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I245ee2575fb9f8c6b4c02e79a97900aabcb9a750
2024-07-09 11:06:17 +08:00
Tao Huang
373239c6c8 soc: rockchip: Add CPU_RV1103B config
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifb03f352c0624a13548394dcecf59d09f3579ce8
2024-07-09 11:06:17 +08:00
Mingwei Yan
f42fc97328 media: rockchip: vpss: fix online mul_sensor affect offline
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I65e0608fe410baee2d8008b3823bd8322edd7c4d
2024-07-09 10:57:16 +08:00
Mingwei Yan
88f19f9178 media: rockchip: vpss: fix offline 8k params calc error
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I1b67b838940a8e2eba1080a8ed96d65ccf9d0105
2024-07-09 10:57:16 +08:00
Chaoyi Chen
6f97ed5a56 drm/rockchip: Only enable ROCKCHIP_DRM_DEBUG when not use GKI
Fixes: 59d943019c ("drm/rockchip: Enable ROCKCHIP_DRM_DEBUG feature by default")
Change-Id: I70a845a1796ba420220bc2eca7c7d66cd698f314
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-07-09 10:55:47 +08:00
Liang Chen
f5a4e5e984 arm64: dts: rockchip: rk3562: auto select opps for rk3562j
Also set the minimus voltage to 0.9V for rk3562j

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ia30b1c3fd42f0d4d8eac18ee9ec3f93a7c6204d9
2024-07-07 09:52:57 +08:00
Cai YiWei
e81248fd15 media: rockchip: isp: fix aiisp config
gain write auto control by hardware

Change-Id: I5ebd0eb3a3ac942f3247a2ef624d4e775b16e9ed
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-07-05 18:21:37 +08:00
Cai YiWei
8bc8558994 media: rockchip: isp: fix isp39 resume
Change-Id: I8a6b60e4171563065d4efaf1ed444399a9ea94b7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-07-05 18:21:19 +08:00
Jianwei Fan
749d4847fd media: i2c: rk628: support mode add max res to 4096x2160
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I29e5031dd180da3427717c636f66556ed95a980a
2024-07-05 15:24:58 +08:00
Sugar Zhang
3d6aa3c10f ASoC: rockchip: multi_dais: Fix fifo count for SAI
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I60fc1848494efaa2b68ac46caa7b665237bf327d
2024-07-05 11:40:42 +08:00
Sugar Zhang
5fe0d0e4af ASoC: rockchip: i2s-tdm: Fix tdm channels init for ALWAYS-ON
Init tdm slots on ALWAYS-ON situation to achieve the real
always-on clk, no need to do one call on sound card.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I75840f9072c66a8a42fcbd65781ee0f0d1612c36
2024-07-05 11:40:42 +08:00
Sugar Zhang
cb6e47fce7 ASoC: rockchip: trcm: Add support for always-on
Initialize the dma guard and trigger run for always-on.

Use the max-16w to cover all 2^n cases, maybe better
per channels and fmt, at the moment, we use the simple
way.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia4b9ba06a9cb1385f4cda7125f7f4680e6ebe6e0
2024-07-05 11:40:42 +08:00
Sugar Zhang
f190480867 ASoC: rockchip: i2s-tdm: Optimize the dma guard flow
- Move dma guard initialize into trcm block
- Move trcm always on into trcm block

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I49f7efbc52235fc87adc01a21ca2747c4c8d86b1
2024-07-05 11:40:42 +08:00
Sugar Zhang
15ec253f3c ASoC: rockchip: i2s-tdm: Init Valid Width for TDM from DT
e.g.
simple-audio-card,cpu {
	sound-dai = <&i2s0_8ch>;
	dai-tdm-slot-num = <8>;
	dai-tdm-slot-width = <32>;
};

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I55c3849d87e17145db6b4ce4af202303b5563080
2024-07-05 11:40:42 +08:00
Sugar Zhang
bcbbd20069 ASoC: rockchip: i2s-tdm: Fix config for stage set_fmt on ALWAYS-ON
Enable the xfer in the last card init stage to fix the config
failed on set_tdm_slot/set_fmt.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie456b08d11eef5356036a431f5fd6117e0df3823
2024-07-05 11:40:42 +08:00
Sugar Zhang
75d401b731 ASoC: rockchip: i2s-tdm: Fix register sync failed on ALWAYS-ON
XFER must be placed after all registers sync done,
because a lots of registers depends on the XFER-Disabled.

Use regcache_sync_region to spilt the sync operation to address
the XFER in the final step.

And also fix for system suspend/resume by using the force one.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4c5c48496940b2f20edf7a5fa65ad004a5ac9a55
2024-07-05 11:40:42 +08:00
Sugar Zhang
e77b6ebce2 ASoC: rockchip: i2s-tdm: Optimize pm_runtime_forbid
Should be placed after pm_runtime_enable to do
rpm_resume at the moment. otherwise, it will make sense
at the next pm_runtime_get.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I759e5c8c0602b380c7f50d80d8f564316beea632
2024-07-05 11:40:42 +08:00
David Wu
baf08b1852 i2c: rk3x: Fix unregister restart handler error
When i2c drivers probe failed, unregister_restart_handler() should be
done before leave probe().

Fixes: 497e7bd6e1 ("i2c: rk3x: Make sure the i2c transfer to be finished before system reboot")
Change-Id: I6587bd15b63315c173339c26dccf4388741d4286
Signed-off-by: David Wu <david.wu@rock-chips.com>
2024-07-05 09:53:17 +08:00
Sandy Huang
32062f68cc drm/rockchip: vop2: update dsc pd status when show logo with dsc
In normal case, dsc power domain will enable when crtc enable and
disabled when crtc disable. When enable dsc in uboot to show logo,
the dsc in kernel driver can't know the real power domain status,
which will trigger something wrong when disable/endale dsc power
domain.
To avoid this issue, we check the dsc power domain status when
vop_initial. the dsc power domain get in vop_initial function
is enabled only when dsc is enabled in uboot and  enter into kernel
driver. It need to update dsc power domain status in this case.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9641373c2c8facc17ff90d4141909bcc3ac6b13d
2024-07-03 14:34:35 +08:00
Sandy Huang
fc4f9d2685 drm/rockchip: vop2: make sure dsc pd off take effect
after close dsc pd, the following function will set vop enter standby
immediately, this will lead to dsc pd close failed, so we use
vop2_power_domain_put_sync() instead of vop2_power_domain_put().

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9120e46ec2047e8358b28a3f153b54b4825a5e60
2024-07-03 14:33:53 +08:00
Chaoyi Chen
59d943019c drm/rockchip: Enable ROCKCHIP_DRM_DEBUG feature by default
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I78e1ffc660c0c735aff2e2a5cc272549ee8dd4a5
2024-07-03 14:24:33 +08:00
Chaoyi Chen
f483fa9405 drm/rockchip: debugfs: Remove unused vop_dump_list* structure
vop_dump_list* is no longer used and this patch removes this structure.

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9f32dfd707a1b7633479f2f2f8fee12ad69a96b1
2024-07-03 14:24:33 +08:00
Sandy Huang
c1c9524d3f drm/rockchip: debugfs: optimize dump buffer file name and size
1. for rfbc/afbc format we need to dump all buffer at fb even userspace
set src buffer offset;
2. optimize dump buffer name, so we can get buffer info correctly from
file name, the following is an example of a dump file:

old file name: video1920_1080_NV12.bin
new file name:
    Cluster0-win0_fb-1920x1088_stride-1920_offset-0x0_act-1920x1080_NV12_0.bin
    Cluster0-win0_fb-3840x2160_stride-5760_offset-0x0_act-3840x2160_YU08_AFBC_1.bin

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I96c3af65fdbe37629d408bb09a8ee9aed78a7f7f
2024-07-03 14:24:33 +08:00
Sandy Huang
8a5680ba81 drm/rockchip: drv: move modifier_to_string() to rockchip_drm_drv and rename
modifier_to_string() maybe used by vop/vop2/rockchip_drm_debugfs.c
and rename modifier_to_string() to rockchip_drm_modifier_to_string()

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I427d5f499d98315632bb91c56da37d9c014df75d
2024-07-03 14:24:33 +08:00
Chaoyi Chen
a607e5fabf drm/rockchip: vop: Use DRM plane info to implement the buffer dump
This patch deprecates the plane list record method used in the
previous plane buffer dump. There is no need to record these
information additionally now, as they are already accessible in DRM.

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I965f42cc7372c4314aa8cd4de2a8a811b41badaf
2024-07-03 14:24:33 +08:00
Chaoyi Chen
9a9306f9ce drm/rockchip: vop2: Use DRM plane info to implement the buffer dump
This patch deprecates the plane list record method used in the
previous plane buffer dump. There is no need to record these
information additionally now, as they are already accessible in DRM.

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: Iaebf639bcc0759b0f1aa3c9a3888b964a8a6f35b
2024-07-03 14:24:33 +08:00
Chaoyi Chen
67c888e281 drm/rockchip: debugfs: Use DRM plane info to implement the buffer dump
This patch deprecates the plane list record method used in the
previous plane buffer dump. There is no need to record these
information additionally now, as they are already accessible in DRM.

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: Id638a7309ab2ae3f7820d1779e922d008cba7e6d
2024-07-03 14:24:33 +08:00