According to gki commit 176c157bbe ("ANDROID: GKI: set vfs-only exports into their own namespace").
ERROR: modpost: module cryptodev uses symbol __close_fd from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia796e3c9715468d3a1b7fc89e508ab592b5ebb9f
Fixes: 3b508e8fe4 ("UPSTREAM: usb: dwc3: support 64 bit DMA in platform driver")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4167ba5ce4a9192d70f2841375fbc376ae2cb882
branch android13-5.10 without commit 74f247e31b ("ANDROID: mm: cma: disable LRU cache early")
which is on the branch android12-5.10.
Fixes: 87e8391b85 ("mm/cma: support cma inactive feature")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9c554c75d89aa5052e9970c5b5338dc77c1134de
It contains the following 82894 commits:
UPSTREAM: usb: dwc3: gadget: Move null pinter check to proper place
UPSTREAM: dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
clk: rockchip: rk3588: Add CLK_SET_RATE_PARENT for i2s5/6 frac clk
media: rockchip: isp: fix vicap fast stream on and off
dt-bindings: update SPDX-License-Identifier for rockchip clock header
dt-bindings: update SPDX-License-Identifier for rockchip power header
ASoC: es7202: fix es7202 read & write error
media: i2c: sc430cs support get real fps
media: i2c: sc430cs fixed compile error
media: i2c: sc4238 support get channel info
media: i2c: sc4238 support get real fps
media: i2c: sc4238 fixed compile error
media: i2c: sc2310 support get channel info
media: i2c: sc2310 support get real fps
media: i2c: sc2310 fixed compile error
media: i2c: sc2239 support get real fps
media: i2c: sc2239 fixed compile error
media: i2c: sc2232 support get real fps
media: i2c: sc2232 fixed compile error
media: i2c: sc210iot support get real fps
...
Conflicts:
drivers/android/Kconfig
drivers/dma-buf/dma-buf.c
drivers/irqchip/irq-gic-v3-its.c
drivers/usb/dwc3/gadget.c
sound/soc/rockchip/rockchip_i2s.c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0aa6721d035488a1368205c0437ea2c6452c1bb0
The current limitation of possible number of requests being handled is
dependent on the gadget speed. It makes more sense to depend on the
typical frame size when calculating the number of requests. This patch
is changing this and is using the previous limits as boundaries for
reasonable minimum and maximum number of requests.
For a 1080p jpeg encoded video stream with a maximum imagesize of
e.g. 800kB with a maxburst of 8 and an multiplier of 1 the resulting
number of requests is calculated to 49.
800768 1
nreqs = ------ * -------------- ~= 49
2 (1024 * 8 * 1)
Tested-by: Dan Vacura <w36195@motorola.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220529223848.105914-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 234757296
(cherry picked from commit 87d76b5f1dhttps://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: I0228cbaa56d4e75bed33e1ef721ae3127d779faf
Signed-off-by: Dan Vacura <w36195@motorola.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
If a Setup packet is received but yet to DMA out, the controller will
not process the End Transfer command of any endpoint. Polling of its
DEPCMD.CmdAct may block setting up TRB for Setup packet, causing a
command timeout.
This may occur if the driver doesn’t service the completion interrupt of
the control status stage yet due to system latency, then it won’t
prepare TRB and start the transfer for the next Setup Stage. To the host
side, the control transfer had completed, and the host can send a new
Setup packet at this point.
In the meanwhile, if the driver receives an async call to dequeue a
request (triggering End Transfer) to any endpoint, then the driver will
service that End transfer first, blocking the control status stage
completion handler. Since no TRB is available for the Setup stage, the
Setup packet can’t be DMA’ed out and the End Transfer gets hung.
The driver must not block setting up of the Setup stage. So track and
only issue the End Transfer command only when there’s Setup TRB prepared
so that the controller can DMA out the Setup packet. Delay the End
transfer command if there's no Setup TRB available. This is applicable to
all DWC_usb3x IPs.
Co-developed-by: Wesley Cheng <quic_wcheng@quicinc.com>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220309205402.4467-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 230843866
(cherry picked from commit e4cf6580ac)
Change-Id: I7f643ae340a20f12d5f86965674aa58df1be3979
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
In system_heap_do_allocate, we will use uncached heap device to call
dma_map_sgtable & dma_unmap_sgtable to do implicitly flush.
However, device of uncached heap is not set dma_parms, default value(64KB)
is too small for dma_heap buffer, it will cause some warning log below when
CONFIG_DMA_API_DEBUG_SG is enabled.
warning log sample:
|DMA-API: dma_heap system-uncached: mapping sg segment longer than device claims to support [len=1048576] [max=65536]
|WARNING: CPU: 4 PID: 576 at kernel/dma/debug.c:1173 debug_dma_map_sg+0x214/0x438
|......
Bug: 199986022
Change-Id: I97076de329f4a50d035d43d69cb17606064c3151
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Add a new helper function and export it for vendor module to
dynamically switch to an alternative half-life at runtime.
Bug: 195474490
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: Ife41997a032fe3384cfa126cbf7aee929c5c11cf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
When dwc3_gadget_ep_cleanup_completed_requests() called to
dwc3_gadget_giveback() where the dwc3 lock is released, other thread is
able to execute. In this situation, usb_ep_disable() gets the chance to
clear endpoint descriptor pointer which leds to the null pointer
dereference problem. So needs to move the null pointer check to a proper
place.
Example call stack:
Thread#1:
dwc3_thread_interrupt()
spin_lock
-> dwc3_process_event_buf()
-> dwc3_process_event_entry()
-> dwc3_endpoint_interrupt()
-> dwc3_gadget_endpoint_trbs_complete()
-> dwc3_gadget_ep_cleanup_completed_requests()
...
-> dwc3_giveback()
spin_unlock
Thread#2 executes
Thread#2:
configfs_composite_disconnect()
-> __composite_disconnect()
-> ffs_func_disable()
-> ffs_func_set_alt()
-> ffs_func_eps_disable()
-> usb_ep_disable()
wait for dwc3 spin_lock
Thread#1 released lock
clear endpoint.desc
Fixes: 2628844812 ("usb: dwc3: gadget: Fix null pointer exception")
Cc: stable <stable@kernel.org>
Signed-off-by: Albert Wang <albertccwang@google.com>
Link: https://lore.kernel.org/r/20220518061315.3359198-1-albertccwang@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3c5880745b)
Change-Id: I15ad3eab4b946f4db6e52035c5dd0d6b3435472e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
When dma_buf_stats_setup() fails, it closes the dmabuf file which
results into the calling of dma_buf_file_release() where it does
list_del(&dmabuf->list_node) with out first adding it to the proper
list. This is resulting into panic in the below path:
__list_del_entry_valid+0x38/0xac
dma_buf_file_release+0x74/0x158
__fput+0xf4/0x428
____fput+0x14/0x24
task_work_run+0x178/0x24c
do_notify_resume+0x194/0x264
work_pending+0xc/0x5f0
Fix it by moving the dma_buf_stats_setup() after dmabuf is added to the
list.
Fixes: bdb8d06dfe ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
Signed-off-by: Charan Teja Reddy <quic_charante@quicinc.com>
Tested-by: T.J. Mercier <tjmercier@google.com>
Acked-by: T.J. Mercier <tjmercier@google.com>
Cc: <stable@vger.kernel.org> # 5.15.x+
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1652125797-2043-1-git-send-email-quic_charante@quicinc.com
(cherry picked from commit ef3a6b7050)
Change-Id: Ie282a36291072b2c6c374f8c1924030ff85d29c6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
The flag was missing which makes i2s5/6 src clock rate can't be changed.
Change-Id: I3ad5f39e8a2826d0b18d554c3a53b55f219028d8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>