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>
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
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>
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
This patch disable vbus detection in low power mode to save power.
Change-Id: Ic9536d26d6e9d9ab57e4e20b9f43859f445ada0c
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>