Commit Graph

853392 Commits

Author SHA1 Message Date
Finley Xiao
a74a2368f8 clk: rockchip: Fix mask for clk_register_mux_table()
Change-Id: Ic9312fa4a6feed19206e966e97c54c4d47e11f47
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-03-30 21:43:50 +08:00
Jianqun Xu
d9ed60476f dt-bindings: pinctrl: rockchip support RK_FUNC_{5,15}
Change-Id: Ic328589e110c5968b67742d055cdb18269153954
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-03-30 14:11:06 +08:00
Jack Mitchell
e50c6a6518 UPSTREAM: watchdog: dw_wdt: ping watchdog to reset countdown before start
Currently on an rk3288 SoC when trying to use the watchdog the SoC will
instantly reset. This is due to the watchdog countdown counter being set
to its initial value of 0x0. Reset the watchdog counter before start in
order to correctly start the countdown timer from the right position.

Change-Id: I127b1b83ff6d459a45139847092ddbfa56c60bcd
Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200107155155.278521-1-ml@embed.me.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e7046df873)
2020-03-30 11:37:12 +08:00
Jon Lin
c3fb2a45a6 spi: rockchip-test: make spi configurable
Change-Id: Ib108ff43db462b6cbd2a2b87641169e0e36f1dc0
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-30 10:52:28 +08:00
Jon Lin
003cda69a2 drivers: rkflash: fix compile error
1.more undefined references to `__memzero' follow
2.fix to MTD return value

Change-Id: I1adf89873db1e85568deaf2941867b8d45252eff
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-30 10:29:36 +08:00
Tao Huang
67df1daf88 rfkill: Introduce Rockchip RFKILL driver
Allow rfkill-bt.c and rfkill-wlan.c build as module.
Add CONFIG_RFKILL_RK which default y.

Change-Id: I1d399641587124d2291b5b49e5538e7e490a843a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-28 17:17:28 +08:00
Tao Huang
8561febee7 mmc: pwrseq: export mmc_pwrseq_power_off()
net/rfkill/rfkill-wlan.c use mmc_pwrseq_power_off()

Change-Id: I761788f58418604c43f367b48dfe4bb2ff971d48
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-03-28 17:17:28 +08:00
Jianqun Xu
2cf509da1d ASoC: codecs: rk817 fix shut down crash issue
Requesting system reboot
[    7.936347] Unable to handle kernel NULL pointer dereference at virtual address 00000044
[    7.937081] pgd = (ptrval)
[    7.937332] [00000044] *pgd=3d817835, *pte=00000000, *ppte=00000000
[    7.937917] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[    7.938402] Modules linked in:
[    7.938699] CPU: 0 PID: 631 Comm: init Not tainted 4.19.111 #100
[    7.939238] Hardware name: Generic DT based system
[    7.939686] PC is at snd_soc_component_update_bits+0x8/0x70
[    7.940203] LR is at rk817_codec_power_down+0x170/0x1cc

Change-Id: I68bb761346322750214f9fae8537d825d72f4a44
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-03-28 16:04:15 +08:00
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