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>
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>
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
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>
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
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>
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>
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>
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>
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
Add const qualifier to rockchip_drm_driver for immutability and safety.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9d461c702432cf976a0c1413ae1c257faf405f10
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>
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
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>
Added power sequence control for shutdown, suspend and wakeup.
These configurations are hardware-dependent, any modifications should be
consulted with hardware engineers for recommendations.
Change-Id: Id3f72f27e952b4cc2573a45f1a3363b6923daf87
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
(sched_priority = MAX_RT_PRIO - 1) is highest priority of the RT
thread, it may affect RT performance, so use sched_set_fifo_low()
will be better.
Change-Id: I1de7aa5fbc20bd40fbc68956863dfd8c76e7f363
Signed-off-by: Liang Chen <cl@rock-chips.com>
Resolve the crash issue caused by closing serdes pinctrl configuration
in dts.
Change-Id: I0473785d128bf655df9117dc819c502267ffec1e
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
If an extcon event is reported when hdmi is enabled/disabled
while playing hdr videos, Some player app will self-destruct
and restart after receiving the event. This leads to an endless
loop of switching hdmi enable and disable.
The extcon event is normally sent when hdmi plug. Previously,
the extcon event reporting was placed in hdmi enable/disable
to resolve issues related to audio transparent transmission.
The current code has hdmi_codec_plugged_cb has solved the audio
transmission problem, so extcon event is changed back to be
called only when hdmi plug/unplug
Change-Id: I613a0c99a0d33e133280cc6ba3d74760532c7f2f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>