1. RK3566/RK3568/RK3588 VOP different VPs share one overlay logic,
so need use ovl lock to make sure they're mutually exclusive, Except
this three platform, other VOP each VP have independent overlay logic.
2. RK3528 need to reset the p2i_en bit when POST_BUF_EMPTY at
post_buf_empty_work_event(), the vop2_cfg_done() must exclusive with
userspace commit new frame.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I84feb978e00a6c5d32266cd3946610e0cc09868b
The output_type may changed after DP encoder bound to CRTC. For
example, when performing modeset, calling vop2_crtc_atomic_disable()
will clear the output_type to zero. When drm_mode_getconnector() is
called again, since the encoder has already been bound to the CRTC,
the output_type will not be set and will remain zero. It can lead to
the vop2_crtc_mode_valid() being unable to retrieve the correct
output_type.
This patch set output_type in dw_dp_encoder_mode_valid(), regardless
of whether encoder is already bound to a CRTC.
Change-Id: I1888d4cc44604072bbf0cbe67a0d21fa8303b7b0
Signed-off-by: chaoyi.chen <chaoyi.chen@rock-chips.com>
According to the include/drm/drm_bridge.h, the following functions
are mandatory in atomic mode:
&drm_bridge_funcs.atomic_reset()
&drm_bridge_funcs.atomic_duplicate_state()
&drm_bridge_funcs.atomic_destroy_state()
For some bridge drivers that have not supported atomic mode yet:
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/bridge/rk630-tve.c
......
The drm_atomic_get_bridge_state() should not be called to get the
bridge state by the global atomic state. Without this patch, the null
pointer exception will occur.
Fixes: 3558926745 ("drm/rockchip: logo: call drm_atomic_bridge_chain_check() bridge in mode fixup")
Change-Id: I68c953db21a95bf5454fc47c65958dee9d13a8ce
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
RK3518 is a Soc base on Rockchip RK3528, the cpu freq
is lower than RK3528 and remove PCIE/RGMII supported.
Change-Id: I9334959b598ece349dfce7e2b922cf91562c61ac
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
* commit '8edba5a8bcc509e3c391ba57291a18a3ef483cdc':
ASoC: rockchip: dlp: Fix loopback capture data loss
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
arm64: dts: rockchip: rk3576-amp: Modify the address of the reserved-memory to ease the MCU's address remapping.
video: rockchip: vehicle: switch to using gpiod API
ARM: configs: rk3506_defconfig: support keyboard matrix
Change-Id: I66a98a62bedb2ca3a5a9a6eb49da22bea32320a9
When applptr exceeds buffer boundaries, the calculated offset
becomes misaligned with the actual buffer position, causing
loopback capture data loss.
This patch fix it by applying boundary checks during applptr updates.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I7c6497a9aa7e12e9b3e1c14dcc6de74bbc1515e2
This code has been removed in the upstream version, but it's left
in the internal project.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4d41bfa646df698d24d38c98244529f8ea53f47e
* commit 'bb4832d4dc32476eac184ee48b1c05572a01bc8a':
media: i2c: rk628: post process add yuv2020 to rgb
ASoC: rk312x: Remove unused code
media: rockchip: vicap fixes error of parse data type
PM / devfreq: rockchip_dmc: Use new api to adjust opp table for rk3528
arm64: dts: rockchip: rk3528: Add 324MHz and 666MHz for dmc
ASoC: es8323: Fix power consumption
Change-Id: Ia776f4db082c8f6713993b0a67f89aa569d93672
According to deepseek suggestion, fix the following potential issues:
1. drm_gem_object_init() does not check the return value,
causing memory leak;
2. The alloc_kmap flag maybe overwritten by an error in
rockchip_gem_create_with_handle();
3. Resource leak exists in rockchip_gem_prime_import_sg_table();
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I998feace191784638bf68bf53f57ff74c4ecf6dd
The relationships between the main window and the splice window are:
Main | Splice
Cluster0 | Cluster1
Cluster2 | Cluster3
Esmart0 | Esmart1
Esmart2 | Esmart3
The VP0 and VP1 should be used in combination when the display mode is
over 4k. The main window should attach to the VP0, while the splice
window should attach to the other.
Without this patch, the default plane_mask may not meet the above
requirement when the plane_mask is not assigned in DTS.
Change-Id: Ia676f519ce26d579b1066841715fe8678dc15852
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
There is no need to do dwc2_core_init() for Rockchip SOCs if the
logic is not powered off after system suspend. If the logic is
powered off after system suspend, we will reinitialize the core
in dwc2_resume() function.
Change-Id: Ibe6d0e81e5a39feca528c838c187cfe8c31269f5
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
* commit '8f68e85c3d9d8d7cbf20e299d61dc945ba11180e': (90 commits)
ASoC: rockchip: pdm_v2: set 0dB gain as default
media: rockchip: isp support to adjust sof_cnt according to vicap sof
media: rockchip: vicap increase frame_idx and sof according to mipi fs package
drm/rockchip: vop2: Fix incorrect ref_count for rk3576 cluster_pd
drm/bridge: synopsys: dw-hdmi-qp: Fix AVI checksum error in vsi quirk
drm/rockchip: vop: move devm_request_irq to the end of vop_bind
media: rockchip: vicap modify logic of sof
media: rockchip: isp: multi-sensor online info to vicap
arm64: dts: rockchip: rk3576-evb1: add pcie1 config
ARM: dts: rockchip: rk3502: enable low power mode for rk3502 otg0 port
phy: rockchip: inno-usb2: disable vbus detection in low power mode
media: i2c: tp2855: move from strlcpy with unused retval to strscpy
media: i2c: tc35874x: move from strlcpy with unused retval to strscpy
media: i2c: sc500ai: move from strlcpy with unused retval to strscpy
media: i2c: sc430cs: move from strlcpy with unused retval to strscpy
media: i2c: sc4238: move from strlcpy with unused retval to strscpy
media: i2c: sc2310: move from strlcpy with unused retval to strscpy
media: i2c: sc2239: move from strlcpy with unused retval to strscpy
media: i2c: sc2232: move from strlcpy with unused retval to strscpy
media: i2c: sc210iot: move from strlcpy with unused retval to strscpy
...
Change-Id: I878d34e574a85eaeae80163ca68bfc410802d6b7
mean sometimes dma capture is turned off because not active buf,but increase frame_idx to record frame loss
the function start with rk3576 and new chip
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie5be72b2ba3372a511c462853fc705a5c8b1e9d7
1. The 4 ESMART win share one PD_ESMART and 2 CLUSTER win share one
PD_CLUSTER
2. The 4 ESMART win and 2 CLUSTER win maybe used by different VP
3. Different VP have different vsync, this maybe lead to PD up and
down at unexpected time.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iaa3d72df880180a9d73476551f31b7adaa76e967
At MOS environment, the irq handle may be triggered immediately
after request irq, the irq handle maybe access vop memory, e.g.,
vop_isr() -> vop_wb_handler() access vop->wb->regs, so move
devm_request_irq() to the end of this function to make sure vop is
initialized.
Change-Id: Ie124576bf2333f63ec3985c321a3c368e28b34be
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
skip sof and frame_index when loss frame, only work in multi online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib9739dec0674deac0c0ad182f6836f9edf858212