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>
During the long-term loop playback test of videos stored in the
USB flash drive, it was found that the Teclast CoolFlash drive
(idVendor=346d, idProduct=5678) disconnects abnormally, and the
serial port reports the following error messages.
[ T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for setup device command
[ T227] usb 2-1: device not accepting address 2, error -62
[ T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for setup device command
[ T227] usb 2-1: device not accepting address 2, error -62
[ T7577] xhci-hcd xhci-hcd.7.auto: xHCI host not responding to stop endpoint command
[ T7577] xhci-hcd xhci-hcd.7.auto: xHCI host controller not responding, assume dead
[ T7577] xhci-hcd xhci-hcd.7.auto: HC died; cleaning up
[ T227] xhci-hcd xhci-hcd.7.auto: Timeout while waiting for stop endpoint command
[ T7578] usb 2-1: USB disconnect, device number 2
[ T227] sd 1:0:0:0: [sde] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=DRIVER_OK cmd_age=27s
Adding this quirk to limit max_sectors to 64 sectors to avoid issue
occurring.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ie2f72a5d95e566818789f1280452cad239a57d62
Because the call:
platform_set_drvdata(pdev, am_d);
in aoa_mmap_probe() is overwritten by the subsequent call:
platform_set_drvdata(pdev, amw_d);
therefore, the am_d handle needs to be saved separately. Also, previously allocated IRQ and
platform resources must be released.
And, fix the issue where repeated insmod operations couldn't be performed due to resource usage.
After successfully executing the command `insmod rk_aoa.ko` for the first time,
executing `rmmod rk_aoa` to uninstall the file and then executing `insmod rk_aoa.ko`
again will result in the following error:
----
[ 93.352370] platform 208b0000.aoa: can't request region for resource [mem 0x208b0000-0x208b0fff]
[ 93.352401] aoa-middleware aoa_middleware: probe rockchip aoa failed: -16
[ 93.352411] aoa-middleware: probe of aoa_middleware failed with error -16
----
Furthermore, the pdev functions for aoa_drv and lp_rkdma are manually probed via
aoa_middleware and cannot be automatically released via the devm mechanism.
Therefore, you must manually allocate resources in the probe function and release
them manually in the remove function.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I454c970de620f1dc7007bf530e2e0650c81066e4
Some master device resume early but the iommu has not yet resume, which
will cause the iommu to be inaccessible.
So set LATE_SYSTEM_SLEEP_PM_OPS for iommu pm ops, which will resume early and suspend late.
Change-Id: I9424198900a56004098e8cf6c3194baa62eeda09
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
In kernel 6.1 and later versions, the property 'clk-trcm' has been updated:
rockchip,clk-trcm -> rockchip,trcm-sync-tx/rx-only
Not all products' DT have been updated to use the new property. Therefore,
still support for old property for now, and a prompt is logged to suggest
to adopt the new property.
The old property will be removed in a future version.
Log:
Deprecated property 'rockchip,clk-trcm', please use 'rockchip,trcm-sync-tx/rx-only' in DT
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I594ba932486440d6eefc65abb54516d530ad090b