Commit Graph

1285692 Commits

Author SHA1 Message Date
Yu Qiaowei
ae35fd7eec video: rockchip: rga3: use genpool/dmapool to manage cmd_buf on each scheduler
In some scenarios with high timing requirements, frequent calls to
dma_alloc_coherent may trigger memory reclamation with low probability,
thereby increasing the overall time consumption per frame.

Change-Id: I28ffe47c5db40c82a54254b056f117931efbe38e
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2025-08-20 01:52:39 +00:00
Yu Qiaowei
ea07a6e6fe video: rockchip: rga3: fix dma_alloc_coherent not using main device
The iommu device needs to be mapped using a unified main device.

Change-Id: I5b5820b590101dde1713889c056edc034d7322ea
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2025-08-20 01:52:39 +00:00
Zefa Chen
849ea47868 media: i2c: sc831ai: fix the probability of horizontal stripes caused by unstable DVDD
Change-Id: I6097bd8ce66149a3849961e0a88d48c1b7de4ce5
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-20 01:50:20 +00:00
Zefa Chen
b2d836232b media: i2c: sc831ai fix compile error
Change-Id: I7c7cccdd947c42f57180279011d18edaf4702912
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-20 09:24:32 +08:00
Zefa Chen
996336689c media: rockchip: vicap limit virtual width at least 8 aligned
Change-Id: I108f4cb48ebd4a2ced7e39f71aa71044367e387e
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-19 10:16:12 +00:00
Zefa Chen
574be18603 media: rockchip: vicap support ext_master/ext_slave sync mode
Change-Id: I3c6905f075155f2c9248d4e3c41a7bf56069da67
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-19 10:16:12 +00:00
Zefa Chen
b19eb7a962 media: rockchip: vicap add reg of read size for rv1126b
Change-Id: I6d9cd3324af1aefacd978fb659ae347a3e7300af
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-19 10:16:12 +00:00
LongChang Ma
21ab8ab120 arm64: dts: rockchip: rv1126b.dtsi add rkisp-vir4
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: I6a78fafde15dd2c86f0411de80305c64baa6b4a4
2025-08-19 09:32:46 +00:00
Zefa Chen
943e9a7330 media: i2c: sc635hai fixes fps reduce by half with slave mode
the vts of slave need less than master

Change-Id: I998dbc2868152605b3874c6510f98519e2fa23d9
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-08-19 08:55:57 +00:00
Jon Lin
b2e6323569 misc: rockchip: pcie-rkep: Support PCIE_EP_RESET_CTRL
Reset the RC/EP controller by calling the pm_for_user interface of
the RK PCIe extension.

Change-Id: I6da956f4287017f50a27ad3e0dbb4f0235e981ac
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-08-19 11:12:48 +08:00
LongChang Ma
8805d031be media: i2c: add support sc231hai sensor driver
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: Ia3d60c6fe2050c1eb45e0b208691af0453ea5497
2025-08-18 11:12:44 +00:00
LongChang Ma
33f3c21629 media: i2c: add support sc235hai sensor driver
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: Ia8d63407bd770d625c0cc0513b78096a5d1c9a1e
2025-08-18 18:21:00 +08:00
LongChang Ma
80afdafe54 media: i2c: add support sc635hai sync mode
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: Id27d5d230553664cce978fd9920c04a804811233
2025-08-18 18:12:21 +08:00
Algea Cao
e3b0712bc5 drm/rockchip: dw_hdmi: Fix the error in the judgment condition for the dsc 1/3 compression rate
Fixes: dbcc3c130c ("drm/rockchip: dw_hdmi: Do not enable DSC when the DSC compression ratio is below 0.375.")

Change-Id: Ib94677b9e0588a944feb5e5506eaa9dcbf96bf35
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-08-18 10:08:58 +00:00
Jkand Huang
140ea84b90 ARM: configs: rv1126b-ipc: Enable CONFIG_BLK_DEV_INITRD
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: Idda6d0e3a9e3325479a814dd786d508ac65cc858
2025-08-18 10:06:29 +00:00
Jkand Huang
20b16eb919 ARM: configs: rv1126b-ipc: Enable CONFIG_EXT4_FS
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: I2a4b2653e4cdd84972ce810c3c77459e421c311b
2025-08-18 10:05:28 +00:00
Jkand Huang
b89a90f1e7 ARM: dts: rockchip: add rv1126b-evb2-v12.dts
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: I47d836591258eed1b1785e5d3bc14638ed957ebb
2025-08-18 17:58:12 +08:00
Jkand Huang
8102cff13b arm64: dts: rockchip: add rv1126b-evb2-v12.dts
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
Change-Id: Icd714daf4f2f016a22de0be706c49a78ae0de70f
2025-08-18 17:56:44 +08:00
LongChang Ma
7006cfe4d3 media: i2c: format sc635hai code to kernel style
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: Ifd860772ed214bb55cdcc5ec3af5b8ed46a33632
2025-08-18 09:51:32 +00:00
Guochun Huang
48ae954928 drm/rockchip: dsi2: add support support vrr by changing dclk in auto mode
Auto-Calculation mode Allows IPI frames to change dynamically with the controller
adapting the output frames in vrr mode.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ibcdc520db4b5546ca5877eb02145a5fac7ab7a2c
2025-08-18 09:51:23 +00:00
Sandy Huang
f70f311a71 drm/rockchip: vop2: add support disable-writeback property
Sometimes we want to disable the writeback function, which can be
achieved by adding the following configuration at the DTS:

&vop {
   rockchip,disable-writeback;
};

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I221f6cb801c46392a545d3d37d9c27ed985d1679
2025-08-18 09:51:10 +00:00
Weiwen Chen
9ea89e9981 arm64: configs: rv1126b_defconfig enable CONFIG_ROCKCHIP_DVBM
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I317e67b6869542b2be70d4080979fc651970e412
2025-08-18 17:31:23 +08:00
Simon Xue
879a729b8e soc: rockchip: decompress: remove unused code
Change-Id: I878281c56ad9895989c04ed1cec5bfcf16f61fb4
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-08-18 09:27:06 +00:00
Wei Dun
1049814eba media: rockchp: vpss: remove 16-byte alignment enforcement for input/output stride
Change-Id: I7e0cd8a7e9dc194d8acc936ed9b0395ae8e8383a
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
2025-08-18 11:17:08 +08:00
Huibin Hong
61a1da7a08 fiq_debugger: fix bug when RT linux is enabled
Set debugger irq to IRQF_NO_THREAD, or irq handler calls get_irq_regs(),
and return null.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ic61d2bb2d233e74a2028405b80075eefabd0a9a1
2025-08-14 10:42:08 +00:00
Chen Shunqing
c538ed9ce6 power: supply: rk817-battery: add CHARGE_COUNTER for CTS
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ib0b83a175c8ba2cda435260dfcc584f25c927282
2025-08-14 10:34:24 +00:00
Tao Huang
0e47a522e3 input: touchscreen: gslx680_pad: switch to devm initialization
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ice6507a29a6132e5a9fa08c02bf1c1f960126e25
2025-08-14 10:29:15 +00:00
Tao Huang
5c8264c319 input: touchscreen: gslx680_pad: make g_wake_pin/g_irq_pin/gsl1686_config_data_id static
Change-Id: Id54b29798c2d3b91429f72245e3bc045a410fd1d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-08-14 10:29:15 +00:00
Hisping Lin
b6c371be83 nvmem: rockchip-otp: support hwspinlock
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: I316e21aa065fac14c839cf130e6e2e4211d58bd0
2025-08-14 08:59:02 +00:00
Hisping Lin
5fce75f316 arm64: dts: rockchip: rv1126b: Add hwlock for otp
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: Ibf043f4f8bc57fd94231e3a96e4b14dda8675699
2025-08-14 08:58:34 +00:00
Hisping Lin
ab1297f0d6 arm64: configs: rv1126b_defconfig: enable hwspinlock
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: I596a4fb36816b8fdcaf78c90a75d77e2b9d6a3c0
2025-08-14 16:57:52 +08:00
Hisping Lin
2494c27d1a ARM: configs: rv1126b_defconfig: enable hwspinlock
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: Ia96f342d802968dd4697460462a081c064395d74
2025-08-14 16:55:53 +08:00
Hisping Lin
4323bdd51b arm64: dts: rockchip: rv1126b: enable hwspinlock
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: Iadf8b0558796eadc27666c5206d888c22260a4d5
2025-08-14 16:54:30 +08:00
Hisping Lin
184b63a5f0 dt-binding: soc: Add rockchip,rv1126b-hwspinlock.h
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: I2717e4dcd89ba26ad59e82b0992b8eafabfe4bf1
2025-08-14 08:53:10 +00:00
Yu Zheng
47d4d1d0af media: i2c: imx586 add 3968x2800 crop sequence
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: Iacca10bdaa3c7fa9cc4dbf7cbab41134bbe616f2
2025-08-14 08:15:25 +00:00
Zhang Yubing
f801110706 drm/rockchip: dw-dp: fix rk3576 dp port max output height value
The rk3576 dp port max output height value is the same as vop port.
The detail config value as follow:
DP0 is the same as VP0, set the max output height as 4096;
DP1 is the same as VP1, set the max output height as 2560;
DP2 is the same as VP2, set the max output height as 1920;

Change-Id: Ie96cd8aba47ff5f4070ea902abd535a70e5608b4
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-08-14 08:14:49 +00:00
Zhang Yubing
9540936587 drm/rockchip: dw-dp: remove unexpected print info
Avoid print the unexpected info when a hpd irq come but
this irq is not for phy test.

Change-Id: Ia61b0cb7494df2ac7c9756ffbf78b1f9d36412b4
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-08-14 08:14:49 +00:00
Damon Ding
7917cd17e6 drm/rockchip: vop: Remove the flag &vop->is_iommu_needed
Through analysis of the code logic, we found that the flag
&vop->is_iommu_needed is redundant. After removing it, the iommu
will be enabled at the same time as the first atomic flush operation,
which may refresh the frame or not.

This modification can make codes more concise and allow iommu to be
initialized at an earlier time point, which may avoid the potential
problems(see commit 97e3aa256f ("drm/rockchip: vop2: Remove the
flag &vop2->is_iommu_needed"))

Change-Id: If8932de972c2a4bbd04ac6b3d6c8d363a3b2cefc
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-08-14 08:08:34 +00:00
Yifeng Zhao
ff538ea7f5 mmc: sdhci-of-dwcmshc: disable internal clock auto gate
With CMDQ enabled, issuing a DCMD as the last command before disabling
CMDQ causes the eMMC controller to auto-gate its internal clock. The
state machine mismatch after exiting CMDQ mode triggers data-timeout
errors on all subsequent reads and writes, so the auto-clock-gate
function must be disabled whenever CMDQ is enabled.

log:
mmc2: Timeout waiting for hardware interrupt.
mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
mmc2: sdhci: Sys addr:  0x00000001 | Version:  0x00000005
mmc2: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000000

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ibafa74fc2db29b841b5b4df21ef484478f96a44e
2025-08-14 03:46:26 +00:00
Shawn Lin
61c710bab1 arm64: dts: rockchip: rk3576: Assign pcie1's domain to one
Now the PCIe stack doesn't allow more than one root port to share
the same domain. So assign pcie1's domain to one to fix the failure.

[    3.172125] sd 0:0:0:2: [sdc] Attached SCSI disk
[    3.174805]  sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
[    3.175709] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.175742] rk-pcie 2a210000.pcie: PCIe Link up, LTSSM is 0x130011
[    3.175759] rk-pcie 2a210000.pcie: PCIe Gen.2 x1 link up
[    3.175797] rk-pcie 2a210000.pcie: Scanning root bridge failed
[    3.175812] rk-pcie 2a210000.pcie: failed to initialize host

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: If933fb89d663e8c2b1337cd5886af9f730697ec1
2025-08-14 09:37:14 +08:00
Chaoyi Chen
f854f64c00 drm/rockchip: vop: Do not clear wb intr status when commit new wb
If a new wb commit is too close to the timing of wb dma complete,
clearing the wb intr status will lose the wb dma complete status.

In this case, the software process is as follows:

vop_wb_commit() -> vop_wb_irqs_enable() -> Clear wb intr ->
vop_isr() -> vop_read_and_clear_wb_irqs()

Since we had cleared the intr in vop_wb_irqs_enable(), the value read
by vop_read_and_clear_wb_irqs() is 0, and we have lost the interrupt
status.

Change-Id: Ida08e94ce1d987f7edbcb6448c0b3f034add1bce
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Chaoyi Chen
89527bc745 drm/rockchip: vop: Do not commit writeback when all win disabled
Change-Id: Iaa96aebaf2d6f225ebd3a35648b219510d38f648
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Chaoyi Chen
9deae3276c drm/rockchip: vop: Add enabled_win_mask to record enabled win
Change-Id: I15bc5fe018280f9cb0c1157ad3cd2b9413e854d2
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Chaoyi Chen
8749235106 drm/rockchip: vop: Enable writeback complete interrupt for rv1126b
Change-Id: Ib070e905f644989f5e3a27fc53632257454560e9
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Chaoyi Chen
1791848c0d drm/rockchip: vop: Remove redundant writeback cleanup
The drm_writeback_queue_job() function takes ownership of the passed
job and requires the caller to manually set the connector state
writeback_job pointer to NULL.

Therefore, there is no need to clear the writeback_job again.

Related commit:
97eb9eaeb9 ("drm: writeback: Cleanup job ownership handling when queuing job")

Change-Id: Ie56de7e3dc617daa629c4d52514ec511ecdfee53
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Chaoyi Chen
51f120552c drm/rockchip: vop: Fix writeback interrupt process
Fixes: f7e3199891 ("drm/rockchip: vop: Add writeback support")
Change-Id: I6740c489e472368be4b081c5490a776de535c5e7
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-13 11:22:43 +00:00
Jian zheng
7b808a6ad8 soc: rockchip: decompress: support user-space usage
allow the absence of memory-region

Signed-off-by: Jian zheng <zj@rock-chips.com>
Change-Id: Ib602badfc2423700614e251eeb376860ae4a1675
2025-08-13 11:04:14 +00:00
Damon Ding
97e3aa256f drm/rockchip: vop2: Remove the flag &vop2->is_iommu_needed
For a specific case, there will be unexpected abnormal display:

If the logo display is disabled and the cubit lut is updated before
refreshing the first frame, the cubit lut function will be abnormal
along with display abnormalities.

The reason is:

The 3D look-up table is allocated via iommu while the flag
&vop2->is_iommu_needed, which to initialize the iommu, is first set
before refreshing the first frame. Therefore, for the above case,
the cubit lut function is working without iommu initialized.

Through analysis of the code logic, we found that the flag
&vop2->is_iommu_needed is redundant. After removing it, the iommu
will be enabled at the same time as the first atomic flush
operation, which may refresh the frame or not.

What's more, this method also help to avoid the cubit lut abnormal
issue in above case.

Change-Id: I196c1652798164690bedbe6cc4c5fce265f1e178
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-08-13 10:57:25 +00:00
Hisping Lin
4a8f31cec6 nvmem: rockchip-secure-otp: Resolve compilation errors
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: I4ed285797a667b9721a09885556f7d0fb31869c1
2025-08-13 01:59:01 +00:00
Chaoyi Chen
89603c13c5 drm/rockchip: vop2: Remove background property for cluster window
The background of the cluster window can not be processed with csc.
Remove background property setting for them.

Change-Id: Idb4e47e327dd33536436df36eae6c5dbbfecafa7
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-08-12 11:14:17 +00:00