Commit Graph

862785 Commits

Author SHA1 Message Date
Finley Xiao
8f4038c7e1 ARM: dts: rv1126: Fix voltage for NPU 200MHz~500MHz
For some chips, the Vmin of NPU 200MHz is the same as NPU 600MHz.

Change-Id: I74bb792473c38d5a16d7f79d8eb8f7ef4feff3b8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-03-01 14:58:14 +08:00
Finley Xiao
f4027fb3af ARM: dts: rv1126: Change aclk venc to 297MHz for readability
Change-Id: I8d9248ea9e99a0b443b56f93bf4b72f61eb637f0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-03-01 14:57:49 +08:00
Finley Xiao
5d0abc6b4d ARM: dts: rv1126: Assign clk venc core to 396MHz
As the maximum frequency of some chips is 500MHz, set the initial value
to the normal rate 396MHz.

Change-Id: I2ee84ac1672b390d9d5ec221d1d7fd0db6fd0566
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-03-01 14:57:00 +08:00
Vicent Chi
bbf4a44c7b media: i2c: sc210iot: support thunderboot mode
Change-Id: Iebc228b723269f2f0ab4fa9deb302e30277a1b50
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2021-03-01 10:38:22 +08:00
Weiguo Hu
d43184d461 net: rockchip_wlan: bcmdhd_wifi6: modify module mame to bcmdhd
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Change-Id: Ibbe444c76b647543afd9b4d74914a79789015dd6
2021-02-26 16:39:11 +08:00
Tao Huang
bd95fea1ea scripts/gcc-wrapper.py: ignore vfs.c:1259
fs/incfs/vfs.c: In function 'ioctl_create_file':
fs/incfs/vfs.c:1259:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4a9e167927d32180871776767fe3e4ff0c8342a9
2021-02-26 16:18:21 +08:00
Tao Huang
b50aca0c9a Merge tag 'ASB-2021-02-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-02-01
CVE-2017-18509
CVE-2020-10767

* tag 'ASB-2021-02-05_4.19-stable': (809 commits)
  ANDROID: GKI: fix up abi issues with 4.19.172
  Linux 4.19.172
  fs: fix lazytime expiration handling in __writeback_single_inode()
  writeback: Drop I_DIRTY_TIME_EXPIRE
  dm integrity: conditionally disable "recalculate" feature
  tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
  tracing: Fix race in trace_open and buffer resize call
  HID: wacom: Correct NULL dereference on AES pen proximity
  futex: Handle faults correctly for PI futexes
  futex: Simplify fixup_pi_state_owner()
  futex: Use pi_state_update_owner() in put_pi_state()
  rtmutex: Remove unused argument from rt_mutex_proxy_unlock()
  futex: Provide and use pi_state_update_owner()
  futex: Replace pointless printk in fixup_owner()
  futex: Ensure the correct return value from futex_lock_pi()
  futex: Prevent exit livelock
  futex: Provide distinct return value when owner is exiting
  futex: Add mutex around futex exit
  futex: Provide state handling for exec() as well
  futex: Sanitize exit state handling
  ...

Change-Id: Ieba6ee3a91a05d504e1f829a84e7d364e7d983f2

Conflicts:
	arch/arm64/boot/dts/rockchip/rk3328.dtsi
	drivers/md/Kconfig
	drivers/usb/gadget/function/f_uac2.c
2021-02-26 15:30:04 +08:00
Tao Huang
ab9fb85b0b Revert "usb: gadget: composite: fix dead lock when uvc disconnect"
This reverts commit b43b8174c1.

Relpaced by commit fc9f57f643 ("usb: gadget: Fix spinlock lockup on usb_function_deactivate")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-02-26 15:12:48 +08:00
Tao Huang
9360dab604 Revert "irqchip/gic-v3-its: set flag "ITS_FLAGS_SAVE_SUSPEND_STATE" if rk3568 or rk3566"
This reverts commit 330a359767.

Relpaced by commit 0c486401a3 ("irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-02-26 15:12:42 +08:00
Sandy Huang
d57d8b4d14 drm/rockchip: vop: update BCSH process precision
Change-Id: Ib3d6e51b17def968656bbd625afd5e55f355011f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-02-26 14:34:01 +08:00
Longjian Lin
2068f8fa2d ARM: dts: rk3288-evb-android-rk808-edp: enable route_hdmi
Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: I0230c21775bcca79f7a94dcba1cc1e6de50c0a27
2021-02-26 14:30:58 +08:00
Zhenke Fan
2443b518f1 media: i2c: sc500ai: fix set vflip/hflip failed bug
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Iaa36ece66310489a8576c5eeb4137779af412a48
2021-02-26 14:23:28 +08:00
Caesar Wang
a4500ae7f2 arm64/configs: merge bifrost configs into rockchip_linux_defconfig
The GPU driver and dts had uploaded some CLs to support it, as below:

driver:
a519839892 ("MALI: midgard: change kbase_platform_driver.driver.name to "midgard"")
a9f72d8212 ("MALI: bifrost: remove 'of_device_id' instances related to midgard")
5a1b8a4b4b ("MALI: midgard: add and include rename.h")

dts:
a400cac168 ("arm64: dts: rockchip: rk3568: gpu: only use "arm,mali-bifrost"...")

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I2dfdf09e7251e4efa8c80fb152cd189a147f917e
2021-02-26 10:47:52 +08:00
Cai YiWei
157c77620d media: rockchip: isp and ispp add shutdown
Change-Id: Iec748f28a6662c104b66a2ab44e0946515061320
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-02-26 10:46:15 +08:00
Chen Jinsen
6cc79bc4ef ARM: dts: rk3288-evb-android-rk808-edp-avb: adjust advanced-rates of hevc
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I9d14612e7e3725bfff00248ee15cc4ace63c2b62
2021-02-26 10:43:56 +08:00
Jianqun Xu
b29ef8b22b staging: android: ion: skip sync for uncached buffer
Fixes: fb4e66e115 ("android: ion: pass in DMA_ATTR_SKIP_CPU_SYNC when
calling dma_(un)map_sg_attrs()")
Change-Id: Ia2235a53d5c023a3fdd9de22686be39bbaa5093d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-02-26 10:41:15 +08:00
Jianqun Xu
bec15067c2 staging: android: ion: do cache flush for system heap pages
Change-Id: I57505aaee2c2f9af796313bfc729cef0ce9cfece
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-02-26 10:41:15 +08:00
Zorro Liu
c51d10ea44 drm/rockchip: ebc_dev: release version v1.04
pvi_waveform: update
1.support version 0x09, 0x16, 0x43 wbf file
2.fix lut table some err
3.remove no use code

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I045dbc72064a00e15ac4eaff4b385ad853353b99
2021-02-26 10:31:13 +08:00
Ding Wei
ff8eab35e1 ARM: dts: rockchip: rk3288: hevc_service: add default val setting
Change-Id: I3f71fe50e8b51e21728afae850f0aca21b8b160c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-25 18:08:27 +08:00
Ding Wei
b1b96334c4 video: rockchip: mpp: rkvdec: add clock strategy according to resolution
if pixels large than default which set in dtsi, use advanced-rates.
otherwise, use normal-rages.

Change-Id: I488c2815dbe1e3decd1d305a78bf523d944d1e96
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-25 18:08:06 +08:00
Sandy Huang
f6d1c63b4d drm/rockchip: vop2: add support cubic lut
Change-Id: Iebf89a10b4bdfe630212b393019e926b6dde0e22
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-02-25 16:47:23 +08:00
Sandy Huang
9906f3cefd drm/rockchip: vop2: update for gamma lut config
1. move some gamma parameter from vop to vp;
2. add support atomic api for gamma lut;

Change-Id: Id54316fbbba4d07375fa51ca47790a01ea9c29f5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-02-25 16:47:23 +08:00
Sandy Huang
650f40f040 drm/rockchip: vop: add support atomic api for gamma lut
Change-Id: Idc1d635693e14e1fe35d8f03e3707c58dd21c468
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-02-25 16:47:23 +08:00
Sandy Huang
34622060bf FROMLIST: drm: Extend color correction to support 3D-CLU
Extend the existing color management properties to support provision
of a 3D cubic look up table, allowing for color specific adjustments.

Signed-off-by: Kieran Bingham<kieran.bingham+renesas@ideasonboard.com>
Co-developed-by: Laurent Pinchart<laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart<laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham<kieran.bingham+renesas@ideasonboard.com>
Link: https://lore.kernel.org/dri-devel/20201221015730.28333-4-laurent.pinchart+renesas@ideasonboard.com/
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifa62b1fbf4195fffaf2f06c9990ca4f48b71dca7
2021-02-25 16:47:06 +08:00
shengfei Xu
97f2daa2e2 arm64: dts: rockchip: rk3568: adjust suspend mode define
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I19744999dcc2f9a1ee2bd332661acc5bf8c83837
2021-02-25 16:26:01 +08:00
William Wu
a73f42850a usb: dwc3: core: fix NULL pointer dereference when plug out otg host
When do hot plug test on RK3566 Tablet with Type-C to Type-A receptacle.
The dwc3 driver may receive the EXTCON_USB_HOST notifier with disconnect
state twice occasionally, then it do dwc3_host_exit() repeatedly and cause
panic issue with the following log:

[  260.793245] xhci-hcd xhci-hcd.4.auto: remove, state 4
[  260.796706] xhci-hcd xhci-hcd.4.auto: USB bus 2 deregistered
[  260.797889] xhci-hcd xhci-hcd.4.auto: remove, state 1
[  261.286875] xhci-hcd xhci-hcd.4.auto: USB bus 1 deregistered
[  261.289416] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000070
[  261.290353] Mem abort info:
[  261.290624]   ESR = 0x96000005
[  261.290911]   Exception class = DABT (current EL), IL = 32 bits
[  261.291501]   SET = 0, FnV = 0
[  261.291785]   EA = 0, S1PTW = 0
[  261.292065] Data abort info:
[  261.292323]   ISV = 0, ISS = 0x00000005
[  261.292660]   CM = 0, WnR = 0
[  261.293009] user pgtable: 4k pages, 39-bit VAs, pgdp = 000000005d271f4e
[  261.293610] [0000000000000070] pgd=0000000000000000, pud=0000000000000000
[  261.294221] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[  261.294726] Modules linked in: rknpu
[  261.295059] Process kworker/0:3 (pid: 1785, stack limit = 0x000000006a077ac4)
[  261.295693] CPU: 0 PID: 1785 Comm: kworker/0:3 Not tainted 4.19.161 #52
[  261.296276] Hardware name: Rockchip RK3566 RK817 TABLET LP4X Board (DT)
[  261.296892] Workqueue: events_freezable __dwc3_set_mode
[  261.297371] pstate: 60c00009 (nZCv daif +PAN +UAO)
[  261.297817] pc : kernfs_find_ns+0x24/0x118
[  261.298186] lr : kernfs_find_and_get_ns+0x3c/0x60
[  261.298607] sp : ffffff800f90bbd0
...
[  261.411635]
[  261.411780] Call trace:
[  261.412026]  kernfs_find_ns+0x24/0x118
[  261.412366]  kernfs_find_and_get_ns+0x3c/0x60
[  261.412757]  sysfs_unmerge_group+0x20/0x60
[  261.413125]  dpm_sysfs_remove+0x3c/0x78
[  261.413471]  device_del+0x98/0x3f8
[  261.413778]  platform_device_del+0x2c/0xa8
[  261.414139]  platform_device_unregister+0x14/0x30
[  261.414561]  dwc3_host_exit+0x78/0x90
[  261.414893]  __dwc3_set_mode+0x39c/0x3a0
[  261.415250]  process_one_work+0x1a0/0x418
[  261.415611]  worker_thread+0x32c/0x3e0
[  261.415950]  kthread+0x12c/0x158
[  261.416247]  ret_from_fork+0x10/0x18

This patch checks the drd_connected status before handle
disconnect process for host to avoid duplicating unregister
platform device.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I815d800febea89dbf1f5f84eba8efd9e910e3e9a
2021-02-25 15:43:09 +08:00
Shawn Lin
42cdb424bb arm64: dts: rockchip: rk3568: Add Legacy INT support for PCIe
Change-Id: I9afd5332467d35e3450a228a8cb4d7f94426881a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-02-25 14:28:32 +08:00
Shawn Lin
4788e0cb75 PCI: rockchip: dw: Concretely support Legacy INT for ancient devices
All modern devices support MSI or even MSI-X, but some very ancient devices
such as PCI devices may also like to only support PCI legacy INT. Although
it's very unlikely to happened but we at least need a method to make PCIe
work if anything wrong with GIC its support.

Change-Id: I917af7c8986977e3ae5944e9cc89a8e3409a8cd9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-02-25 14:28:25 +08:00
LongChang Ma
a4b7920b3e arm64/configs: update rockchip_linux_defconfig
1/ enable CONFIG_PHY_ROCKCHIP_CSI2_DPHY
Use the rk3568 mipi dphy hw driver

2/ change HZ to 300
There is no need to keep HZ=1000 after commit 3be6453a90
("kthread: do not preempt current task if it is going to call schedule()").

3/ disable rockchip ebc dev driver by default

Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: Ie653a629791bbdbdbf0e8fdae77d2f802be946ac
2021-02-25 11:42:45 +08:00
William Wu
c03b975591 phy: rockchip: inno-usb2: fix charger detection error
We found a charger detection error on RK3566 Tablet.

1. Plug in a Type-C to Type-A cable and connect to PC USB Host
   or USB charger, then the charger detection is normal.

2. Plug out the cable, then the charger disconnection detection
   is normal.

3. Plug in a Type-C to Type-A receptacle and plug out again. Then
   the charger is detected unexpectedly.

To fix this issue, reinitialize the cable state of USB charger to
EXTCON_NONE when USB charger is disconnected.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ic56e4ee865af129c222f4c90c3d6e753f4e785bd
2021-02-25 11:09:13 +08:00
Shawn Lin
966f18657f arm64: dts: rockchip: rk3568: Use 100M input clock for combphy2_psq
Change-Id: I3277235da6582da6e66932864e3f6c38b37e1fd4
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-02-24 19:02:40 +08:00
Dingxian Wen
319160e952 ARM: rockchip_defconfig: enable CONFIG_VIDEO_RK628CSI
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: If74953d5d881560d778098f3c18b909e8d8cf42d
2021-02-24 15:26:36 +08:00
Dingxian Wen
951a29b370 ARM: dts: rockchip: add rk3288-evb-rk628-hdmi2csi-avb.dts
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I2ed29407a36836d73c54b41a3d83a032224f6c17
2021-02-24 14:38:33 +08:00
Dingxian Wen
861438e0fd media: i2c: rk628csi: add rk628csi HDMI to MIPI CSI-2 bridge driver
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I0e4d75763ffd4edbc4e3c3ab7c9f6e7f0b69bbf7
2021-02-24 14:38:33 +08:00
Tao Huang
f0c81ce474 drm/rockchip: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops
Restore upstream commit 72b6bcb1a2 ("drm/rockchip: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I523336e7d9374ed535c558e5ab49d9b8f89cfb8f
2021-02-24 11:41:42 +08:00
Lin Jinhan
a3843c2fad ARM: dts: rv1126: support enable rng and crypto module at the same time
Change-Id: I525f29520221f7139092c8884075048e0245fc22
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-02-24 11:33:30 +08:00
Lin Jinhan
8ac6165349 crypto: rockchip: crypto v2: compatible with rng modules
Crypto V2 regs should divided into two parts when rng is belonging
to crypto module.

Change-Id: Ib976851b845ff8cdccc607a677266bb61f54ae18
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-02-24 11:33:30 +08:00
Lin Jinhan
1dc8aff822 crypto: rockchip: use devm_clk_bulk_get_all instead of devm_clk_bulk_get
Change-Id: I0af82671c0a835fb4b3a35c5b65de19a9414f843
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-02-24 11:33:30 +08:00
Lin Jinhan
d6ca830ccf hwrng: rockchip: v2: support separate rng from crypto v2
If rng reg set equle to crypto v2 reg, it should add 0x400 offset.

Change-Id: I591d20ea048090a3250cbc53f9dbb27a6c1b3660
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-02-24 11:33:30 +08:00
Lin Jinhan
1146007738 crypto: rockchip: ahash: fix statesize error
API export&import is using feedback tfm, statesize should be equal to
feedback tfm's statesize, otherwise it will trigger WARN_ON in testmgr
module.

Change-Id: I450b74549dc962b93a0654d83869366868b78363
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-02-24 11:33:30 +08:00
Dingxian Wen
4dac63bc50 media: v4l2-controls_rockchip: add private controls for audio
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I6f4f68d46f94924cab1530ec459f95bc0e4ca5a8
2021-02-24 11:21:07 +08:00
Dingxian Wen
033c4bd29f drm: rockchip: rk628: add rk628 combrx-phy support for HDMIRX cable mode
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4c02fb6add7cce5fef8a52853c35f113b53040ff
2021-02-24 11:21:07 +08:00
Andy Yan
b7ad7adb04 Revert "drm/rockchip: framebuffer: add rockchip_fbdev_blank"
This reverts commit 2d36048f1c.
Which causes some confused behavior in suspend and resume.

Change-Id: Ibff257aea6bcecc9a012397d83a9d8a1ffd02132
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-24 10:39:32 +08:00
Ding Wei
c22b38d86a video: rockchip: mpp: add strategy to adjust clocks
method: when meets large resolution, higher clocks will be set.
if pixels less default_max_load, clocks use normal-rates setting.
otherwise, use advanced-rates instead.

Change-Id: I7e3c21903f02e3dbc7f84ea8084610ac76738c27
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:37:18 +08:00
Ding Wei
aedde11d4e video: rockchip: mpp: rkvdec2: add codec_info
the codec_info is similar to rkvenc && vepu.

Change-Id: I2dfb1ceaaf582e16a8525ed2286768bf1296542a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:37:08 +08:00
Ding Wei
e26a5d3bf2 video: rockchip: mpp: overflow issue when copy_from_user
when cnt is more than codec_info size, then it may be overflow risk.

Change-Id: I7352118f425ccf263df0083c21ef0433f2322a43
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:32:26 +08:00
Sandy Huang
9e2373210d drm/rockchip: gem: Fix memory leak
Fixes: a612c861dd ("drm/rockchip: gem: Convert sg to page")
Change-Id: Ic1042c90827a4478826eaab84bc4799c0f31a789
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-02-23 15:06:26 +08:00
Shunhua Lan
b02fc6d6ed rk_headset: sending media key up event if it's down when headset is out
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ib98ec442fdca8710e00a3e1bfb7f565aa0f5a33a
2021-02-23 11:50:03 +08:00
Algea Cao
cb2fc0bc60 drm/bridge: synopsys: dw-hdmi: Fix vmode error when system boot
If uboot logo is on, hdmi clock is need to record from crtc_state.
If not, hdmi may not be able to output audio.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I0a9c8bb5df0ab2bdb6d5d2754d92745aa7a2d0cf
2021-02-23 11:40:29 +08:00
Frank Liu
b88c7c9d1f media: i2c: sc2310: fix the bug of switching hdr
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I87122cf4c6c3a47b303739ed2b1eec7cfc4e34c6
2021-02-23 11:19:24 +08:00