Commit Graph

1280718 Commits

Author SHA1 Message Date
Algea Cao
fabdf68c81 drm/rockchip: drv: Support parse allm capbility in scds
Change-Id: I3d6e4ccecffe99bfcf4e5ca5e62225dd7210c3dd
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 10:46:25 +00:00
Algea Cao
944abbb10a drm/rockchip: drv: Add struct rockchip_drm_hdmi21_data
All hdmi 2.1 contents in the edid are saved in this
struct.

Change-Id: I2400fb9fe77163667419677ca3f55e88d795d2be
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 10:46:09 +00:00
Algea Cao
7915220fed drm/rockchip: drv: Remove parse_edid_forum_vsdb
The HDMI spec 10.3.2 talks about SCDS, Sink Capability Data
Structure, exposed via HF-VSDB or HF-SCDB. The actual content
of the them is same. So it needs only one parse function.

Change-Id: I61459b6d21d7e0666c1561bb2ad41729e0d00a49
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 18:44:38 +08:00
Yu Qiaowei
5f5900c350 video: rockchip: rga3: add RGA3 sys_reg debug log
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I4260ad0729bfdfaaaa0a0844cf8c84b61bf4635b
2025-03-26 10:29:18 +00:00
Yu Qiaowei
3b0e000a6f video: rockchip: rga3: print debug log before check param
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8bcc8f0b79b354e60076d1d1b9991c60e7581dc2
2025-03-26 10:29:07 +00:00
Yu Qiaowei
455fbd6ef9 video: rockchip: rga3: fix typo in win1_param check during RGA3 rotation
Fixes: 0b97d73d8e ("video: rockchip: rga3: fix the wrong check of resolution in RGA3 rotating")

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I27fd66c5ad2aa9ea9ea4495647c6c8aae1e21264
2025-03-26 10:28:59 +00:00
Zefa Chen
9bd09ac33f media: rockchip: vicap: fixes error data type of rgb888 for rk3576
Change-Id: I3fe6c6a4a35247494085d70bb2ab7dfdd1f8fc03
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-03-26 15:08:39 +08:00
Mark Huang
aaa8aa56db arm64: dts: rockchip: rk3576-evb1-v10-projector: add rk628 hdmi2csi config
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: Ib37212736f0a61b0db958b3f56add296dfb1e7bb
2025-03-26 11:54:18 +08:00
Mark Huang
53854c082b arm64: dts: rockchip: Add rk3576 evb1 v10 projector board
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I108c84755ce4ce9f1472d9e86ca2c771e5f857c4
(cherry picked from commit ca6f21b740)
2025-03-26 10:23:05 +08:00
Shunhua Lan
f4718c6fd1 ASoC: codecs: Add driver for codec es8390
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ibac594e504b82a515f355f37ca9dd3e8d308b630
2025-03-25 11:36:02 +00:00
Shunhua Lan
1136fd6608 media: i2c: rk628: fix g_volatile_ctrl return value
g_volatile_ctrl should return 0 if no error

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I8f9d338a0a0421ba65940a0275d1f4378bc31504
2025-03-25 11:34:21 +00:00
Zhang Yubing
fc8a056676 drm/rockchip: vop2: get the real dclk parent
When assign the vp dclk parent as hdmi phy pll in dts. The
vp dclk parent should get by clk_get_parent. The vp.dclk_parent
is not the real parent.

Change-Id: I4b1ba1e1b46e2f5db323069402c4b322ba4a836f
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-03-25 06:52:25 +00:00
Algea Cao
f9e84f307a drm/bridge: synopsys: dw-hdmi-qp: Enable dsc according to actual situation
1.Determine whether to enable dsc based on the current resolution
and color format.

2.Determine the dsc format of the output according to the
capability of sink.

Change-Id: If7a1c88ea1b6ec0208c9dc9d91a56376ff656707
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-24 17:37:25 +08:00
Algea Cao
d1f66b40c0 drm/rockchip: vop2: Support hdmi dsc bpp below 9
When the dsc bpp is less than 9, hdmi output will flash on TV.
It is speculated that the reason is that pixel rate of sink
decoding is not enough.

Taking 8bpp as an example, dsc clk needs to be 1/3 of the input
clk.the theoretical calculation of DEN compression 1/3, at this
time, the clk of vop dsc to hdmi tx can be reduced to about 260M
to meet the 8bpp transmission.

RK3588 dsc clk only supports 1/2 frequency division, so dsc clk
is 1/2 input clk, which needs to increase blank, which is
equivalent to compressing the absolute DEN time. TV is likely to
decode at a decoding rate of around 260M. DEN absolute time
shortening results in abnormal TV decoding.

So the value of hblank needs to be reduced when bpp is below 9.
The measurement can be displayed normally on TV, but reducing
the hblank will result in non-standard timing of the hdmi output.
This may cause compatibility issues and hdmi cts certification
may fail.

Change-Id: I6cd7890c62980c29322c437b20fb048fe0acbae3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-24 17:37:25 +08:00
Damon Ding
131fb30229 drm/rockchip: rgb: update the check for clearing old output_if
In order to cover more application scenarios, when the crtc changes,
the old output_if should be cleared, rather than when the flag
&drm_crtc_state.active_changed is set to 1.

In addition, it would be more reasonable to name new crtc to 'new_crtc'
rather than 'crtc'.

Change-Id: I6821e85b0b6f1152cea3057ebb6f3ec9b821ebee
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Damon Ding
f486e2b73d drm/rockchip: analogix_dp: update the check for clearing old output_if
In order to cover more application scenarios, when the crtc changes,
the old output_if should be cleared, rather than when the flag
&drm_crtc_state.active_changed is set to 1.

In addition, it would be more reasonable to name new crtc to 'new_crtc'
rather than 'crtc'.

Change-Id: I5376c44eb5deab75acdbae95782cc5de2e2757d5
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Damon Ding
f897ad4b39 drm/rockchip: analogix_dp: use the unified function to get new crtc from encoder
Replace the rockchip_dp_drm_get_new_crtc() by the existing function
drm_atomic_get_new_crtc_for_encoder(), which defined in common Rockchip
DRM driver file 'drivers/gpu/drm/rockchip/rockchip_drm_drv.c'.

Change-Id: I011dc70b5e7e927a201c80cc8ecb15dbef446631
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Sandy Huang
d02a383e7c drm/rockchip: drv: remove unused commit_lock
struct mutex commit_lock is only used by kernel 4.19,
use ovl_lock now.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id7eb81fac31026956eeb9b8799b7d8281e4de4c2
2025-03-24 09:00:21 +00:00
Damon Ding
b0d79ebe70 drm/rockchip: logo: support to use the win scale to configure overscan parameters
For some platforms, such as RK3576, use the win scale instead
of the post scale to configure overscan parameters, because the
sharp/post scale/split functions are mutually exclusice.

Change-Id: If422749ed8defc553924f14f24ab173913b2dcad
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-21 18:39:35 +08:00
XiaoDong Huang
703b39bceb soc: rockchip: pm_debug: support to dump common registers
Change-Id: If1a731248fb332f6e22a9a9c8708cec53d52216f
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2025-03-21 17:43:05 +08:00
Liang Chen
6e62a23828 arm64: dts: rockchip: rk3576s: enable usb30 port1
Change-Id: I72b325103b67414f24af2177374a217d4ac8f7df
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-03-21 08:41:34 +00:00
Sandy Huang
1c2dcc6d2b arm64: dts: rockchip: rk3576-vehicle-evb-v20-serdes-mfd-display-maxim: remove assigned VPLL clk rate
VPLL is initialized at uboot for dclk, If kernel assigned VPLL clk rate
and different with uboot set rate, this will lead to VPLL reinitialized
and lead to splash screen.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I501bf982b6016841ea046325d692aee73618357b
2025-03-21 08:41:03 +00:00
Damon Ding
635a7a4081 drm/rockchip: vop2: fix the default one display policy for RK3588
If only one VP is enabled and the plane mask is not assigned in DTS, all
main windows will be assigned to the enabled VPx, and all splice windows
will be assigned to the VPx+1, in order to ensure that the splice mode
work well.

Fixes: a3d2c5d99a ("drm/rockchip: vop2: fix the default plane_make configurations for RK3588")
Change-Id: I37905fb2d2f186f0da503e0cd410a7f620e34bb1
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
e5ce22e75e drm/rockchip: vop2: add support for primary plane check
If the plane mask and primary plane both are assigned in DTS, the
primary plane should be included in the plane mask of VPx.

Change-Id: Ie282782aa6f71a177fd61b507893b256261d4dc3
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
c8de2ce6ad drm/rockchip: vop2: set default primary plane id to ROCKCHIP_VOP2_PHY_ID_INVALID
If the property 'rockchip,plane-mask' exists but the
property 'rockchip,primary-plane' is not set in DTS, the
default &vop2_video_port.primary_plane_phy_id should be
ROCKCHIP_VOP2_PHY_ID_INVALID to avoid unexpected logs.

For RK3576 as example, if the plane_mask is configured as
follows:

&vp0 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
};

&vp1 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
};

&vp2 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_ESMART3 | 1 << ROCKCHIP_VOP2_ESMART2)>;
};

The unexpected logs may appear:
......
[    2.457617][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp0 assign plane mask: Cluster0 | Esmart0[0x5], primary plane phy id: Cluster0[0]
[    2.457652][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp1 assign plane mask: Cluster1 | Esmart1[0xa], primary plane phy id: Cluster0[0]
[    2.457666][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp2 assign plane mask: Esmart2 | Esmart3[0x300], primary plane phy id: Cluster0[0]
......

It is better to be like:
[    2.473158][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp0 assign plane mask: Cluster0 | Esmart0[0x5], primary plane phy id: INVALID[-1]
[    2.473189][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp1 assign plane mask: Cluster1 | Esmart1[0xa], primary plane phy id: INVALID[-1]
[    2.473204][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp2 assign plane mask: Esmart2 | Esmart3[0x300], primary plane phy id: INVALID[-1]

Change-Id: I28d221cce9baa6c1f73e6d73acdd030e92cc88bc
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
63eaeee18e drm/rockchip: vop2: add possible_crtcs check for cursor plane initialization
It makes sense to check whether the assigned cursor plane can be
attached to a specific VP, as there may be an invalid DTS assignment
for 'cursor-win-id'.

The logs may be like:
......
[    2.178737][   T81] rockchip-vop2 27d00000.vop: [drm:vop2_create_crtc] *ERROR* Assigned cursor plane: Esmart3 can not attach to VP0
[    2.178753][   T81] [drm] failed to init cursor plane for vp0
[    2.178823][   T81] rockchip-vop2 27d00000.vop: [drm:vop2_create_crtc] *ERROR* Assigned cursor plane: Esmart2 can not attach to VP1
[    2.178838][   T81] [drm] failed to init cursor plane for vp1
......

Change-Id: If18c4db1e8b295e72dae0c23bd0dd41203c4e3ac
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
708010d987 drm/rockchip: vop2: add support to assign plane_mask for RK3528/RK3562/RK3576
RK3528/RK3562/RK3576 use the VOP3 architecture, which supports
flexible switching of planes between different VP. User can switch
planes between different CRTCs based on the &drm_plane.possible_crtcs
in userspace, and the plane-mask does not need to be assigned by
default in DTS.

However, for some Linux systems, there may still be scenarios where
it is necessary to specify the primary and cursor planes specifically
used on a VP.

Therefore, the valid plane-mask assignment will change the
&drm_plane.possible_crtcs and establish a fixed binding relationship
between planes and CRTCs, which means that the flexible switching of
planes is not available in the case.

Change-Id: I156f71ceb238c5945a92f48c0024f398711ea811
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Ye Zhang
5043d1a786 soc: rockchip: pm_debug: Fix rk3506_table
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I4afb7a9f051d400ce59a833dbddb4a363f8a9b66
2025-03-20 08:55:41 +00:00
Wesley Yao
70ddbe74d3 iio: dac: rockchip-flexbus-dac: Add resume
Add resume for rockchip-flexbus-dac.

Change-Id: Iee7095fb626f8a759d353958bcb74151482adaea
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Wesley Yao
c9b483027e iio: adc: rockchip-flexbus-adc: Add resume
Add resume for rockchip-flexbus-adc.

Change-Id: Ieac70ecffa68bbb940f6a837cdbb3b7d5e4a4637
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Wesley Yao
ba1c3b949b mfd: rockchip-flexbus: Add resume
Add resume for rockchip-flexbus.

Change-Id: I2a87064e4267839f2daccbcc2e28b9d5786bf6f4
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Tao Huang
a26e159e16 usb: gadget: uvc: Add MODULE_IMPORT_NS(DMA_BUF)
Adds the proper MODULE_IMPORT_NS(DMA_BUF) line to the file to get it to
build properly.

Fixes: 5452a06eed ("usb: gadget: uvc: support zero copy with rockchip encoder")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iab7fe8977389cd7b3e624a231011ea07d7b6d936
2025-03-20 10:15:40 +08:00
Sandy Huang
2de761a61d drm/rockchip: drv: Constify struct drm_driver
Add const qualifier to rockchip_drm_driver for immutability and safety.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9d461c702432cf976a0c1413ae1c257faf405f10
2025-03-19 11:30:53 +00:00
Damon Ding
3f74be339b drm/bridge: analogix_dp: fix the disabling process of ASSR function
The DP_EDP_CONFIGURATION_SET should be configured instead of the
DP_LANE_COUNT_SET register to disable ASSR.

Fixes: 3ae279210e ("drm/bridge: analogix_dp: add support for ASSR mode")
Change-Id: I1dc36bd3dbfdeb09cde761c6905e22feba52558a
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-19 11:27:12 +00:00
Jon Lin
bf69e15bdc phy: rockchip: naneng-combphy: Set rk3562 gate_tx_pck_sel length select work for L1SS
Change-Id: I18a163b70d9387a9b8b9ca2cb24dc95780592761
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-03-19 11:26:41 +00:00
Jon Lin
7ce9fd357d phy: rockchip: naneng-combphy: Set rk3528 gate_tx_pck_sel length select work for L1SS
Change-Id: Icfdd47d3cce5c112bd366f5b82327f67c863590d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-03-19 11:26:15 +00:00
Joseph Chen
1dfea63d6f ARM: dts: rockchip: rk3506g-demo-display-control: Update system suspend config
- Mode add: RKPM_PWM0_CH0_CORE_PWREN
- Update pwrctrl

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I413a57ffab294f080ece58b273667ad7ca3dd0e1
2025-03-19 07:12:31 +00:00
Finley Xiao
b6535e57a2 arm64: dts: rockchip: rk3518: Change mbist vmin for cpu
Change-Id: Ib44cb574bbdcfd2cc4c8b9de24ea149a0bccc95e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2025-03-18 03:23:56 +00:00
Jon Lin
cd6dd0098a drivers: rkflash: Fix the method to get GD5FXGM7xxG ecc status register
Change-Id: Ie8797e91b24bf3dae95b98ff7d04e5639019a04c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-03-17 10:23:21 +00:00
Huang zhibao
6c4bafdb4b arm64: dts: rockchip: add rk3562 project demo Devicetree
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I7e0aa5e16cb3d678d0be43605c0c957f1914102d
2025-03-17 17:49:43 +08:00
Zefa Chen
032de5f2b3 media: i2c: add gc32e1 driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I39717f9956da197099ebc78ecb1181784c5beb44
2025-03-17 11:02:57 +08:00
Zefa Chen
8e4a7e85a7 media: i2c: add gc16b3c driver
Change-Id: I2785bf29b36d377e159fb9431cdedbcf9d456ad9
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-03-17 11:02:42 +08:00
Johnson Ding
4a3914c3a6 video: rockchip: mpp: check status after soft reset
If clock is directly turned off during doing soft resetting, NOC may
encountering error, and other IPs will issue some error.

Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I5df74c68faa042a231bc84df3de4d362830bc7c5
2025-03-17 02:18:26 +00:00
Zefa Chen
5bb7b93ed4 media: rockchip: vicap fixes error proc info of reg debug for rk3576
Change-Id: I6604f4218e9e4954e852f94d4334fb1d319b9b8f
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-03-14 18:11:40 +08:00
Zefa Chen
d689024559 media: rockchip: vicap send sof toisp with toisp fs intr when chip is rk3588
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4eef08e7a9f8a94c23f28b8c75f8dea41965a064
2025-03-14 17:46:53 +08:00
Zefa Chen
1105490b4b media: rockchip: vicap remove chip limit of send sof to isp
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0deff3d59afe50e8459b5741e91b3bd40e66fa0c
2025-03-14 17:31:27 +08:00
XiaoDong Huang
67507eac79 firmware: rockchip_sip: support cpu_pm_config
Change-Id: I803f23acc98251743dd5f1e4906492c730320fd9
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2025-03-14 08:55:16 +00:00
Algea Cao
2eeed1b87d drm/rockchip: dw_hdmi: Fix hdmi does not switch seamlessly when hdr colorspace isn't bt2020
Even if colorspace of hdr video is not bt2020, it can be
seamlessly switched to yuv422 10bit in scenarios where
sink supports yuv422.

Change-Id: Ieb2c9a3c17183349caa70d5a3ba07ccf1b14252a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-14 07:39:19 +00:00
Finley Xiao
b9e7be7146 arm64: dts: rockchip: rk3588: Add more hardware version for opp table
Change-Id: Ic2c87cd70427819577daedaddf77f50429204498
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2025-03-14 15:17:26 +08:00
Finley Xiao
23717a4748 soc: rockchip: opp_select: Add support to parse nvmem cell customer demand
Change-Id: I3b13c89517f9b115be4cbce983217c30c1dcb86b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2025-03-14 15:17:20 +08:00