Commit Graph

1072263 Commits

Author SHA1 Message Date
Colin Cross
93d3affa84 hardlockup: detect hard lockups without NMIs using secondary cpus
Emulate NMIs on systems where they are not available by using timer
interrupts on other cpus.  Each cpu will use its softlockup hrtimer
to check that the next cpu is processing hrtimer interrupts by
verifying that a counter is increasing.

This patch is useful on systems where the hardlockup detector is not
available due to a lack of NMIs, for example most ARM SoCs.
Without this patch any cpu stuck with interrupts disabled can
cause a hardware watchdog reset with no debugging information,
but with this patch the kernel can detect the lockup and panic,
which can result in useful debugging info.

Change-Id: Ia5faf50243e19c1755201212e04c8892d929785a
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-05-12 15:11:15 +08:00
Jiri Bohac
73f6098941 UPSTREAM: xfrm: fix MTU regression
commit 6596a02295 upstream.

Commit 749439bfac ("ipv6: fix udpv6
sendmsg crash caused by too small MTU") breaks PMTU for xfrm.

A Packet Too Big ICMPv6 message received in response to an ESP
packet will prevent all further communication through the tunnel
if the reported MTU minus the ESP overhead is smaller than 1280.

E.g. in a case of a tunnel-mode ESP with sha256/aes the overhead
is 92 bytes. Receiving a PTB with MTU of 1371 or less will result
in all further packets in the tunnel dropped. A ping through the
tunnel fails with "ping: sendmsg: Invalid argument".

Apparently the MTU on the xfrm route is smaller than 1280 and
fails the check inside ip6_setup_cork() added by 749439bf.

We found this by debugging USGv6/ipv6ready failures. Failing
tests are: "Phase-2 Interoperability Test Scenario IPsec" /
5.3.11 and 5.4.11 (Tunnel Mode: Fragmentation).

Commit b515d26372 ("xfrm:
xfrm_state_mtu should return at least 1280 for ipv6") attempted
to fix this but caused another regression in TCP MSS calculations
and had to be reverted.

The patch below fixes the situation by dropping the MTU
check and instead checking for the underflows described in the
749439bf commit message.

Bug: 232198720
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Fixes: 749439bfac ("ipv6: fix udpv6 sendmsg crash caused by too small MTU")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I8cd20af2f9074d177907c4ae69486ed125e74238
Signed-off-by: Lina Wang <lina.wang@mediatek.com>
2022-05-12 05:29:37 +00:00
William Wu
200edc7b87 phy: rockchip: inno-usb2: fix miss host disc irq for rk3588
On RK3588 platform, the USB Host port may miss disconnect
falling edge irq which is used to detect usb device plug in.
This always happens in the following two cases:
1. For RK3588 ARM PC, boot system from U Disk which connected
   the USB2 Host port (EHCI & OHCI Controller);
2. For RK3588 EVB, increase the disconnect filer counter to
   0xF4240 in the reg USB2PHY_GRF_DIS_CON. That is, the
   disconnect rising/falling irq filter time is set to 10ms
   depend on the 100MHz pclk.

In this case, we can clear the host_disconnect state depend
on the linestate irq which also means that an usb device is
connecting to the port.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iadde3278c3383c0d477a0b9998871a5a1f5fe206
2022-05-12 10:34:39 +08:00
liuhailong
e27ad1d211 ANDROID: signal: Add vendor hook for memory reaping
Since commit 3bcdb496f4 ("ANDROID: signal: Add vendor hook
for memory reaping"), but *current* does not need.  Add another
hook here to determine killed process need be reaped.
(e.g. get_mm_counter)

Bug: 232062955
Change-Id: Ide13d3a2e8c199b063f41e071a2bf2fd60a91b04
Signed-off-by: liuhailong <liuhailong@oppo.com>
2022-05-11 18:12:20 +00:00
Sugar Zhang
d4e5a644c5 ARM: dts: rockchip: rv1106-ipc: Enable tsadc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I6dfb1d5467789d01e23775264824815a74355628
2022-05-11 20:26:35 +08:00
Sugar Zhang
06c451eee0 ARM: dts: rockchip: rv1106-evb: Enable tsadc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I07dad89c2a722355e3b1e1293f13d1fd8491230d
2022-05-11 20:26:09 +08:00
Xing Zheng
78779a435f ASoC: codecs: rv1106_codec: clean up acodec power up/off handing
Clean up power up/off handing for acodec, make the DAC
PSRR feature is better ~14.5dB.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Ia735d2f5e2134c86d35656fb027352a45093d9a5
2022-05-11 20:25:07 +08:00
Cai YiWei
34086f9377 media: rockchip: isp: fix csm range to full
csm->cgc->cproc->ie, and sharp no support
limit range from csm, so fix csm range to full and
cgc to config limit or full range.

Change-Id: Iccc3e7254d55c0e7b61e33028af88e7685e9f1e5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-05-11 16:05:37 +08:00
Cai YiWei
a7dcda114f media: rockchip: isp: fix info2ddr buf free for isp32
Change-Id: Ifd88159e4377568b6a8efc71b3521a636d6cf267
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-05-11 16:05:37 +08:00
Yiqing Zeng
5435c2633b media: i2c: support gc4023 sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ic429eb43d86fa1abc5d7fcd7ae1887b3f43de66d
2022-05-11 16:04:45 +08:00
Huibin Hong
bd0d6dbc3f soc: rockchip: debug: fix issue when reading pcsr if cpu is power down
When enable cpu auto power down, reading pcsr causes "synchronous
external abort" when cpu is power down. Disable the SError during
reading pcsr, and skip reading pcsr if cpu is power down.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Id02b998f621daf440a602faf10439612868d731f
2022-05-11 15:20:57 +08:00
Dan Vacura
503435dc8c FROMGIT: usb: gadget: uvc: allow for application to cleanly shutdown
Several types of kernel panics can occur due to timing during the uvc
gadget removal. This appears to be a problem with gadget resources being
managed by both the client application's v4l2 open/close and the UDC
gadget bind/unbind. Since the concept of USB_GADGET_DELAYED_STATUS
doesn't exist for unbind, add a wait to allow for the application to
close out.

Some examples of the panics that can occur are:

<1>[ 1147.652313] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000028
<4>[ 1147.652510] Call trace:
<4>[ 1147.652514]  usb_gadget_disconnect+0x74/0x1f0
<4>[ 1147.652516]  usb_gadget_deactivate+0x38/0x168
<4>[ 1147.652520]  usb_function_deactivate+0x54/0x90
<4>[ 1147.652524]  uvc_function_disconnect+0x14/0x38
<4>[ 1147.652527]  uvc_v4l2_release+0x34/0xa0
<4>[ 1147.652537]  __fput+0xdc/0x2c0
<4>[ 1147.652540]  ____fput+0x10/0x1c
<4>[ 1147.652545]  task_work_run+0xe4/0x12c
<4>[ 1147.652549]  do_notify_resume+0x108/0x168

<1>[  282.950561][ T1472] Unable to handle kernel NULL pointer
dereference at virtual address 00000000000005b8
<6>[  282.953111][ T1472] Call trace:
<6>[  282.953121][ T1472]  usb_function_deactivate+0x54/0xd4
<6>[  282.953134][ T1472]  uvc_v4l2_release+0xac/0x1e4
<6>[  282.953145][ T1472]  v4l2_release+0x134/0x1f0
<6>[  282.953167][ T1472]  __fput+0xf4/0x428
<6>[  282.953178][ T1472]  ____fput+0x14/0x24
<6>[  282.953193][ T1472]  task_work_run+0xac/0x130

<3>[  213.410077][   T29] configfs-gadget gadget: uvc: Failed to queue
request (-108).
<1>[  213.410116][   T29] Unable to handle kernel NULL pointer
dereference at virtual address 0000000000000003
<6>[  213.413460][   T29] Call trace:
<6>[  213.413474][   T29]  uvcg_video_pump+0x1f0/0x384
<6>[  213.413489][   T29]  process_one_work+0x2a4/0x544
<6>[  213.413502][   T29]  worker_thread+0x350/0x784
<6>[  213.413515][   T29]  kthread+0x2ac/0x320
<6>[  213.413528][   T29]  ret_from_fork+0x10/0x30

Signed-off-by: Dan Vacura <w36195@motorola.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220503201039.71720-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit b81ac4395b
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: I451813637a02429041aa34ce9cb4cbd63c557415
2022-05-10 12:06:19 -05:00
Dan Vacura
3736ae703b FROMGIT: usb: dwc3: gadget: increase tx fifo size for ss isoc endpoints
Improve performance of isoc transfers in superspeed by increasing the
number of possible endpoints available, matching that of what was
configured for bulk transfers.

Signed-off-by: Dan Vacura <w36195@motorola.com>
Link: https://lore.kernel.org/r/20220420183338.445622-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit 6a7c7df993
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: Iaa105cd98b0f4de3450bb5f6b10df67ed20a8336
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-05-10 12:06:19 -05:00
Vijayavardhan Vennapusa
300cec3502 UPSTREAM: usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
If any function like UVC is deactivating gadget as part of composition
switch which results in not calling pullup enablement, it is not getting
enabled after switch to new composition due to this deactivation flag
not cleared. This results in USB enumeration not happening after switch
to new USB composition. Hence clear deactivation flag inside gadget
structure in configfs_composite_unbind() before switch to new USB
composition.

Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Dan Vacura <w36195@motorola.com>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20220413211038.72797-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit bf95c4d463)
Change-Id: I0013ab8443e47788291951516baec3e7c8e445aa
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-05-10 12:06:19 -05:00
Dan Vacura
a35bc53848 FROMGIT: usb: gadget: uvc: remove pause flag use
The pause flag doesn't appear to serve a purpose as it is possible for
the pump worker thread to not be running when new buffers are queued.
Before the following change was introduced: "43cd0023872e usb: gadget:
uvc_video: add worker to handle the frame pumping", the pause flag
status was discarded and never returned. This masked a current issues of
the userspace receiving non-zero values (considered unsuccessful) and
prevents trace_v4l2_qbuf() from being called.

Signed-off-by: Dan Vacura <w36195@motorola.com>
Link: https://lore.kernel.org/r/20220413192402.26063-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit be30e35027
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: Id841e7f0dc6c79f74ca41bb93f2504effc2fefd8
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-05-10 12:06:19 -05:00
Dan Vacura
36aa07174b FROMGIT: usb: gadget: uvc: allow changing interface name via configfs
Add a configfs entry, "function_name", to change the iInterface field
for VideoControl. This name is used on host devices for user selection,
useful when multiple cameras are present. The default will remain "UVC
Camera".

Signed-off-by: Dan Vacura <w36195@motorola.com>
Link: https://lore.kernel.org/r/20220401160447.5919-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit 324e4f8507
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: I6943d40dbc0dec125464b66684ae31252e807d9b
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-05-10 12:06:18 -05:00
Dan Vacura
74b55107d0 UPSTREAM: usb: gadget: uvc: Fix crash when encoding data for usb request
During the uvcg_video_pump() process, if an error occurs and
uvcg_queue_cancel() is called, the buffer queue will be cleared out, but
the current marker (queue->buf_used) of the active buffer (no longer
active) is not reset. On the next iteration of uvcg_video_pump() the
stale buf_used count will be used and the logic of min((unsigned
int)len, buf->bytesused - queue->buf_used) may incorrectly calculate a
nbytes size, causing an invalid memory access.

[80802.185460][  T315] configfs-gadget gadget: uvc: VS request completed
with status -18.
[80802.185519][  T315] configfs-gadget gadget: uvc: VS request completed
with status -18.
...
uvcg_queue_cancel() is called and the queue is cleared out, but the
marker queue->buf_used is not reset.
...
[80802.262328][ T8682] Unable to handle kernel paging request at virtual
address ffffffc03af9f000
...
...
[80802.263138][ T8682] Call trace:
[80802.263146][ T8682]  __memcpy+0x12c/0x180
[80802.263155][ T8682]  uvcg_video_pump+0xcc/0x1e0
[80802.263165][ T8682]  process_one_work+0x2cc/0x568
[80802.263173][ T8682]  worker_thread+0x28c/0x518
[80802.263181][ T8682]  kthread+0x160/0x170
[80802.263188][ T8682]  ret_from_fork+0x10/0x18
[80802.263198][ T8682] Code: a8c12829 a88130cb a8c130

Fixes: d692522577 ("usb: gadget/uvc: Port UVC webcam gadget to use videobuf2 framework")
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Vacura <w36195@motorola.com>
Link: https://lore.kernel.org/r/20220331184024.23918-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 229140375
(cherry picked from commit 71d471e3fa)
Change-Id: I0e801793e56537177b0ff08dd8a5460d98c9614a
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-05-10 12:06:18 -05:00
Michael Grzeschik
53129aceec UPSTREAM: usb: gadget: uvc: test if ep->desc is valid on ep_queue
The reason that the ep_queue has failed could be a disabled endpoint.
In that case it is not guaranteed that the ep->desc is still valid.
This patch adds a check for NULL.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20211017215017.18392-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit 38db3716a5)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: I8a17f64088832947e3a4481140d884881bf603ff
2022-05-10 12:06:18 -05:00
Michael Grzeschik
23cca7ad30 UPSTREAM: usb: gadget: uvc: only pump video data if necessary
If the streaming endpoint is not enabled, the worker has nothing to do.
In the case buffers are still queued, this patch ensures that it will bail
out without handling any data.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20211017215017.18392-6-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit f9897ec0f6)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: Ice201abf1f4e4f38ea2b80a990896597e365e74b
2022-05-10 12:06:18 -05:00
Michael Grzeschik
6692312df6 UPSTREAM: usb: gadget: uvc: only schedule stream in streaming state
This patch ensures that the video pump thread will only be scheduled if
the uvc is really in streaming state. This way the worker will not have
to run on an empty queue.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20211017215017.18392-5-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit 5fc49d8bee)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: I5724e6c41a4b298f42d4009bdfe2f0232ae16517
2022-05-10 12:06:18 -05:00
Thinh Nguyen
1c14550b60 UPSTREAM: usb: dwc3: gadget: Give some time to schedule isoc
Currently the driver will schedule isoc transfers immediately on the
next interval, which is quite aggressive when the interval is 125us.
There's report that some platforms may need more time to process the
transfer, otherwise the controller may miss the first interval. Let's
keep it simple and give the controller at least 500us to schedule the
isoc transfer.

Link: https://lore.kernel.org/linux-usb/20220302143539.GI11577@pengutronix.de/
Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/deb8146b8e1f7f8495ef2d5647017270934cb2d8.1646708142.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit aa6812be1f)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: I3bbf5abfdb249fb9a10c664f11d4f3b682ceafd1
2022-05-10 12:06:18 -05:00
Michael Grzeschik
5d084e9710 UPSTREAM: usb: gadget: uvc: make uvc_num_requests depend on gadget speed
While sending bigger images is possible with USB_SPEED_SUPER it is
better to use more isochronous requests in flight. This patch makes the
number uvc_num_requests dynamic by changing it depending on the gadget
speed.

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit 9973772dbb)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: I1385bf8f973f3e5ee6c76193bffe0046eca22439
2022-05-10 12:06:18 -05:00
Qihang Hu
15a663ebbe UPSTREAM: usb: gadget: composite: Show warning if function driver's descriptors are incomplete.
In the config_ep_by_speed_and_alt function, select the corresponding
descriptor through g->speed. But some legacy or not well designed
function drivers may not support the corresponding speed. So, we can
directly display warnings instead of causing kernel panic. At the
same time, it indicates the reasons in warning message.

Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Qihang Hu <huqihang@oppo.com>
Link: https://lore.kernel.org/r/20211110101129.462357-1-huqihang@oppo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
(cherry picked from commit 16d4275920)
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: Iaef2ecfc080dc4a97fe9911af4da78316af8e063
2022-05-10 12:06:18 -05:00
Elliot Berman
3172c95582 FROMLIST: kbuild: Add environment variables for userprogs flags
Allow additional arguments be passed to userprogs compilation.
Reproducible clang builds need to provide a sysroot and gcc path to
ensure the same toolchain is used across hosts. KCFLAGS is not currently
used for any user programs compilation, so add new USERCFLAGS and
USERLDFLAGS which serves similar purpose as HOSTCFLAGS/HOSTLDFLAGS.

Clang 13+ might detect GCC installation on hosts which have it installed
to a default location in /. With addition of these environment
variables, you can specify flags such as:

$ make USERCFLAGS=--sysroot=/path/to/sysroot

This can also be used to specify different sysroots such as musl or
bionic which may be installed on the host in paths that the compiler
may not search by default.

Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Bug: 214127735
Link: https://lore.kernel.org/linux-kbuild/20220201213542.2808035-1-quic_eberman@quicinc.com/
Change-Id: I035309a569130774a1212f294973eee2830a6588
(cherry picked from commit df70410432)
2022-05-10 16:09:36 +00:00
Lee Jones
a07b60e85c ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree
Bug: 195565510
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ic8134eb902aa7d929e3121b2f69b1d258f570652
(cherry picked from commit 98c15b2bad)
2022-05-10 13:25:21 +00:00
Finley Xiao
cf23a35d28 arm64: dts: rockchip: rk3588s: add high temperature configuration
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Icc614484196a5914aee4d3615ad521db4fac8c82
2022-05-10 19:10:06 +08:00
Finley Xiao
54e328674a arm64: dts: rockchip: rk3588s: change low temperature configuration
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Iff024258ce2f9b7755fcd3d87dcbb530ec8ffc3c
2022-05-10 19:10:06 +08:00
Lee Jones
0d752f78b2 BACKPORT: staging: ion: Prevent incorrect reference counting behavour
Supply additional check in order to prevent unexpected results.

Bug: 205573273
Fixes: b892bf75b2 ("ion: Switch ion to use dma-buf")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[Lee: Patch now applies to ion_buffer.c instead of ion.c]
Change-Id: Ia6afdd9ca502caa9cad6619d438fc6c8e8457679
(cherry picked from commit fea24b07ed)
2022-05-10 10:33:09 +00:00
Yu Qiaowei
a130e5ac67 video: rockchip: rga3: fill mode disables src0 channel
Update driver version to 1.2.11

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I132581e492bc0b6880bd6227cb083b263e2dc2d2
2022-05-10 14:54:49 +08:00
Zefa Chen
2df4d83c64 media: i2c: sc4336 support get real fps
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id45cd12575f7439bdffbd482ea04b7ae7e33c3ef
2022-05-10 14:27:01 +08:00
Guochun Huang
17db577493 arm64: dts: rockchip: rk3588-vehicle: add serdes display
dsi0->bu18tl82->bu18rl82->lvds->panel
dsi1->bu18tl82->bu18rl82->lvds->panel
dp0->lt7911D->lvds->bu18tl82->bu18rl82->lvds->panel
dp1->lt7911D->lvds->bu18tl82->bu18rl82->lvds->panel
edp0->lt7911D->lvds->bu18tl82->bu18rl82->lvds->panel
edp1->lt7911D->lvds->bu18tl82->bu18rl82->lvds->panel

Change-Id: Iea640653c908c3f92d6d7f89c397d2c12792d486
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-10 14:11:40 +08:00
Damon Ding
2274784b05 ARM: dts: rockchip: rv1106: add rgb ext board support
A 1024x600 RGB888/RGB666 screen FX070-DHM11BOE-A.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ib757ff5daa73c17647ae27631b217e5a70284769
2022-05-10 10:50:25 +08:00
Ziyuan Xu
ad6118b6e5 ARM: dts: rockchip: rv1106g-evb2: config dma_heap_cma to 24MB
Generally, the set the rk_dma_heap_cma as an environment variable that
was passed to kernel via bootargs. Due to thuner-boot, we fixed the
bootargs in DTS.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I725fa3cde59c8b1e6c84fecbc0d1611d333b69e3
2022-05-10 10:43:03 +08:00
Weixin Zhou
6933ea73fe arm64: dts: rockchip: rk3588s-tablet-rk806-single: correct dp in vp1
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I1346f32659fc917af9ae501f46bc0290d0d3f18a
2022-05-10 10:29:50 +08:00
Guochun Huang
e7ca222fee arm64: dts: rockchip: rk3588-vehicle: fix USB_OTG_PWREN gpio pin
Change-Id: I7122e43aeec997bd9e8c80441195fae328d7887a
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-10 10:23:56 +08:00
Guochun Huang
0ca8d654bd drm/bridge: Add support for BU18TL82-M/BU18RL82-M
BU18TL82-M supports MIPI DSI and LVDS data
transmission by ROHM's original CDR (Clock Data
Recovery) technology. This chip is the serial interface
transmitter IC of the Clockless Link-BD series.

BU18TL82-M converts the MIPI DSI and LVDS data
stream into Clockless Link format transmit through 2
pairs of differential wires.

BU18RL82-M supports LVDS data transmission by
ROHM's original CDR (Clock Data Recovery) technology.
This chip is serial interface receiver IC of the Clockless
Link-BD series.

BU18RL82-M converts Clockless link stream into a
LVDS format, and transmits through one or two ports of
LVDS.

Flexible Input / Output mode is suitable for a variety of
application interface.

Change-Id: Ia8693b84d910ce9e08c49b9957bd5682b8625b0f
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-05-10 10:23:56 +08:00
Zhang Yubing
53da594597 drm/rockchip: vop2: support vop splice mode in loader protect
when the hdisplay more than 4096, vop need use splice mode to
output image. So another vop port need config in load protect
function.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I64b7726397553af4aeb3cf35ef751b73345497ad
2022-05-10 09:30:05 +08:00
Zhang Yubing
0a196311ef drm/rockchip: logo: attach crtc to drm state
In order to get the hdisplay of the display mode, attaching the
crtc to drm state.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I85909a414767b0bdd078edfa0a17df97b7612538
2022-05-10 09:23:56 +08:00
Yu Qiaowei
a2b12fb2b6 video: rockchip: rga3: rga3 is compatible with RGA2's alpha_blend configuration
1. ABA -> ABB.
2. The output has an offset and is placed in win0 for processing.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id501ad32fc887b6e88dfaec5cfdb1842169951bd
2022-05-10 09:23:00 +08:00
Lina Wang
1e037dd790 FROMGIT: net: fix wrong network header length
When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is enable,
several skbs are gathered in skb_shinfo(skb)->frag_list. The first skb's
ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4,
network_header\transport_header\mac_header have been updated as ipv4 acts,
but other skbs in frag_list didnot update anything, just ipv6 packets.

udp_queue_rcv_skb will call skb_segment_list to traverse other skbs in
frag_list and make sure right udp payload is delivered to user space.
Unfortunately, other skbs in frag_list who are still ipv6 packets are
updated like the first skb and will have wrong transport header length.

e.g.before bpf_skb_proto_6_to_4,the first skb and other skbs in frag_list
has the same network_header(24)& transport_header(64), after
bpf_skb_proto_6_to_4, ipv6 protocol has been changed to ipv4, the first
skb's network_header is 44,transport_header is 64, other skbs in frag_list
didnot change.After skb_segment_list, the other skbs in frag_list has
different network_header(24) and transport_header(44), so there will be 20
bytes different from original,that is difference between ipv6 header and
ipv4 header. Just change transport_header to be the same with original.

Actually, there are two solutions to fix it, one is traversing all skbs
and changing every skb header in bpf_skb_proto_6_to_4, the other is
modifying frag_list skb's header in skb_segment_list. Considering
efficiency, adopt the second one--- when the first skb and other skbs in
frag_list has different network_header length, restore them to make sure
right udp payload is delivered to user space.

Signed-off-by: Lina Wang <lina.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cf3ab8d4a7 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master)
Bug: 218157620
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I36f2f329ec1a56bb0742141a7fa482cafa183ad3
2022-05-09 15:41:38 +00:00
Yu Qiaowei
b88dc824d9 video: rockchip: rga3: The colorkey value is adapted to 8bit(RGA2)->10bit(RGA3)
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I4651659e75b7cddd15e3a9a29b7588c382d4bb22
2022-05-09 20:54:11 +08:00
Yu Qiaowei
6469f2fb4f video: rockchip: rga3: Fix RGA2 getting mmu_base requires 16 alignment
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7f096d51021ed941240f5ab3578fbc1f3b44b505
2022-05-09 17:31:19 +08:00
Wyon Bi
f72b7c857e drm/panel: simple: Add reset gpio
Fixes: 12353d7243 ("drm/panel: simple: Add reset gpio")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I3c3066e4249aa49f948de9f0bb5d888f0e3d2739
2022-05-09 15:41:50 +08:00
Wyon Bi
c8383f61c1 drm/rockchip: analogix_dp: Find possible connector from encoder
Fixes: 48fb554efc ("drm/rockchip: analogix_dp: Protect kernel logo with loader_protect callback")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Id2f5817445e86a4e902f9cd4009815687cd5ebe0
2022-05-09 15:18:11 +08:00
Zhang Yubing
1a5cc99e50 drm/rockchip: dw-dp: support DP SI auto test
Use the DPCD Automated Testing Filed to auto test DP SI.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ic3c01cd2068125ff415a205e57a0b873cc2541fc
2022-05-09 14:31:26 +08:00
Dingxian Wen
c231756164 media: rockchip: hdmirx: add timing validity judgment
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I11cfb328dc37c5239e2557460dd99f471d23a52b
2022-05-09 11:00:54 +08:00
Dingxian Wen
ae854e6b5d media: rockchip: hdmirx: check timing before start streaming
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: Id0b830b09db4f18eb3b96606e4e8d6fdd95b44c2
2022-05-09 11:00:54 +08:00
Zhenke Fan
d54e56dbc6 media: i2c: add gc4653 sesnor
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Ide1351b6396eceda1df399485b22f807fce8a867
2022-05-09 10:34:26 +08:00
Su Yuefu
4ffc6172ee media: i2c: add sc230ai sensor driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I57e9d414fd51ddc620c18233e9072a22cb8fa7d8
2022-05-07 19:11:44 +08:00
Frank Wang
45d113ab59 phy: rockchip: inno-usb2: add linestate filter config for rk3588
For linestate irq as a wakeup source, we need to reconfigure the
linestate filter value base on 32KHz clk at suspend time, and restore
it to the default when the system resume.

By the way, set the grf to handle the phy status when the system
suspend, which can support the linestate wakeup even the PD of the
USB controller was off for RK3588 OTG1 port.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I630855981082298d079d9c713029a7e3093b09cd
2022-05-07 17:37:09 +08:00