Commit Graph

620340 Commits

Author SHA1 Message Date
Finley Xiao
bc3cc8c42f arm64: dts: rockchip: rk3399: Add opp-microvolt-L4 for cpub
From the measured data, the voltage can be reduced a little if pvtm
is greater than 161000.

Change-Id: Icac965ff31d4ed37ae1f40204037a57b7cdf8ba1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-08-06 15:20:45 +08:00
Wyon Bi
38fbfcd985 drm/rockchip: drv: use for_each_available_child_of_node for child iterator
Use for_each_available_child_of_node() for iterating over each
available child instead of iterating over each child and then
checking their status.

Change-Id: I5b426116bdef2101d447c553baa5c6c21b016f6e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-06 12:02:52 +08:00
Finley Xiao
038aaed4a9 thermal: devfreq_cooling: Add support to update stats when get requested power
The power_allocator thermal governor should get utilization of cooling
device to calculate dynamic power, but the powersave, userspace and performance
devfreq governor don't updade stats, so the utilization is inaccurate.

This patch adds support to update status when get requested power, so that
power_allocator can also work properly when use powersave, userspace and
performance devfreq governor.

Change-Id: Ic98fabf46f693a60b0f07094c59e75e4d141e42c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-08-06 12:01:14 +08:00
Tao Huang
72cb0efd59 net: stmmac: never call stmmac_init_tx_coalesce from stmmac_resume
stmmac_init_tx_coalesce will reinit timer when timer is running.

Change-Id: I9db89510858f773a2681f0cd5da22526058a295f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-03 18:08:20 +08:00
Tao Huang
76cab79417 drivers/net/ethernet: remove unused rockchip driver
Change-Id: I73706b525401ae8db6f0185669a43c8a2492fea2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-03 16:39:39 +08:00
Tao Huang
3ec1fd1f19 ARM: Fix register zeroing in cpu_v7_btbinv_switch_mm
Register r2 which is argument of switch_mm is zeroing on
proc-v7-3level.S. On kernel enable LPAE will panic.
Fix it now by backport upstream cpu_v7_bpiall_switch_mm.

Change-Id: I418293ae2cc1c199dd9de94d2c3a101b813598ab
Fixes: d3e24532c5 ("FROMLIST: arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-02 20:49:34 +08:00
Sandy Huang
577aa02a6d drm/rockchip: csi tx: correct csi tx format
When csi tx data type is MIPI_CSI_FMT_YUV422_8BIT, the csi tx
host is still work in raw8 format.

Change-Id: Icbcf457a462c12cf985fd262c185dddb92216412
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-02 09:21:09 +08:00
Johnson Ding
c5d00ceef2 video: rockchip: vcodec: adjust system status base on decoder tasks
Change-Id: Ibcd5789e92d4e80f6d3e51e335c75d5aefa01206
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2019-08-01 16:21:57 +08:00
Finley Xiao
7a8a385403 arm64: dts: rockchip: rk3399: Change minimum voltage to 825mV
It is better to make the voltage greater than 810mV and it will be more
stable.

Change-Id: I4f9294a0629a8c3b83e930f0dec20d939130070d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-08-01 16:20:33 +08:00
Shunqian Zheng
12408f057e media: spi: add mclk for rk1608 driver
RK1608 requires 24M mclk to power on. Some boards(like our
rk1608 board) use external clock source, some are not.

This patch adds 24M mclk reference in rk1608 driver, and
enables it when power on, disables when power off.

Change-Id: I97dc5eeb7c921b53aa2b1edc70926b43a6cc18cd
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-08-01 16:18:58 +08:00
Lin Huang
2e6fa8426c ARM64: configs: rk1808_linux_defconfig: add NVP6324 config
Change-Id: I626804dfcc7fa656a48b6821c5e501c3242b152e
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-08-01 14:12:31 +08:00
Weixin Zhou
01fb8f2040 PCI: rockchip: move the handshake data to the end of 1M
Change-Id: Ia5a6587b3ef8de00434496c111bc035a09d4c6e6
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-07-30 16:02:51 +08:00
Cai YiWei
cbb77ae430 media: rk1608: fix null pointer that no sensor to rk1608
Change-Id: Ida61fd89ad39f641b7add61873a0d0fe05ca66f7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-07-29 21:00:16 +08:00
Cai YiWei
4fc76f3199 media: rockchip: isp1: fix clk gate but isp working
power on->isp start->restart...->power off
isp reset will set clk config to default value, if
isp restart clk isn't to reconfigure.

Change-Id: I2b5ef9883c8ca5e9e142270d935f300395b0ea74
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-07-29 20:56:57 +08:00
Bin Yang
87dea13d05 mfd/fusb302: Add fusb302 suspend/resume functions
We found that the Type-C OTG cable was plugged in while the system
was suspending, it may fail to detect the Type-C OTG cable after
resume. That's because the fusb302 registers will fail to operate
during suspend, this will cause the fusb302 CC logic to be abnormal.
So we should not operate queue_work function while the suspend.

Change-Id: Idc675c25de5452ec39513eb484cfaa75534790cd
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-07-29 20:55:40 +08:00
William Wu
7ce0db0177 usb: gadget: uvc: add a new attribute streaming_intf
This patch adds a new uvc attribute "streaming_intf" to
show the number of streaming interface. The uvc application
program may needs to query the information.

Change-Id: I4554e204ab4457f67f35d2e7bfec2902196f79d3
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-07-29 15:21:42 +08:00
William Wu
354496dcd6 usb: gadget: f_uac1: add iad descriptor
According to the spec "USB Interface Association Descriptor Device
Class Code and Use Model"[1], the Interface Association Descriptor
(IAD) is needed for composite device which has multiple interfaces
controlled independently of each other. Without the IAD, the device
may not work as expected because the USB system software will not
properly bind the interfaces with drivers (e.g UAC1 && UVC composite
device not recognized in Win10).

[1] https://www.usb.org/sites/default/files/iadclasscode_r10.pdf

Change-Id: I446c771fe182bd556a054d9ae0ada1374442d1d0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-07-26 17:32:50 +08:00
Shixiang Zheng
77e8373cd2 video/rockchip: rga2: open rop_mode for user select
Change-Id: I990973d04f693393046985a46e8cd451b1d024e5
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-07-25 16:51:09 +08:00
Frederic Dalleau
e798c70719 UPSTREAM: Bluetooth: Fix memory leak at end of hci requests
In hci_req_sync_complete the event skb is referenced in hdev->req_skb.
It is used (via hci_req_run_skb) from either __hci_cmd_sync_ev which will
pass the skb to the caller, or __hci_req_sync which leaks.

unreferenced object 0xffff880005339a00 (size 256):
  comm "kworker/u3:1", pid 1011, jiffies 4294671976 (age 107.389s)
  backtrace:
    [<ffffffff818d89d9>] kmemleak_alloc+0x49/0xa0
    [<ffffffff8116bba8>] kmem_cache_alloc+0x128/0x180
    [<ffffffff8167c1df>] skb_clone+0x4f/0xa0
    [<ffffffff817aa351>] hci_event_packet+0xc1/0x3290
    [<ffffffff8179a57b>] hci_rx_work+0x18b/0x360
    [<ffffffff810692ea>] process_one_work+0x14a/0x440
    [<ffffffff81069623>] worker_thread+0x43/0x4d0
    [<ffffffff8106ead4>] kthread+0xc4/0xe0
    [<ffffffff818dd38f>] ret_from_fork+0x1f/0x40
    [<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Frederic Dalleau <frederic.dalleau@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Change-Id: Ic74b37024f9a291a94770461eb20a00701f21bf5
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
(cherry picked from commit 9afee94939)
2019-07-25 14:33:40 +08:00
Yao Xiao
1de90e4391 net: rockchip_wlan: cywdhd: remove event log
Change-Id: If6ba371130f654a67962bbcb96766329f26666f8
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
2019-07-25 14:33:40 +08:00
Hu Kejun
14e3f41531 media: rockchip: isp1: add start/stop event for params video
This patch adds two v4l2 events, start/stop streaming, for
userspace to subscribe. With these events, userspace could
init/de-init 3A tuning in proper time.

Only if isp sub-device input format is Raw Bayer and output
format is YUV, the 3A tuning is required.

Change-Id: I027d603fcf6d6901ebcd3762d0889ef8f7603601
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-07-25 14:06:29 +08:00
Allon Huang
248d7b9686 media: rockchip: cif: support sampling raw data
Change-Id: I79ee92ba56277b9a90717521be152ef31454930f
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-07-24 17:41:09 +08:00
Xinhuang Li
e94e5743d4 drm: bridge: dw-hdmi: no need update i2s_select when hdmi audio shutdown
the previous practice will set the reg of i2s_select to select spdif when
audio shutdown and playing spdif at this point will cause the audio to
come out of hdmi as well

Change-Id: I8f9f53ea71ce83b33e32b575bacd2249da3b7d8f
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2019-07-24 17:13:33 +08:00
Lin Huang
186cfa0eb5 arm64: dts: rockchip: rename rk1808-toybrick-compute-stick-v10 to rk1808-compute-stick-emmc
Change-Id: I8c58c913938511e97252157b137b53bc1bf144bc
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-07-24 09:59:06 +08:00
Lin Huang
423b76f854 arm64: dts: rockchip: rk1808-compute: use i2c bus to set tcs452x regulator
after fix hardware error, we can use i2c bus to set tcs452x voltage,
so drop gpio-i2c setting, and use i2c bus.

Change-Id: I9fbec370c815a8451c00e782c1e186849827ea9e
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-07-24 09:59:06 +08:00
Nickey Yang
5a8813571c drm/rockchip: rk3066_hdmi: set edid fifo address
fix edid reading err when edid's block > 2.

Change-Id: I826eedaeb34ddbecb951a0fe46448eb7b1927f65
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-07-23 15:48:03 +08:00
Shixiang Zheng
926e1b0bf8 drm/rockchip: vop: initial enable vop dither up
for rgb565/666 can dither to rgb888

Change-Id: I8936714e6e9cc015f3070111662442b0243d0720
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-07-23 08:36:01 +08:00
Tao Huang
01ef8ae642 Merge branch 'android-4.4' of https://android.googlesource.com/kernel/common
* android-4.4: (728 commits)
  ANDROID: overlayfs ovl_create_of_link regression
  Linux 4.4.185
  dmaengine: imx-sdma: remove BD_INTR for channel0
  KVM: x86: degrade WARN to pr_warn_ratelimited
  arm64, vdso: Define vdso_{start,end} as array
  ARC: handle gcc generated __builtin_trap for older compiler
  tty: rocket: fix incorrect forward declaration of 'rp_init()'
  btrfs: Ensure replaced device doesn't have pending chunk allocation
  lib/mpi: Fix karactx leak in mpi_powm
  ALSA: usb-audio: fix sign unintended sign extension on left shifts
  ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages
  ALSA: seq: fix incorrect order of dest_client/dest_ports arguments
  crypto: user - prevent operating on larval algorithms
  ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME
  MIPS: Workaround GCC __builtin_unreachable reordering bug
  bug.h: work around GCC PR82365 in BUG()
  swiotlb: Make linux/swiotlb.h standalone includible
  mfd: omap-usb-tll: Fix register offsets
  MIPS: math-emu: do not use bools for arithmetic
  ARC: fix build warning in elf.h
  ...

Conflicts:
	arch/powerpc/include/asm/uaccess.h
	init/main.c

Change-Id: Id051d868db07f52078938c2441a275f8f24c7076
2019-07-22 17:31:10 +08:00
Mark Salyzyn
17bd9a7f78 ANDROID: overlayfs ovl_create_of_link regression
A comedy of errors caused a regression.

Fixes a regression in commit 272fcd1ca7
("ANDROID: overlayfs: override_creds=off option bypass creator_cred")

in combination with

commit aab9adb4b8
("Merge 4.4.179 into android-4.4") that took in an incomplete
backport of commit 54a07fff4b
("ovl: fix uid/gid when creating over whiteout") (or upstream
commit d0e13f5bbe
("ovl: fix uid/gid when creating over whiteout"))

which did not recognize that ovl_override_creds can return a NULL
pointer.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
(cherry picked from https://lore.kernel.org/patchwork/patch/1009299)
Bug: 109821005
Bug: 112955896
Bug: 127298877
Bug: 137541192
Change-Id: Ia6b71a653d1bf728db610e384864bd82d335b923
2019-07-19 17:09:30 +00:00
Hu Kejun
94904c5f23 media: rockchip: isp1: fix warning of "Unbalanced enable for IRQ"
Change-Id: I2ad48313b18a95ec81bad197aa1078a999a26d39
Fixes: aaaa072ed1 ("media: rockchip: isp1: fix receive mipi isr before isp clock resume")
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-07-19 11:16:18 +08:00
Wenping Zhang
0f1d20c61a usb: gadget: function: f_rndis: return if recieved rndis command is error.
if rndis recieved an error command, will cause req is an illegal pointer,
which will cause kernel panic.

Change-Id: I60224f78783c1f1ce002b09866aab9fa1dc77526
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2019-07-19 11:14:56 +08:00
Jon Lin
dea3b4a522 drivers: rkflash: add new SPI Nannd flash
GD5F1GQ4R

Change-Id: I652526171576bd51d10dc8923bbb5e2c69f28975
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-19 10:59:32 +08:00
Nickey Yang
9233e8c2c0 ARM: dts: rockchip: fix backlight's pwm polarity for rk3288-evb-rk808-linux
Change-Id: If145f03391cfd44f2455fa45658f15863fb00d43
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-07-18 18:07:55 +08:00
Peter Chen
4aae5a78e9 UPSTREAM: usb: gadget: function: f_rndis: socket buffer may be NULL
In eth_start_xmit, the socket buffer may be NULL. So, add NULL pointer
check at .wrap API.

Change-Id: I635b804120f8b91bd84cfea268dc06af07d867ba
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
(cherry picked from commit 80d1642d76)
2019-07-18 14:46:13 +08:00
Caesar Wang
3f40fb9196 input/touchscreen: fixes s2r for gsl3673
The Android will callback the fb_bank to notice for the early suspend
and late resume. In order to keep using the pm sleep and fb callback way
with this patch.

Change-Id: Ia32ccbede1c6f2b579ad4d21371f2c1774fe4440
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-07-17 14:51:45 +08:00
Lars-Peter Clausen
f7fbeb90fd UPSTREAM: ALSA: pcm_dmaengine: Properly synchronize DMA on shutdown
Use the new dmaengine_synchronize() function to make sure that all complete
callbacks have finished running before the runtime data, which is accessed
in the completed callback, is freed.

This fixes a long standing use-after-free race condition that has been
observed on some systems.

Change-Id: Id99a1acaa2db537fcee6d10ecc94c831bb0a6faa
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit bc0e734516)
2019-07-17 09:50:31 +08:00
Wyon Bi
12ffbc5dbd drm/rockchip: cdn-dp: ignore firmware fallback mechanism
Change-Id: I54245832728c956ea67be9f82cf4abd2ed8fbded
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-07-17 09:48:00 +08:00
Nickey Yang
def62677f3 ARM: dts: rockchip: rk3288-linux: add ramoops node
for get last log from /sys/fs/pstore/console-ramoops

Change-Id: I17ec56687c3f2f95d5780166349bd5cf403e8f91
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-07-17 09:43:42 +08:00
Zefa Chen
e116396f94 media: i2c: add SC132GS driver
Change-Id: I3b39752bddb2035bbd61828c8c86427901c973db
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-07-15 19:51:53 +08:00
Shunqian Zheng
72ea36e892 media: rkisp1: enable userptr io mode
Enable VB2_USERPTR mode. vb2_dma_contig takes care
the rest of details except the vb2_plane_vaddr().

Change-Id: Id23e0c9ef7b3332fcb3be57c71c4178e181d7141
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-07-15 14:18:00 +08:00
Hu Kejun
aaaa072ed1 media: rockchip: isp1: fix receive mipi isr before isp clock resume
The mipi interrupt is auto on in resume operation,
so we may receive interrupt before isp clock resume,
and the kernel will be dead when access isp register in mipi isr function.

Change-Id: I73779111cb103457b0a4f125d8e4c9420a2d8553
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-07-15 14:15:48 +08:00
Algea Cao
851acc8116 drm: set wait_for_completion_timeout to 1s for commit clean up
Waitting 100ms for time out is too short, which may cause
system crash when hdmi hotplug.

Change-Id: I46c8520e9a8cfe8ac2c65abb555d86bb0ecaa3ee
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-15 14:14:26 +08:00
Finley Xiao
916e282891 PM / devfreq: rockchip_dmc: Update stats in a fixed rate scene
Now we set the load of fixed rate scene to 100%, it isn't accurate,
it is better to update stats if auto freq is enabled.

Change-Id: I7de2c5f0b218cbeb32340bf3287cee0565773785
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-07-12 15:09:52 +08:00
Jon Lin
51f2b2c0d0 rkflash: add new SPI Nand flash
FM25S01, HYF1GQ4UPACAE, EM73E044SNA-G, GD5F2GQ5UEYIG

Change-Id: Id6f50b06a27631cf14e1df6deb39cf0600866bec
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-12 11:49:47 +08:00
Wu Jingchen
9254b386f8 arm64: dts: rockchip: px30-evb-ddr3-v10: fix vcc5v0_host to SWITCH_REG2
Change-Id: I260f7364f52251976dfa7bbce810b8b1df80a8fe
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2019-07-12 09:19:05 +08:00
Finley Xiao
06f7a44624 MALI: midgard: Fix power coefficient overflow
Change-Id: Ie0ceca32a33a5a8da56d3a32913e819a7e31e45b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-07-11 19:35:45 +08:00
Janusz Dziedzic
a70b151d49 UPSTREAM: usb: gadget: f_hid add super speed support
Add super speed descriptors to f_hid.

Change-Id: I34646921ded248a8c29780c05e5fa422d0bed31f
Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit dbf499cf72)
2019-07-11 16:12:19 +08:00
Philipp Zabel
72b334d84d UPSTREAM: media: uvcvideo: Fix driver reference counting
kref_init initializes the reference count to 1, not 0. This additional
reference is never released since the conversion to reference counters.
As a result, uvc_delete is not called anymore when UVC cameras are
disconnected.
Fix this by adding an additional kref_put in uvc_disconnect and in the
probe error path. This also allows to remove the temporary additional
reference in uvc_unregister_video.

Change-Id: Ief203c8e090b57174ab76e9b0a8f88b7afd17cbb
Fixes: 9d15cd958c ("media: uvcvideo: Convert from using an atomic variable to a reference count")
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit f9ffcb0a21)
2019-07-11 14:12:11 +08:00
Weixin Zhou
64d870b993 PCI: rockchip: add DW PCIe supend/resume
Change-Id: Iab4123e9b667205a868528f2d981f16d0a271102
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-07-11 11:54:36 +08:00
Shengqin Zhang
53acc64a4b media: rk1608: add lock for spi2apb
Change-Id: Ie841f4a496250ee86da7e5a0ae2bcef1c623e43c
Signed-off-by: Shengqin Zhang <zsq@rock-chips.com>
2019-07-10 19:42:35 +08:00