In rkvdec2_link hard ccu worker, the tasks may resend to hw when
decoder reset.There is a bug: the task that resend to hw may be re-add
to running_list.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6aa77213d3f5cc805c24d39b5c5d13269297d749
list_del error for curr_buf to buf_queue list and buf_done_list
pc : list_del+0x4/0x24
lr : destroy_buf_queue+0x170/0x188
Change-Id: Iede1ab20e30d25f4059b39e7896e1a89b3f03f67
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
drivers/soc/rockchip/rockchip_amp.c:257:5: warning: no previous prototype for 'rockchip_amp_check_amp_irq' [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip_amp.c:262:5: warning: no previous prototype for 'rockchip_amp_get_irq_prio' [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip_amp.c:267:5: warning: no previous prototype for 'rockchip_amp_get_irq_cpumask' [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip_amp.c:489:6: warning: no previous prototype for 'rockchip_amp_get_gic_info' [-Wmissing-prototypes]
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I42ef41e8dc9fabcba90493ca56df435278614208
1. add regulotor control to fix open i2c error issue.
2. fix move time unit to ms not us.
3. optimize open/close procedure, reduce vcm collision noise.
4. use v4l2_dbg replace dev_dbg for dynamic print debug info.
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I20c65ef2d4623b6338699874c4c05b42d9d2d863
Add a new 'snps,parkmode-disable-hs-quirk' DT quirk to dwc3 core for
disable the high-speed parkmode.
For some USB wifi devices, if enable this feature it will reduce the
performance. Therefore, add an option for disabling HS park mode by
device-tree.
In Synopsys's dwc3 data book:
In a few high speed devices when an IN request is sent within 900ns of the
ACK of the previous packet, these devices send a NAK. When connected to
these devices, if required, the software can disable the park mode if you
see performance drop in your system. When park mode is disabled,
pipelining of multiple packet is disabled and instead one packet at a time
is requested by the scheduler. This allows up to 12 NAKs in a micro-frame
and improves performance of these slow devices.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
Link: https://lore.kernel.org/r/20230419020044.15475-2-stanley_chang@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry-pick from commit 4a2f152af1)
Change-Id: I8bffdfe134e644b705da78eaf16946aff80e5e80
When V2 tuning returns an error, it is necessary to reset
the ret to 0, otherwise the incorrect value will be returned.
log:
[ 4.935664] mmc0: tuning execution failed: -5
Fixes: 795e052cc8 ("mmc: dw_mmc-rockchip: add v2 tuning support")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I54a77e02255d88114191e8abc434856b34768715
This patch set the i2s3 to be master mode, while the bt must to be
slave mode.
The mclk rate is 24.576MHz from mclkin pin.
The setting for bt:
NBS:
Slave
LRCK 8k
BCLK 512kHz
I2S
clk inverted
WBS:
Slave
LRCK 16k
BCLK 1024kHz
I2S
clk inverted
Change-Id: I866ea471a2db5e39623cebeb4110ea2a639fbeba
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Fixes: 841fa2175d ("arm64: dts: rockchip: rk3568 separate the node of csi2 and hw")
Change-Id: I16a05ac90044e9aad1338827ac33146bb4f2bc71
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Since there is no txdone irq in the Rockchip mailbox IP, invoking
mbox_chan_txdone()/mbox_client_txdone() after mbox_send_message()
to tick the TX would be free the active request which have not been
sent out if the controller returned the EBUSY state before. So amend
the txdone method to polling to fix it.
The TX polling interval can specify in mailbox DT with
set "rockchip,txpoll-period-ms" property to 1 milliseconds.
Fixes: b5795e81ec ("rpmsg: rockchip: add Rockchip RPMsg Platform Support")
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I9d15ed4a61cda049c7804e2688e79f157de1c5a2
This series in order to have the default MMC alias.
The mmc default alias:
mmc0 = &sdhci;
mmc1 = &sdmmc0;
mmc2 = &sdmmc1;
The Linux OS have the post-build.sh to handle the rootfs,
and export RK_EXTRA_PARTITIONS for setting the PARTITIONS.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I28ae38a7aaf35c6f584879c19a339ff6079d059d
boot-on is absent or boot-on = <1>: bring up this cpu when driver probe.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0157e72b53f5c35e5478408804a72bab5fd02837
Program/Erase/Read Speed
– Page Program time : 450us typical
– BLOCK ERASE time : 4ms typical
– PAGE READ time : 120us maximum (without ECC)
Change-Id: I0c5bc9827788938df028e525e331c0db8d041676
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
When hdmi is disabled, relevant clocks have been turned off.
Accessing hdmi registers may cause crash.
Change-Id: Id5370641aac15d317d2e820aeac053a1bcf016a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
In order to improve stability for some chips.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia09d9e6d455e7dd932c84f4d7815c95dda83a6d6
Some high speed devices performance drop drastically on
Rockchip platforms when connected with DWC3-xHCI controller.
It's because that the DWC3 controller enable high speed
park mode by default, it aims to improve performance with
pipelining of multiple packet. However, for some devices
(such as UVC with bulk transfer VID:04b4, PID:02f9),
when an IN request is sent within 900ns of the ACK of the
previous packet, these devices NAKs more than 3 times, it
could decrease the performance.
These slow devices include:
1. idVendor=04b4, idProduct=02f9, Product: IRay UVC
2. idVendor=1921, idProduct=21863, Product: Sandisk
3. idVendor=3744, idProduct=8552, Manufacturer: Flex Drive
In order to improve compatibility with high speed devices,
this patch disable HS park mode for USB DWC3 controller on
all arm64 SoCs.
With this patch, we test RK3588 with one slow device
(IRay UVC VID:04b4, PID:02f9) and three fast devices
(U2 disk VID:058f, PID:6387; U2 disk VID:0781, PID:557c;
U3 disk VID:174c, PID:55aa), all of these device have
no performance loss.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0ac37e7af429392f65f339cf1448cf2958e03b57
Some high speed devices performance drop drastically on
Rockchip platforms when connected with DWC3-xHCI controller.
It's because that the DWC3 controller enable high speed
park mode by default, it aims to improve performance with
pipelining of multiple packet. However, for some devices
(such as UVC with bulk transfer VID:04b4, PID:02f9),
when an IN request is sent within 900ns of the ACK of the
previous packet, these devices NAKs more than 3 times, it
could decrease the performance.
These slow devices include:
1. idVendor=04b4, idProduct=02f9, Product: IRay UVC
2. idVendor=1921, idProduct=21863, Product: Sandisk
3. idVendor=3744, idProduct=8552, Manufacturer: Flex Drive
In order to improve compatibility with high speed devices,
this patch disable HS park mode for USB DWC3 controller on
all arm64 SoCs.
With this patch, we test RK3588 with one slow device
(IRay UVC VID:04b4, PID:02f9) and three fast devices
(U2 disk VID:058f, PID:6387; U2 disk VID:0781, PID:557c;
U3 disk VID:174c, PID:55aa), all of these device have
no performance loss.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I9037143fa2553317ad7ae55abeafad3b106cafcb
Setting the PARKMODE_DISABLE_HS bit in the DWC3_USB3_GUCTL1.
When this bit is set to '1' all HS bus instances in park mode are disabled
For some USB wifi devices, if enable this feature it will reduce the
performance. Therefore, add an option for disabling HS park mode by
device-tree.
In Synopsys's dwc3 data book:
In a few high speed devices when an IN request is sent within 900ns of the
ACK of the previous packet, these devices send a NAK. When connected to
these devices, if required, the software can disable the park mode if you
see performance drop in your system. When park mode is disabled,
pipelining of multiple packet is disabled and instead one packet at a time
is requested by the scheduler. This allows up to 12 NAKs in a micro-frame
and improves performance of these slow devices.
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
Link: https://lore.kernel.org/r/20230419020044.15475-1-stanley_chang@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry-pick from commit d21a797a3e)
Change-Id: I43ee416e54779a073a0ba4057edf4be8bd7886de
multi sensor share same tb info buf, and this buf will
overwrittern when first sensor stream on but second fast_work
schedule slowly. So to save tb info for all dev at first read.
Change-Id: I335b9e3bd317202a348be17965be112a1259bb3e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.
Another approach is to enable the regcache true to
avoid access HW registers.
Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib3d5daecad8491f05a3612a2cb02742ec31e4899
MUST: after pm_runtime_enable step, any register R/W
should be wrapped with pm_runtime_get_sync/put.
Another approach is to enable the regcache true to
avoid access HW registers.
Alternatively, performing the registers R/W before
pm_runtime_enable is also a good option.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I9c495361fcb7fb0a06fe1538d05b94617e332756
HWP_EN must be enabled first before block unlock region is set.
Change-Id: I6b107d97de48bb2644da865f353d2adace95224e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>