The system_dma32 heap should allocate pages with GFP_DMA32, from
dma32_pool.
Fixes: 8880c05e5a ("ANDROID: dma-buf: system_heap: support to allocate pages with GFP_DMA32")
Change-Id: I3e9f123b653cd50873cd8dd40d31c46968ad4a43
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Use the HPD state machine state in detect instead of HPD_STATUS.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I9e6b14c819fa29dd38101340e40334f050832524
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961
* tag 'ASB-2021-12-05_12-5.10': (3010 commits)
ANDROID: workqueue: export symbol of the function wq_worker_comm()
ANDROID: GKI: Update symbols to symbol list
ANDROID: vendor_hooks: Add hooks for binder proc transaction
ANDROID: GKI: Add symbols abi for USB IP kernel modules.
ANDROID: GKI: Fix file mode on mtk abi file
UPSTREAM: erofs: fix deadlock when shrink erofs slab
ANDROID: init_task: Init android vendor and oem data
UPSTREAM: sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
ANDROID: Update symbol list for mtk
UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters
UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
UPSTREAM: usb: dwc3: gadget: Fix null pointer exception
ANDROID: fips140: support "evaluation testing" builds via build.sh
FROMGIT: sched/scs: Reset task stack state in bringup_cpu()
ANDROID: dma-buf: heaps: fix dma-buf heap pool pages stat
ANDROID: ABI: Add several spi_mem related symbols
UPSTREAM: spi: spi-mem: add spi_mem_dtr_supports_op()
ANDROID: gki_defconfig: enable CONFIG_SPI_MEM
ANDROID: ABI: Add several iio related symbols
ANDROID: ABI: Update symbol list for IMX
...
Change-Id: I09cddc92fa34553b944e62cc5cbbba94a84e5437
Conflicts:
arch/arm/boot/dts/rk322x.dtsi
arch/arm64/boot/dts/rockchip/rk3399.dtsi
drivers/dma-buf/heaps/system_heap.c
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/rockchip/rockchip_lvds.c
drivers/gpu/drm/rockchip/rockchip_vop_reg.c
drivers/mtd/nand/spi/core.c
drivers/pci/controller/pcie-rockchip-host.c
drivers/soc/rockchip/Kconfig
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
55ohm is the recommended value after hardware signal test.
Change-Id: Iddb2d9eabfc5abb79662e25f40f5b332864aed15
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Insert the self-powered Type-C device(support specification Revision 3.0),
after the Type-C PD chip cc detection is completed, the power role and
data role on the port side are sink and device(ufp)respectively.
After the power supply negotiation is completed, before the self-powered
Type-C device initiates the DR_swap request, the port side initiates VDM
Message communication. The process is as follows:
(1) The port side sends Discover Identity, Discover SVIDs, Discover Modes
Command in turn, and receives the ACK corresponding to the command on
the device side. The tcpm framework calls tcpm_register_partner_altmodes()
to register the partner altmode;
(2) After registering partner altmode, dp driver will start dp->work, and
call the tcpm framework callback function in this work to initiate Enter
Modes Command;
(3) After the port side receives the DR_swap request initiated by the Type-C
device and processes it, the port side data role switches to host (dfp),
then the tcpm framework initiates vdm message communication again, that is,
the restart process (1) Repeat registration of partner altmode, Then print
stack information:
[ 31.786238][ T193] Call trace:
[ 31.786251][ T193] dump_backtrace+0x0/0x1d0
[ 31.786257][ T193] show_stack+0x14/0x20
[ 31.786266][ T193] dump_stack_lvl+0xcc/0xf0
[ 31.786272][ T193] dump_stack+0x14/0x50
[ 31.786280][ T193] sysfs_warn_dup+0x60/0x78
[ 31.786286][ T193] sysfs_do_create_link_sd.isra.2+0xe0/0xe8
[ 31.786292][ T193] sysfs_create_link+0x20/0x40
[ 31.786300][ T193] typec_probe+0x90/0x100
[ 31.786308][ T193] really_probe+0x20c/0x3e8
[ 31.786315][ T193] driver_probe_device+0x54/0xb8
[ 31.786324][ T193] __device_attach_driver+0x90/0xc0
[ 31.786334][ T193] bus_for_each_drv+0x70/0xc8
[ 31.786347][ T193] __device_attach+0xec/0x150
[ 31.786357][ T193] device_initial_probe+0x10/0x18
[ 31.786369][ T193] bus_probe_device+0x94/0xa0
[ 31.786381][ T193] device_add+0x45c/0x750
[ 31.786388][ T193] device_register+0x1c/0x28
[ 31.786394][ T193] typec_register_altmode+0x1ec/0x308
[ 31.786400][ T193] typec_partner_register_altmode+0xc/0x18
[ 31.786406][ T193] tcpm_pd_rx_handler+0x16f8/0x1748
[ 31.786413][ T193] kthread_worker_fn+0xd8/0x190
[ 31.786418][ T193] kthread+0x124/0x150
[ 31.786424][ T193] ret_from_fork+0x10/0x18
[ 31.786434][ T193] typec_displayport port0-partner.1: failed to create symlinks
[ 31.786443][ T193] typec_displayport: probe of port0-partner.1 failed with error -17
According to the PD2.0 and PD3.0 protocol specifications(see Section 6.4.4.2),
the Enter Mode Command can be started only when the data role is host(DFP) mode.
Therefore, when the port is in device(ufp) mode, the tcpm framework does not
register partner altmode.
Fixes: 2b5787ea0b ("usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running")
Change-Id: I76874be36179391d8008502ba4722f5e4c9eee70
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
A port of 8608d7c441 to ARM64. Both the
original code and this port are limited to dumping kernel addresses, so
don't bother if the registers are from a userspace process.
Change-Id: Idc76804c54efaaeb70311cbb500c54db6dac4525
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
[ Upstream commit a59c68a6a3 ]
Currently user can configure UAC1 function with
parameters that violate UAC1 spec or are not supported
by UAC1 gadget implementation.
This can lead to incorrect behavior if such gadget
is connected to the host - like enumeration failure
or other issues depending on host's UAC1 driver
implementation, bringing user to a long hours
of debugging the issue.
Instead of silently accept these parameters, throw
an error if they are not valid.
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-5-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2993c5f99161149ac126d55baf54c954279483ff
[ Upstream commit 3713d5ceb0 ]
Currently user can configure UAC2 function with
parameters that violate UAC2 spec or are not supported
by UAC2 gadget implementation.
This can lead to incorrect behavior if such gadget
is connected to the host - like enumeration failure
or other issues depending on host's UAC2 driver
implementation, bringing user to a long hours
of debugging the issue.
Instead of silently accept these parameters, throw
an error if they are not valid.
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-4-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Ic6b7e292b60e838c53aab989d1f8b16798dc15e7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
The rk3588-evb5-lp4 and rk3588s-evb2-lp5 only support Type-C
usb 2.0 high speed device, and their usb 3.0 phys are disabled
by default. So these boards can only use usb 2.0 phy node.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I7f76774001445d0c5470c10f65995be489b62db6
This patch aims to improve the functions of rk3588 usb2
phys for otg0 and otg1 port.
1. Add bvalid and id configuration registers to support
switch device/host mode by phy.
2. Add charger detection function for otg1.
3. Fix charger detection fail on DCD stage.
Change-Id: I3922123ad0c75f88ab3c9be117b9c92c3ea7dfaf
Signed-off-by: William Wu <william.wu@rock-chips.com>
When switch dwc3 mode to device on rockchip platform,
it may fails to connect to usb host because the auto
suspend delay is only 100ms. This patch sets the switch
mode to desired_role_sw_mode, and it can avoid to enter
runtime suspend.
Fixes: 5ac62b80f7 ("usb: dwc3: fix runtime pm for rockchip")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If3f7faee1e9550322a80f297136b8faf1ebed301
RK3588 does not currently support this property.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iddb898bc044a3f2aa07b27506593b2c56f096e16
When a new connector is added to current routing in clone mode,
the new connector doesn't have mode_changed=true set. This
incorrect programming sequence causes .mode_set call mismatches
to occur in the new stream.
So move the mode_set code to other callback.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I90f50882057c63f702cf390fb7bfeed088575324
Use page_pool_alloc_pages instead of page_pool_dev_alloc_pages, which
can give the gfp parameter, in the case of not supporting 64-bit width,
using 32-bit address memory can reduce a copy from swiotlb.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Change-Id: I62bff35850cf62db1be7067f3050b27039ae5d75
It will cause this sensor to fail to link to the vicap controller if
used late_initcall_sync. Because the probe level of vicap controller is
late_initcall.
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I74a4606f0af16d860d7b28ba311b14efeda0c225
Use the definition of MEDIA_BUS_FMT_XXX instead of the
definition of sii902x_bus_format.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I72b4d92a1704f98f437a80d2a8afe16d9f6b003f
The rkvenc2 dual core mode will split one large frame into two tile as
task 0 and 1. The task 0 must be started before task 1 otherwise
hardware will generate error.
So we need some changes:
1. Bind two core into one taskqueue. If each core is binded to one
thread then the real hardware config and start timing is not certain.
NOTE: current mode still has case that one extra task is insert between
task 0 and 1.
2. Record core info and core id when multi-core is attached to the same
taskqueue.
3. Add prepare stage to decide which core is used to run the task and
set the struce mpp_dev *mpp in struct mpp_task.
4. Correspondingly the free task should use the mpp_task->mpp if it is a
multi-core mode task.
5. Remove mpp_iommu_attach in mpp_task_run. The mpp_iommu_attach is for
switching different devices which has shared resource like vpu and
rkhevc in rk3568 and rk312x. These chipsets are not supported on 5.10
kernel.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ide52d59cca3adec44e05ab4bfc5bac7d713ad628