Disable overdrive opps by default, and enable them in board dts if
use overdrive mode.
Change-Id: I6db9bd54b727aa3723a2cf46e1b5bd40bdeca0d9
Signed-off-by: Liang Chen <cl@rock-chips.com>
When using the ZME algorithm for scaling, the scaling config needs to
be adjusted to ensure performance:
If plane height >= half of display height:
- Use gt4 when down-scaling ratio > 8×
- Use gt2 when down-scaling ratio > 4×
Otherwise:
- Use gt4 when down-scaling ratio > 6×
- Use gt2 when down-scaling ratio > 3×
Change-Id: I50ce653134dc697d64134ce7aa8f98a2d0e8262b
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
When sample rate changes, a reset operation is performed, and another
reset occurs after debouncing. This results in less data being read
by upper layer, thus triggering an underrun condition.
Therefore, remove reset operation in rk_spdifrx_trigger. Meanwhile,
when sample rate changes, disable dma enable, and after debouncing
completes, notify upper layer via stop_xrun to restart, then enable
dma to resume data transfer.
Change-Id: Ie112ed83018722d069bd85d181f609c4bf865027
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
Add a debounce timer to prevent continuous reporting of SYNC/NSYNC
information during plug-in and unplug operations.
Add the capability to detect non-linear pcm data and sample bit width,
then notify the application layer of the results.
Add a fifo timer to detect real-time data inflow in the rx fifo,
supporting glitch-free sampling rate transitions.
Add a configuration option for the always-on clock feature.
Change-Id: Ifb7bd55e9eefb6e07d00e16de12abff43d7e4d4e
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
Obtain the transmitter's sample rate through channel status bits,
and use the CDRST register and MCLK to estimate the sample rate.
Notify sync and sample rate information through controls.The control
names are "RK SPDIFRX SYNC STATUS" and "RK SPDIFRX SAMPLE RATE". The
application layer needs to monitor the controls and read the control
values to obtain the information.
For the sync control, 0 indicates an unlocked state, and 1 indicates
a locked state. The sample rate control has two values, the first
represents the sample rate obtained from the channel status, and the
second represents the estimated sample rate.
Change-Id: Ie3b4f009c55d326c4517996efa46e6e2e31c7d65
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
If the rockchip,dp-lane-mux property is config in dts, it mean
DP function is used, but the USB function may not be used. It
may be cause cmn ana lcpll lock timeout when initialize phy but
USB function is not used. So just init the phy mode with USB
function when u3-port node is enabled.
If the rockchip,dp-lane-mux property is not in dts, it mean
USB function is used, but the DP function is depend on DP Alt
mode support by sink. If not sink device is disconnected and
force to access DPTX controller register after initialize phy,
The DP function should config, if not config the DPTX controller
register can't be access. So if dp-port node is enabled, init
the phy mode with DP function.
Change-Id: I8aa7ab41d962a50dcdf6dffcf27070a6c6112efe
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
When the serdes-init-sequence is not configured, serdes_init_seq is
a null pointer. However, some serdes initializations do not require
the serdes_init_seq configuration, so the driver needs to execute
normally even when the serdes-init-sequence is not configured.
Change-Id: Id01f0921c9050db5c20f6ad075ddd47891f68bcb
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
Some EMMC devices only have one hardware queue, and CMD13 can only
query one slot at a time to transmit data, which cannot be processed
in parallel. The CMD13 query interval can be modified to increase
query frequency and improve random write performance.
Change-Id: I5f8cfd9d62228e62fd0ad71d7b69698d80b21f80
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
For split mode, we will update the &drm_display_mode in
&drm_connector_helper_funcs.get_modes() earlier. However, as for
non-split mode, the &drm_display_mode->crtc_clock may be 0, which
make the bandwidth check always pass. It should be reasonable to
use &drm_display_mode.crtc instead of &drm_display_mode.crtc_clock
for bandwidth check.
Fixes: b935b0aa0c ("drm/rockchip: analogix_dp: use mode crtc_* timing for hardware config")
Change-Id: Iee9681e15eeeb765957dbd127cbca19d4be405c8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Add a dp_status node to dump more debug info, include
hpd status, link status, video status, msa status, sdp
status.
Change-Id: I130f08238396bb891f2fab2bbdf76b33858ef8c2
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
The DPTX may be not create a drm connector, or it will create
more than 1 drm connector when work in MST mode. So it's better
to create a debugfs directory for the DPTX driver. A drm
encoder is necessary for DPTX driver and the drm connector is
optional, So the debug node add when drm encoder late register
state.
Change-Id: I7515872aebc0101611a9afa393765a8bd478699d
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Replace the dev_dbg with drm_dbg_dp, it will dump the debug log
more easily. Just adjust the drm debug log level, set the bit[9]
as follow:
echo 0x100 > /sys/module/drm/parameters/debug
Change-Id: I3b522d542f043a79fab652d017dfb7e11f67fb74
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
When the display mode change from HDR to SDR but the vsc sdp and
hdr infoframe still send after exit HDR mode, the picture quality
will be abnormal. It need disable sdp when disable video stream.
Fixes: 0ac9316547 ("Revert "drm/rockchip: dw-dp: reset dp controller status"")
Change-Id: I060e8d8e6c9765b71831d08060a1d3ed097bbefa
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
When vop power on, the WB_COMPLETE_INTR is active. Clear it before
use writeback. Otherwise the interrupt will be triggered immediately
after being enabled.
Change-Id: If54ca15597b8cfcf644a2bfb1ce127fd5d8c3caf
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Support SDP bank regs as readable for debug scenario
Change-Id: I831454e9f5de2f5f7438576b530eb30e8a83b657
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Once the use_os_string flag is set to true for some functions
(e.g. adb/mtp) which need to response the OS string, and then
if we re-bind the ConfigFS gadget to use the other functions
(e.g. hid) which should not to response the OS string, however,
because the use_os_string flag is still true, so the usb gadget
response the OS string descriptor incorrectly, this can cause
the USB device to be unrecognizable on the Windows system.
An example of this as follows:
echo 1 > os_desc/use
ln -s functions/ffs.adb configs/b.1/function0
start adbd
echo "<udc device>" > UDC #succeed
stop adbd
rm configs/b.1/function0
echo 0 > os_desc/use
ln -s functions/hid.gs0 configs/b.1/function0
echo "<udc device>" > UDC #fail to connect on Windows
This patch sets the use_os_string flag to false at bind if
the functions not support OS Descriptors.
Fixes: 87213d388e ("usb: gadget: configfs: OS String support")
Link: https://patchwork.kernel.org/project/linux-usb/patch/1755833769-25434-1-git-send-email-william.wu@rock-chips.com/
Change-Id: I79fce9ad19b5ceaf5ded84894d6b509a3d0c75f4
Signed-off-by: William Wu <william.wu@rock-chips.com>
The main function is to obtain voltage and current, currently used for
testing the input voltage and input current of the RK1820 small board on
the RK3588 to determine the current load.
Change-Id: Ibfe1babfa0a6fba11008a3b19d3c09e354b4674a
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
The memory allocated by dma_alloc_coherent can be mapped using the
matching dma_mmap_coherent interface.
Change-Id: I7289d490771a86985ec5ed19af5c3cbbfb9810c2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>