Commit Graph

853384 Commits

Author SHA1 Message Date
Sugar Zhang
b35ceabc94 dt-bindings: sound: rockchip: Add spk-ctl for audiopwm
Change-Id: I4b0149397ffb5e9054ea94ee39ce45182f997604
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-03-28 12:01:11 +08:00
Sugar Zhang
7fb3fa1531 ASoC: rockchip: Add spk-ctl for audiopwm
Change-Id: I052f04b8d9ccd0b476051a04e7183e23d4126131
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-03-28 12:01:06 +08:00
David Wu
a442177046 net: ethernet: stmicro: stmmac: Add loopback interface for rockchip
Add some user interface for usage, for example at RK3399:

  - scan rgmii delayline:

    echo (speed:10 100 1000) > /sys/devices/platform/fe300000.ethernet/phy_lb_scan

  - loopback test:

    echo (speed:10 100 1000) > /sys/devices/platform/fe300000.ethernet/phy_lb
    echo (speed:10 100 1000) > /sys/devices/platform/fe300000.ethernet/mac_lb

  - set/show delayline

    cat /sys/devices/platform/fe300000.ethernet/rgmii_delayline
    echo (tx delayline) (rx delayline) > /sys/devices/platform/fe300000.ethernet/rgmii_delayline

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ic38d7f4e12987d5ebc1d81f693f955e8105657ac
2020-03-28 11:01:39 +08:00
Yifeng Zhao
57e97b7aba drivers: mtd: nand: rockchip: fix the problem of wrong configuration for the timing
FMWAIT configured with a wrong value to cause timing error.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ib09b79b5702bdff3010a578a50fc0d97854c03f1
2020-03-27 18:03:40 +08:00
Huibin Hong
ba92445d02 Revert "soc: rockchip: rk_fiq_debugger: clear time out interrupt but no data ready"
This reverts commit 08cb05ec40.

Change-Id: Ic8ffa074edcf5720cd1db55b9bf3db83db1b08cd
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2020-03-27 17:37:03 +08:00
Binyuan Lan
d5193532d9 arm64: dts: rockchip: update rk3326 ai-va dts for android q and add v12 board
Change-Id: I24a26df8d08ff3e4351c25b3a0d10b5174b88e2b
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2020-03-27 14:52:08 +08:00
Binyuan Lan
f2febff69b ASoC: bt-sco: Compatible stereo format
Although stereo transmission, actually only 1ch data,
just to adapt the controller of only support stereo and above.

Change-Id: I0f2d6d1b43954080a980d4e4b8ea8f3ca8207d7b
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2020-03-27 11:23:12 +08:00
Sandy Huang
260b32e594 drm/bridge: synopsys: dw-hdmi: destroy connector and encoder
connector and encoder should be removed when bind failed, otherwise will
lead to system panic when enable SLUB and SLUB_DEBUG:

[    1.071801] rockchip-drm display-subsystem: failed to bind ff960000.dsi (ops dw_mipi_dsi_ops): -517
[    1.073943] Unable to handle kernel paging request at virtual address 006b6b6b6b6b6b73
……
[    1.442300] pc : drm_mode_config_cleanup+0x4c/0x2f8
[    1.447179] lr : rockchip_drm_bind+0x610/0x1c38

after enable KASAN, we can see the UAF error:

[    3.862556] BUG: KASAN: use-after-free in rockchip_drm_bind+0x474/0x2b58
[    3.862611] Read of size 4 at addr ffffffc00a21f55c by task swapper/0/1
[    3.862691] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.19.101 #1820
[    3.862737] Hardware name: Rockchip rk3368 808 evb board (DT)
[    3.862782] Call trace:
[    3.862853]  dump_backtrace+0x0/0x240
[    3.862905]  show_stack+0x14/0x20
[    3.863146]  kasan_report+0xc/0x18
[    3.863265]  rockchip_drm_bind+0x474/0x2b58
……
[    3.864314] Allocated by task 1:
[    3.864376]  __kasan_kmalloc.isra.0+0x100/0x1b8
[    3.864435]  kasan_slab_alloc+0x14/0x20
[    3.864493]  __kmalloc_track_caller+0x154/0x368
[    3.864550]  devm_kmalloc+0x30/0xb0
[    3.864611]  dw_hdmi_rockchip_bind+0xcc/0xa28
[    3.864668]  component_bind_all+0x1d8/0x450
[    3.864728]  rockchip_drm_bind+0x450/0x2b58
……
[    3.865787] Freed by task 1:
[    3.865851]  __kasan_slab_free+0x118/0x220
[    3.865897]  kasan_slab_free+0x10/0x18
[    3.865952]  kfree+0x7c/0x308
[    3.866012]  release_nodes+0x248/0x4a0
[    3.866070]  devres_release_group+0xd4/0x148
[    3.866127]  component_unbind.isra.7+0x98/0xc8
[    3.866183]  component_bind_all+0x3b0/0x450
[    3.866247]  rockchip_drm_bind+0x450/0x2b58

Change-Id: I6378bf34d8b953fb770badfafdd3fe44628505f7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-03-27 10:24:34 +08:00
Chao Yu
830390b363 FROMGIT: f2fs: fix potential .flags overflow on 32bit architecture
f2fs_inode_info.flags is unsigned long variable, it has 32 bits
in 32bit architecture, since we introduced FI_MMAP_FILE flag
when we support data compression, we may access memory cross
the border of .flags field, corrupting .i_sem field, result in
below deadlock.

To fix this issue, let's expand .flags as an array to grab enough
space to store new flags.

Call Trace:
 __schedule+0x8d0/0x13fc
 ? mark_held_locks+0xac/0x100
 schedule+0xcc/0x260
 rwsem_down_write_slowpath+0x3ab/0x65d
 down_write+0xc7/0xe0
 f2fs_drop_nlink+0x3d/0x600 [f2fs]
 f2fs_delete_inline_entry+0x300/0x440 [f2fs]
 f2fs_delete_entry+0x3a1/0x7f0 [f2fs]
 f2fs_unlink+0x500/0x790 [f2fs]
 vfs_unlink+0x211/0x490
 do_unlinkat+0x483/0x520
 sys_unlink+0x4a/0x70
 do_fast_syscall_32+0x12b/0x683
 entry_SYSENTER_32+0xaa/0x102

Change-Id: I2777d32fd64e55514549fe82be397fdd671beaf6
Fixes: 4c8ff7095b ("f2fs: support data compression")
Tested-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 7de5ad45b809b5043fb12c3e280ceffe9a6a13d4
 git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs dev)
2020-03-26 16:41:53 +08:00
Wu Liangqing
e0326ce757 BACKPORT: r8152: sync code to support usb net
latest commit in master:
d64c7a0803 ("r8152: check disconnect status after long sleep")

Change-Id: Id67ff7cd238342b8b8bef7c39c63cd397d81ee30
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-03-26 15:45:49 +08:00
Herman Chen
2ff453e141 video/rockchip: mpp: add clock && reset for hevc cabac
new version rkvdec has extra clock and reset for cabac module.

Change-Id: I24c82ad57e382d3f2b8fcde11c149f9cf50ffb15
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-26 15:17:39 +08:00
Frank Wang
d5b5b27e27 mailbox: rockchip: fix to null pointer dereference
Delivery message to upper only when mailbox client is existed.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I2fbfc3ecd110fe26d0ffed5ee90d1e4877450ef9
2020-03-26 11:09:19 +08:00
Ding Wei
f64385665a arm64: dts: rockchip: px30: update compatible suit for px30
Change-Id: If478a544f08b5d9fad3b42249405e04b58bdd289
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-03-26 10:45:12 +08:00
Herman Chen
0c65f573a4 video: rockchip: mpp: deal with issue for px30 264/265 switch
px30 grf switch method:
    a) ensure clk on
    b) ensure power on
    c) disable all iommu
    d) switch grf
    e) enable current iommu

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I1015ea9df6d8745f0a4922a1f684082660fac314
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-03-26 10:45:12 +08:00
Ding Wei
87fbf38547 dt-bindings: video: add px30 codec properties
Change-Id: I9bc50a2494801782149a62d2892e4bf66b06406e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-03-26 10:45:12 +08:00
Li Huang
728b7bea7c RK3368 GPU: Fixup memory out of bounds on pvr_sync_open && pvr_sync_pt_create
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: If64b979cb1d76fefd190e6862499dd7c9fb6454f
2020-03-25 15:52:55 +08:00
Wu Liangqing
6a4fe55f35 arm64: dts: rockchip: rk3399-ind: changed rk809_codec i2s0 to i2s1
for v12 hareware board

Change-Id: I44f27c5f075b2c543206d1c1fa0473796677d12b
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-03-24 19:37:19 +08:00
Jianing Ren
cd60d2b861 usb: dwc3: fix slow connection in gadget mode
This patch fix the bug that if the property maximum-speed of dwc3 is
configured to high-speed in DTS, gadget connection will be slow.

Before gadget connection, it is necessary to write register DCFG to set
maximum speed, if you don't, dwc3 will generate Erratic Error Event many
times and results to slow connection. Actually, maximum speed will be
set when Android layer call udc_bind_to_driver but it will fail when
dwc3 runtime-suspended. For Rockchip SoCs, dwc3 will be suspended as long
as USB cable is unplugged, so we add udc_set_speed before dwc3 runtime
resume.

Change-Id: I261c2cf9a36179a8d600f223fc8fd4757c7f622d
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-03-24 14:09:23 +08:00
William Wu
cb3db5f6a5 usb: dwc3: gadget: fix isoc in transfer issue
When I test the uvc gadget function, I find that the uvc
gadget can only transfer the first frame image and then
stop unexpectedly.

Without this patch, the isochronous endpoints doesn't wait
for a XferNotReady event to start the next frame image, and
fail to transfer data. In this case, we will get an endpoint
event DWC3_DEPEVT_XFERINPROGRESS and the event status is
DEPEVT_STATUS_MISSED_ISOC, and the original code try to
issue an EndTransfer command if the started_list is empty.
However, the started_list is never empty, so it doesn't issue
an EndTransfer command and not XferNotReady event happens.

To fix this problem, this patch firstly checks if the event
status is DEPEVT_STATUS_MISSED_ISOC and then unmap the isoc
request and move the request to the pending list. Then it
issue an EndTransfer command if the started_list is empty.
After the EndTransfer is completed, we will get a XferNotReady
event and it can start the isoc requests again.

Change-Id: Ieac3ca9a177bc7599b29ae30bee243e47b3ba7c9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-03-24 09:10:54 +08:00
Wang Panzhenzhuan
d693b4487f media: i2c: ov13850: fix take photo stresstest issue
use fast standby mode && mipi clk non-continue mode
to fix take photo stresstest issue

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Idf9ff7e509d77cb78764ba5f97f14ff402172363
2020-03-24 09:04:39 +08:00
Thinh Nguyen
504eef8f08 UPSTREAM: usb: dwc3: gadget: Remove END_TRANSFER delay
We had a 100us delay to synchronize the END_TRANSFER command completion
before giving back requests to the function drivers. Now, the controller
driver can handle cancelled TRBs with the requests' cancelled_list and
it can also wait until the END_TRANSFER completion before starting new
transfers. Synchronization can simply base on the controller's command
completion interrupt. The 100us delay is no longer needed. Remove this
arbitrary delay.

Change-Id: Ie6d1a46e8975b7d8b80c4523d71c58a5bffd9413
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit cf2f8b63f7)
2020-03-23 17:33:34 +08:00
Thinh Nguyen
77bd086802 UPSTREAM: usb: dwc3: gadget: Delay starting transfer
If the END_TRANSFER command hasn't completed yet, then don't send the
START_TRANSFER command. The controller may not be able to start if
that's the case. Some controller revisions depend on this. See
commit 76a638f8ac ("usb: dwc3: gadget: wait for End Transfer to
complete"). Let's only send START_TRANSFER command after the
END_TRANSFER command had completed.

Change-Id: Id6d0be76c48ab556bc3e5a9a75014de0ae671ed4
Fixes: 3aec99154d ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit da10bcdd6f)
2020-03-23 17:33:34 +08:00
Thinh Nguyen
118a59a38b UPSTREAM: usb: dwc3: gadget: Check END_TRANSFER completion
While the END_TRANSFER command is sent but not completed, any request
dequeue during this time will cause the driver to issue the END_TRANSFER
command. The driver needs to submit the command only once to stop the
controller from processing further. The controller may take more time to
process the same command multiple times unnecessarily. Let's add a flag
DWC3_EP_END_TRANSFER_PENDING to check for this condition.

Change-Id: Ibd378cfb4320dfa962b76fa50b5f002d7eac1d8b
Fixes: 3aec99154d ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit c58d8bfc77)
2020-03-23 17:33:34 +08:00
Thinh Nguyen
d90c97b9cf UPSTREAM: usb: dwc3: gadget: Clear started flag for non-IOC
Normally the END_TRANSFER command completion handler will clear the
DWC3_EP_TRANSFER_STARTED flag. However, if the command was sent without
interrupt on completion, then the flag will not be cleared. Make sure to
clear the flag in this case.

Change-Id: I34ece5ee5e01f0cf9b1061e99f902cfc19a5dfed
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d3abda5a98)
2020-03-23 17:33:33 +08:00
Tao Huang
18d1e7aa16 drm/panel: simple: Introduce CONFIG_DRM_PANEL_SIMPLE_OF_ONLY
Only support panels which all parameters from device tree.

Save boot time about 2ms on rk3126-bnd-d708 board.

Change-Id: Ie075ff5c84c1807029873555f58bd13d41350abf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-23 15:22:21 +08:00
Tao Huang
bc8460e54a crypto: algboss - Don't create test kthread when CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
When CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y, it is no need to create
kthread cryptomgr_test, which almost do nothing but crypto_alg_tested().
Just call crypto_alg_tested() in cryptomgr_schedule_test() directly.

Save boot time about 7ms on rk3126-bnd-d708 board.

Change-Id: If465f8419dba4ea955df157b3405f3267a96c7d6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-23 14:43:20 +08:00
Jianqun Xu
642282b0bb fiq_debugger: fix cpu not responding issue
Change-Id: Id984f9d9077e80210445f4ae32a028ed2e90a230
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2020-03-23 14:39:53 +08:00
San Mehat
b59c135522 ANDROID: process: Add display of memory around registers when displaying regs.
This is extremely useful in diagnosing remote crashes, and is based heavily
on original work by <md@google.com>.

Signed-off-by: San Mehat <san@google.com>
Cc: Michael Davidson <md@google.com>

[ARM] process: Use uber-safe probe_kernel_address() to read mem when dumping.

This prevents the dump from taking pagefaults / external aborts.

Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I7586677c4ea0e064b5a38c7972102db3b5771500
2020-03-23 10:58:44 +08:00
Alexander Duyck
9925aa5542 UPSTREAM: driver core: Probe devices asynchronously instead of the driver
Probe devices asynchronously instead of the driver. This results in us
seeing the same behavior if the device is registered before the driver or
after. This way we can avoid serializing the initialization should the
driver not be loaded until after the devices have already been added.

The motivation behind this is that if we have a set of devices that
take a significant amount of time to load we can greatly reduce the time to
load by processing them in parallel instead of one at a time. In addition,
each device can exist on a different node so placing a single thread on one
CPU to initialize all of the devices for a given driver can result in poor
performance on a system with multiple nodes.

This approach can reduce the time needed to scan SCSI LUNs significantly.
The only way to realize that speedup is by enabling more concurrency which
is what is achieved with this patch.

To achieve this it was necessary to add a new member "async_driver" to the
device_private structure to store the driver pointer while we wait on the
deferred probe call.

Change-Id: I08edadd321d483facd62ed913d17bd79813e66d9
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ef0ff68351)
2020-03-23 10:28:09 +08:00
Alexander Duyck
c4e800504f UPSTREAM: device core: Consolidate locking and unlocking of parent and device
Try to consolidate all of the locking and unlocking of both the parent and
device when attaching or removing a driver from a given device.

To do that I first consolidated the lock pattern into two functions
__device_driver_lock and __device_driver_unlock. After doing that I then
created functions specific to attaching and detaching the driver while
acquiring these locks. By doing this I was able to reduce the number of
spots where we touch need_parent_lock from 12 down to 4.

This patch should produce no functional changes, it is meant to be a code
clean-up/consolidation only.

Change-Id: Ifbaf68e43b10a84ba90fce65f6cbe8fb79acbc62
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ed88747c6c)
2020-03-23 10:27:51 +08:00
Feng Tang
d8538da00e UPSTREAM: async: Add cmdline option to specify drivers to be async probed
Asynchronous driver probing can help much on kernel fastboot, and
this option can provide a flexible way to optimize and quickly verify
async driver probe.

Also it will help in below cases:
* Some driver actually covers several families of HWs, some of which
  could use async probing while others don't. So we can't simply
  turn on the PROBE_PREFER_ASYNCHRONOUS flag in driver, but use this
  cmdline option, like igb driver async patch discussed at
  https://www.spinics.net/lists/netdev/msg545986.html

* For SOC (System on Chip) with multiple spi or i2c controllers, most
  of the slave spi/i2c devices will be assigned with fixed controller
  number, while async probing may make those controllers get different
  index for each boot, which prevents those controller drivers to be
  async probed. For platforms not using these spi/i2c slave devices,
  they can use this cmdline option to benefit from the async probing.

Change-Id: I98d4d57ead7e40b075f1d43ebea559c5497cf341
Suggested-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 1ea61b68d0)
2020-03-23 10:25:12 +08:00
Tao Huang
825494996b Revert "ARM: rockchip_defconfig: Enable zram writeback"
This reverts commit 8ff5bc87d8.

Change-Id: Icfe277c0242d2c683bf96ecb272e62890fde6e1c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-21 20:49:44 +08:00
Tao Huang
38ae520ef2 Revert "arm64: rockchip_defconfig: Enable zram writeback"
This reverts commit cb0568114d.

Change-Id: I58659743e53ccad689ea5326350dc8a5f7f4f1b0
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-21 20:47:11 +08:00
Tao Huang
06a7fcfc9a Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common
* android-4.19: (1190 commits)
  ANDROID: update the ABI xml representation
  ANDROID: GKI: Enable V4L2 hidden configs
  ANDROID: GKI: Enable CONFIG_BACKLIGHT_CLASS_DEVICE in gki_defconfig
  ANDROID: Incremental fs: Add INCFS_IOC_PERMIT_FILL
  ANDROID: Incremental fs: Remove signature checks from kernel
  ANDROID: Incremental fs: Pad hash blocks
  ANDROID: Incremental fs: Make fill block an ioctl
  ANDROID: Incremental fs: Remove all access_ok checks
  Linux 4.19.111
  batman-adv: Avoid free/alloc race when handling OGM2 buffer
  efi: Add a sanity check to efivar_store_raw()
  net/smc: cancel event worker during device removal
  net/smc: check for valid ib_client_data
  ipv6: restrict IPV6_ADDRFORM operation
  i2c: acpi: put device when verifying client fails
  iommu/vt-d: Ignore devices with out-of-spec domain number
  iommu/vt-d: Fix the wrong printing in RHSA parsing
  netfilter: nft_tunnel: add missing attribute validation for tunnels
  netfilter: nft_payload: add missing attribute validation for payload csum flags
  netfilter: cthelper: add missing attribute validation for cthelper
  ...

Conflicts:
	arch/arm64/configs/gki_defconfig
	arch/x86/configs/gki_defconfig
	drivers/devfreq/Kconfig
	drivers/dma-buf/dma-buf.c
	include/linux/usb/quirks.h
	kernel/sched/topology.c

Change-Id: Ibd305c952c16c253b34d822cf68c03f9ff5be7b3
2020-03-21 19:46:46 +08:00
Tao Huang
949d4b715c Revert "PM / devfreq: Add new device link for sysfs"
This reverts commit 32948d8b86.

See commit a8b1fa6c47 ("Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"")

Conflicts:
	drivers/devfreq/devfreq.c

Change-Id: If4fec73bb1cf38afffd4699dfe25b8c32ea7472f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-21 15:55:11 +08:00
Mark Salyzyn
6a8f31853d ANDROID: update the ABI xml representation
added vb2_* functions

Leaf changes summary: 23 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 23 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

23 Added functions:

  [A] 'function void vb2_buffer_done(vb2_buffer*, vb2_buffer_state)'
  [A] 'function int vb2_dqbuf(vb2_queue*, v4l2_buffer*, bool)'
  [A] 'function int vb2_fop_mmap(file*, vm_area_struct*)'
  [A] 'function __poll_t vb2_fop_poll(file*, poll_table*)'
  [A] 'function ssize_t vb2_fop_read(file*, char*, size_t, loff_t*)'
  [A] 'function int vb2_fop_release(file*)'
  [A] 'function int vb2_ioctl_create_bufs(file*, void*, v4l2_create_buffers*)'
  [A] 'function int vb2_ioctl_dqbuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_expbuf(file*, void*, v4l2_exportbuffer*)'
  [A] 'function int vb2_ioctl_qbuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_querybuf(file*, void*, v4l2_buffer*)'
  [A] 'function int vb2_ioctl_reqbufs(file*, void*, v4l2_requestbuffers*)'
  [A] 'function int vb2_ioctl_streamoff(file*, void*, v4l2_buf_type)'
  [A] 'function int vb2_ioctl_streamon(file*, void*, v4l2_buf_type)'
  [A] 'function void vb2_ops_wait_finish(vb2_queue*)'
  [A] 'function void vb2_ops_wait_prepare(vb2_queue*)'
  [A] 'function void* vb2_plane_vaddr(vb2_buffer*, unsigned int)'
  [A] 'function int vb2_qbuf(vb2_queue*, v4l2_buffer*)'
  [A] 'function int vb2_queue_init(vb2_queue*)'
  [A] 'function void vb2_queue_release(vb2_queue*)'
  [A] 'function int vb2_reqbufs(vb2_queue*, v4l2_requestbuffers*)'
  [A] 'function int vb2_streamoff(vb2_queue*, v4l2_buf_type)'
  [A] 'function int vb2_streamon(vb2_queue*, v4l2_buf_type)'

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151246806
Test: abi check, confirm the various vb2_* functions are now available
Change-Id: Icb568b372c3bb0bd7f71b96f98fb3ae3e417b39d
2020-03-20 11:54:49 -07:00
Mark Salyzyn
86ff68c90a ANDROID: GKI: Enable V4L2 hidden configs
V4L2 is disabled by default, enable common features.

23 Added functions:

  void vb2_buffer_done(vb2_buffer*, vb2_buffer_state)
  int vb2_dqbuf(vb2_queue*, v4l2_buffer*, bool)
  int vb2_fop_mmap(file*, vm_area_struct*)
  __poll_t vb2_fop_poll(file*, poll_table*)
  ssize_t vb2_fop_read(file*, char*, size_t, loff_t*)
  int vb2_fop_release(file*)
  int vb2_ioctl_create_bufs(file*, void*, v4l2_create_buffers*)
  int vb2_ioctl_dqbuf(file*, void*, v4l2_buffer*)
  int vb2_ioctl_expbuf(file*, void*, v4l2_exportbuffer*)
  int vb2_ioctl_qbuf(file*, void*, v4l2_buffer*)
  int vb2_ioctl_querybuf(file*, void*, v4l2_buffer*)
  int vb2_ioctl_reqbufs(file*, void*, v4l2_requestbuffers*)
  int vb2_ioctl_streamoff(file*, void*, v4l2_buf_type)
  int vb2_ioctl_streamon(file*, void*, v4l2_buf_type)
  void vb2_ops_wait_finish(vb2_queue*)
  void vb2_ops_wait_prepare(vb2_queue*)
  void* vb2_plane_vaddr(vb2_buffer*, unsigned int)
  int vb2_qbuf(vb2_queue*, v4l2_buffer*)
  int vb2_queue_init(vb2_queue*)
  void vb2_queue_release(vb2_queue*)
  int vb2_reqbufs(vb2_queue*, v4l2_requestbuffers*)
  int vb2_streamoff(vb2_queue*, v4l2_buf_type)
  int vb2_streamon(vb2_queue*, v4l2_buf_type)

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151246806
Test: abi check, confirm the various vb2_* functions are now available
Change-Id: I6e20c12c645fd45801b24f922c66508b667ea371
2020-03-20 11:54:29 -07:00
Elaine Zhang
93993a9497 soc: rockchip: power-domain: export pd on/off and pd status
Some special applications of video may require:
rockchip_pmu_pd_on(dev)---> force power on pd
rockchip_pmu_pd_off(dev)---> force power down pd
rockchip_pmu_pd_is_on(dev)---> pd status

Change-Id: I264d76559aef0b0540130bf29a4635a3f5380a7c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-03-20 14:04:48 +08:00
Sandeep Patil
cb451596b6 ANDROID: GKI: Enable CONFIG_BACKLIGHT_CLASS_DEVICE in gki_defconfig
Bug: 151952955
Test: Builds

Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: I4cd8086f185735daec1df7d52d4ec668249f6a3e
2020-03-19 13:26:02 -07:00
Shunhua Lan
175ac072b6 ASoC: rt5640: enable MICBIAS1 when recording from mic
Change-Id: I7dd50309618835f712f85408e2281f7bd5e8b6b1
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2020-03-19 19:10:27 +08:00
Elaine Zhang
4a90327b81 arm64: dts: rockchip: Improve the aclk_cci frequency for rk3399
The initialization frequency of cci was adjusted from 300M to 600M.

Change-Id: I36ea20ec84c97f893894687ce4eb7bd021d372a0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-03-19 17:36:15 +08:00
Paul Lawrence
1530be50af ANDROID: Incremental fs: Add INCFS_IOC_PERMIT_FILL
Provide a securable way to open a file for filling

Test: incfs_test passes
Bug: 138149732
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ib4b6fd839ad30ce08e31121d19e2c0d7066d302f
2020-03-18 09:57:55 -07:00
Paul Lawrence
73e7d65693 ANDROID: Incremental fs: Remove signature checks from kernel
Test: selftests pass
Bug: 133435829
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ia7e69b1b0176202da4b418ea815b370cbdacd5c2
2020-03-18 09:57:55 -07:00
Paul Lawrence
538096344f ANDROID: Incremental fs: Pad hash blocks
Test: incfs_test passes
Bug: 133435829
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I4e6fbd0938f00e7e6883ce1a26cbfd38fdcaa9a5
2020-03-18 09:57:54 -07:00
Paul Lawrence
70539f7cfd ANDROID: Incremental fs: Make fill block an ioctl
Filling blocks is not equivalent to writing a file, since they are
constrained by the root hash. selinux policy may wish to treat them
differently, for instance.

Test: incfs_test passes
Bug: 138149732
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ic369b84b92547b1cfefe422bd881c4e466090aed
2020-03-18 09:57:54 -07:00
Paul Lawrence
e2999b39c7 ANDROID: Incremental fs: Remove all access_ok checks
They provide no value and simply duplicate a check in copy_from/to_user

Test: incfs_test passes
Bug: 138149732
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Icc6054a2d6a495c9a03cd1507dda1ab8ca0b0dc4
2020-03-18 09:57:30 -07:00
Wyon Bi
f2534b7494 phy/rockchip: Add support for INNOSILICON LVDS/TTL PHY
Innosilicon LVDS/TTL PHY implements LVDS TIA/EIA protocol.
Normally, Innosilicon LVDS/TTL PHY contains four 7-bit
parallel-load serial-out shift registers, a 7X clock PLL,
and five Low-Voltage Differential Signaling (LVDS) line drivers
in a single integrated circuit. These functions allow 28 bits
of single-ended LVTTL data to be synchronously transmitted over
five balanced-pair conductors for receipt by a compatible receiver.

In addition, Innosilicon LVDS/TTL PHY could extend from 4 lanes
to N lanes (N is required by the customer). Therefore, the TTL
lines extend respectively.

Change-Id: Ib48537c49dec919e2ed5bc6347217fe83be07371
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-03-18 16:59:05 +08:00
Zhihuan He
3faae53fc3 arm64: dts: rockchip: modify rk3368-808-evb vop dclk mode
modify vop-dclk-mode to 1 for rk3368-808-evb to fix
screen display glitter.

Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: Ib13304b5e97626e76dafad91ba296f37b9b3159a
2020-03-18 15:50:06 +08:00
Greg Kroah-Hartman
bfe2901c20 Merge 4.19.111 into android-4.19
Changes in 4.19.111
	phy: Revert toggling reset changes.
	net: phy: Avoid multiple suspends
	cgroup, netclassid: periodically release file_lock on classid updating
	gre: fix uninit-value in __iptunnel_pull_header
	inet_diag: return classid for all socket types
	ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
	ipvlan: add cond_resched_rcu() while processing muticast backlog
	ipvlan: do not add hardware address of master to its unicast filter list
	ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
	ipvlan: don't deref eth hdr before checking it's set
	net/ipv6: use configured metric when add peer route
	netlink: Use netlink header as base to calculate bad attribute offset
	net: macsec: update SCI upon MAC address change.
	net: nfc: fix bounds checking bugs on "pipe"
	net/packet: tpacket_rcv: do not increment ring index on drop
	net: stmmac: dwmac1000: Disable ACS if enhanced descs are not used
	net: systemport: fix index check to avoid an array out of bounds access
	r8152: check disconnect status after long sleep
	sfc: detach from cb_page in efx_copy_channel()
	bnxt_en: reinitialize IRQs when MTU is modified
	cgroup: memcg: net: do not associate sock with unrelated cgroup
	net: memcg: late association of sock to memcg
	net: memcg: fix lockdep splat in inet_csk_accept()
	devlink: validate length of param values
	fib: add missing attribute validation for tun_id
	nl802154: add missing attribute validation
	nl802154: add missing attribute validation for dev_type
	can: add missing attribute validation for termination
	macsec: add missing attribute validation for port
	net: fq: add missing attribute validation for orphan mask
	team: add missing attribute validation for port ifindex
	team: add missing attribute validation for array index
	nfc: add missing attribute validation for SE API
	nfc: add missing attribute validation for deactivate target
	nfc: add missing attribute validation for vendor subcommand
	net: phy: fix MDIO bus PM PHY resuming
	selftests/net/fib_tests: update addr_metric_test for peer route testing
	net/ipv6: need update peer route when modify metric
	net/ipv6: remove the old peer route if change it to a new one
	tipc: add missing attribute validation for MTU property
	devlink: validate length of region addr/len
	bonding/alb: make sure arp header is pulled before accessing it
	slip: make slhc_compress() more robust against malicious packets
	net: fec: validate the new settings in fec_enet_set_coalesce()
	macvlan: add cond_resched() during multicast processing
	cgroup: cgroup_procs_next should increase position index
	cgroup: Iterate tasks that did not finish do_exit()
	iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices
	virtio-blk: fix hw_queue stopped on arbitrary error
	iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint
	netfilter: nf_conntrack: ct_cpu_seq_next should increase position index
	netfilter: synproxy: synproxy_cpu_seq_next should increase position index
	netfilter: xt_recent: recent_seq_next should increase position index
	netfilter: x_tables: xt_mttg_seq_next should increase position index
	workqueue: don't use wq_select_unbound_cpu() for bound works
	drm/amd/display: remove duplicated assignment to grph_obj_type
	ktest: Add timeout for ssh sync testing
	cifs_atomic_open(): fix double-put on late allocation failure
	gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
	KVM: x86: clear stale x86_emulate_ctxt->intercept value
	ARC: define __ALIGN_STR and __ALIGN symbols for ARC
	macintosh: windfarm: fix MODINFO regression
	efi: Fix a race and a buffer overflow while reading efivars via sysfs
	efi: Make efi_rts_work accessible to efi page fault handler
	mt76: fix array overflow on receiving too many fragments for a packet
	x86/mce: Fix logic and comments around MSR_PPIN_CTL
	iommu/dma: Fix MSI reservation allocation
	iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
	iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page
	batman-adv: Don't schedule OGM for disabled interface
	pinctrl: meson-gxl: fix GPIOX sdio pins
	pinctrl: core: Remove extra kref_get which blocks hogs being freed
	drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits
	i2c: gpio: suppress error on probe defer
	nl80211: add missing attribute validation for critical protocol indication
	nl80211: add missing attribute validation for beacon report scanning
	nl80211: add missing attribute validation for channel switch
	perf bench futex-wake: Restore thread count default to online CPU count
	netfilter: cthelper: add missing attribute validation for cthelper
	netfilter: nft_payload: add missing attribute validation for payload csum flags
	netfilter: nft_tunnel: add missing attribute validation for tunnels
	iommu/vt-d: Fix the wrong printing in RHSA parsing
	iommu/vt-d: Ignore devices with out-of-spec domain number
	i2c: acpi: put device when verifying client fails
	ipv6: restrict IPV6_ADDRFORM operation
	net/smc: check for valid ib_client_data
	net/smc: cancel event worker during device removal
	efi: Add a sanity check to efivar_store_raw()
	batman-adv: Avoid free/alloc race when handling OGM2 buffer
	Linux 4.19.111

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ide220f0b6a12d291bda4a83f17cde25bbe64e2ff
2020-03-18 08:19:47 +01:00
Tao Huang
76bc7af016 soc: rockchip: rk_fiq_debugger: lock console in debug_port_init()
debug_port_init() may called when earlycon is used, which may block
kernel init. Use console_lock()/console_unlock() to avoid the race.

Change-Id: I711c038f31141cb5225624e2a9d746bd4de232e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-18 14:29:06 +08:00