Commit Graph

861578 Commits

Author SHA1 Message Date
Daniel Vetter
97fd895541 UPSTREAM: dma-buf: Fix SET_NAME ioctl uapi
The uapi is the same on 32 and 64 bit, but the number isn't. Everyone
who botched this please re-read:

https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html

Also, the type argument for the ioctl macros is for the type the void
__user *arg pointer points at, which in this case would be the
variable-sized char[] of a 0 terminated string. So this was botched in
more than just the usual ways.

Change-Id: Iaffffa806de8f6f10cd167881bb63fdabd6724a2
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chenbo Feng <fengc@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: minchan@kernel.org
Cc: surenb@google.com
Cc: jenhaochen@google.com
Cc: Martin Liu <liumartin@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Martin Liu <liumartin@google.com>
Reviewed-by: Martin Liu <liumartin@google.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: updated some checkpatch fixes, corrected author email]
Link: https://patchwork.freedesktop.org/patch/msgid/20200407133002.3486387-1-daniel.vetter@ffwll.ch
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a5bff92eaa)
2021-01-06 18:13:00 +08:00
Jianqun Xu
604baba3e7 android: ion: set sg address by sg_dma_address
Change-Id: I20b6d34a93aa3bc2b0044cfbc004e13ca60d2b2f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 18:03:33 +08:00
Jianqun Xu
479227ac66 android: ion: add debug node for ion heap
Add debug node [system/cma]_stats for ion [system/cma]-heap

Change-Id: Ib8ea98f516586c9598e17efe310f7673421fa02a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:58:37 +08:00
Jianqun Xu
7e32ad8b9a android: ion: add exp_name for dma buffer
Add the exp_name for dma buffer with KBUILD_MODNAME, heap->name, current->tgid
and task_comm.

Such as ion_alloc-ion_system_heap-263-allocator@4.0-service

Module: ion_alloc
Heap  : ion_system_heap
tgid  : 263
task  : allocator@4.0-service

Change-Id: I4f11394ae2470dcd2b113b4cfd01d70be9c67c8d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:56:50 +08:00
Weiguo Hu
d9d3e43de1 net: wireless: rockchip_wlan: realtek wifi: p2p ioctl illegal parameter protect
References: CNVD-C-2020-309986, CNVD-C-2020-309987, CNVD-C-2020-309988

Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Change-Id: I611e16f8155bac6431e0d786c29ef1425ff792d2
2021-01-06 17:08:25 +08:00
Jianqun Xu
6bb31db2cf mm/cma: show cma bitmap in hex format
Change-Id: I0f8b49202e3e173961f8f2697e0e3494a07afa1d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 16:59:56 +08:00
Weixin Zhou
12c78422e2 driver: input: touchscreen: Make sure that suspend/resume is called only once
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I198581c45baf31f62b9ffa6ba6d9ec15cf4c606d
2021-01-06 16:19:13 +08:00
Hu Kejun
e5c26944dd media: rockchip: isp: get stats only when meas done is on
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I52b167b0aa52a0e4e636334d3b874fa5616dc6da
2021-01-06 16:18:54 +08:00
Cai YiWei
56130b06e8 media: rockchip: isp: remove rx enable config
rx auto enable by csi op_mode

Change-Id: I0e4f807071ceceb1a9c53df5ede0a586febc442a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-06 16:16:23 +08:00
David Wu
1847729a77 arm64: dts: rockchip: rk3568: Add xpcs support
Change-Id: I431393b2346f5f7fd6b0d74f79e643df9a586479
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 15:24:40 +08:00
Alex Zhao
b59b1c0040 mmc: add a file to debugfs for changing host max clock at runtime
Usage is as follows:

rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
150000000

rk3566_rgo:/ # echo 200000000 > /sys/kernel/debug/mmc1/max_clock
rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
200000000
rk3566_rgo:/ # echo 200000000 >  /sys/kernel/debug/mmc1/clock

rk3566_rgo:/ # dmesg -c
[  285.884348] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 200000000Hz, actual 198000000HZ div = 0)

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I7ac9649b231c50b0c6c066407e28954e8c94510c
2021-01-06 15:18:42 +08:00
David Wu
6f8089df70 phy: rockchip: naneng-combphy: Add SGMII/QSGMII mode support
Change-Id: I56f30af84b8a2c2207a1c61afa1638736705d1f8
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
David Wu
8768a53391 phy: rockchip: naneng-combphy: Sort rockchip_combphy_grfcfg struct member by register
Change-Id: I3c0593574a442c4de460ff3b0dde651a7fcae901
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
Wyon Bi
7c35a5ac27 clk/rockchip/regmap: rk628: Add CLK_SET_RATE_PARENT flag to clk_hdmirx_aud
Change-Id: I368512b92f5c5068a4f1b9b3c03e82cd5702a05b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-01-05 19:40:02 +08:00
Elaine Zhang
b4f60fb98b arm64: dts: rockchip: rk3568-evb: add can nodes
add can0\1\2 node.
set disabled by default.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9493d640e9afcf1ae4db57e0ad2d680b8922cb92
2021-01-05 19:30:47 +08:00
Elaine Zhang
9823a37f80 net: can: rockchip: canfd: fix up the bus error
Fix up tdc calculation rules.
Enable auto retransmission mode.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia909a71572be768be6639455129ef5c8885f4720
2021-01-05 19:28:21 +08:00
William Wu
ec7b288bbc usb: dwc3: core: disable device wakeup for rk356x usb host
RK356x SDK will power off logic and grf module in suspend.
So we don't need to enable device wakeup for rk356x usb host
to keep usb controller PD on. With this patch, it can call
rk356x combphy init by usb_phy_roothub_init during resume,
and fix the usb3.0 host function failure after resume.

Change-Id: I40f9a34b5f2aaeede833f9e46153f60b767ea3f0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-01-05 19:05:18 +08:00
Wu Liangqing
7a81c1f7f5 arm64: dts: rockchip: rk3568-evb: adjust rknpu_reserved size
Change-Id: I4c691edd02041813f9364802cf92416b03dea4f0
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-01-05 18:51:32 +08:00
David Wu
1fc7cbfe9e ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568
Change-Id: Iab9dd6ee61a35bf89fd3a0721f5d398de501a7ec
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-05 18:30:12 +08:00
David Wu
883ad9f863 ethernet: stmicro: dwmac-rk: Add null pointer check for gmac ops
Change-Id: Ic00540c0f018ba5115ebc3dad62b007024f6a6ad
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-05 18:04:43 +08:00
Alex Zhao
a6107c8add Revert "arm64: dts: rockchip: change the wifi power-on method for rk356x evb"
This reverts commit e37604f00f.

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I90a96482445710b6089acd5b6ad19264462b35f7
2021-01-05 17:53:47 +08:00
Algea Cao
67be194d10 drm: rockchip: dw-hdmi: Fix display err between kernel logo and bootanimation
If the hdmi color format is set to DRM_HDMI_OUTPUT_YCBCR_HQ or
DRM_HDMI_OUTPUT_YCBCR_LQ when the system boot, The actual color
formats is YUV444/YUV422/YUV420. This leads to misjudgment that
the color format has changed, hdmi will be reset. That cause
display err between kernel logo and bootanimation.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5d4784ecb64df82ab40723fddb6aef94cb493c5e
2021-01-05 17:34:56 +08:00
Liang Chen
88169e6e3b MALI: bifrost: Fix wrong voltage for devfreq
(kbdev->current_freqs[i] > freqs[i]) will be always false becasue kbdev->current_freqs[i]
has been updated to freqs[i], so we need save current_freqs[i] to old_freqs[i].

Change-Id: I3f8a06d474a359cf292460878c53592c4ce1472b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-05 14:52:16 +08:00
Ren Jianing
0035a1a225 arm64: dts: rockchip: add maximum-speed at DWC3 host for rk3568-evb6
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I7f70a40e633b2ec1549334954fefdc5ef11e3b4e
2021-01-05 14:36:44 +08:00
Vicent Chi
05f884ba7a media: i2c: add tp2855 driver
Change-Id: I0df90801fc5ca04ec92f10071915c5706f642f44
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2021-01-05 14:23:46 +08:00
Xiao Ya peng
f87a80b733 arm64: configs: rockchip_linux_defconfig: enable spi nand flash and ubifs.
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: Ifab48fa09836244da7a300bcd00f901ca51c7faa
2021-01-05 10:21:47 +08:00
Sugar Zhang
93773ea1ee ASoC: rockchip: pdm: Add support for path map
This patch adds property 'rockchip,path-map' for path mapping.

e.g.

"rockchip,path-map = <3 2 1 0>" means the mapping as follows:

  path0 <-- sdi3
  path1 <-- sdi2
  path2 <-- sdi1
  path3 <-- sdi0

Change-Id: Ief7ef83cbcf8c57ee9dc07e49d70ea7e5da9e5cc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-05 09:18:17 +08:00
Sugar Zhang
3a294df494 dt-bindings: sound: pdm: Document property 'rockchip,path-map'
This is an optional property to describe data path mapping.

Change-Id: I99fb91a5d1be2e3ec9c7edac206760f589949df5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-05 09:16:33 +08:00
Sandy Huang
f33ddff87a drm/rockchip: vop2: move write_back close time point
Change-Id: Ia9cd0f2c479bb25488a43835a721c32f7a314f36
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-01-04 19:08:33 +08:00
Sugar Zhang
593aff088a ASoC: rockchip: i2s-tdm: Add support for half frame fsync
This patch parses property 'rockchip,tdm-fsync-half-frame' from
DT to config tdm fsync width.

Change-Id: I3254d753a213b7a74462bb85a20ea33d8c3fc3fc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-04 19:06:19 +08:00
Sugar Zhang
b6a8de0be6 dt-bindings: sound: i2s-tdm: Document property 'tdm-fsync-half-frame'
Change-Id: I7ec07f17dafd6ec4d9c919f74454e84a77d2950f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-04 19:06:11 +08:00
Xiao Ya peng
e1d9a5d5b7 arm64: dts: rockchip: add rk3568-nvr-demo-v10-linux-spi-nand
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: Ic27b5f894f88523faa78f32e8bb5e2445a0b4adc
2021-01-04 18:15:22 +08:00
Andy Yan
09c9eeed00 drm/rockchip: vop2: Add writeback support
VOP2 has a writeback with max 1920 x 1080 output.
Writeback work as a connector in drm system.

Change-Id: I670ca8de5155f1102454c618c62dd0c51fa45202
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-04 16:41:27 +08:00
Shunqing Chen
ad33a4d0b5 arm64: dts: rockchip: rk3566-rk817-tablet: set power_off_thresd to 3350mv
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I374db3d7fdc2209cb42b8ced5d0741d0b2887b1e
2021-01-04 15:34:14 +08:00
Shawn Lin
40173a73f0 PCI: rockchip: dw: Power up before phy init
For external OSC phy, such as RK3568 PCIe 3.0, it needs the
power supply to be stable before configuring phy parameter
as the 100MHz refclk is also supplied by 3V3 power.

Change-Id: Ic4c7b49d3613c55d7cd8b5b24e81581c9094294a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-04 15:31:20 +08:00
Zefa Chen
4aa642d4dc dt-bindings: media: i2c: Document add gc2093
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I955a4e4fb6be4cde50f675e276442eaf58d1f81c
2021-01-04 12:40:16 +08:00
Zefa Chen
2167eab1b5 dt-bindings: media: i2c: Document add gc2053
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Idbbb9a286b28592b004257c226fa81846d949db9
2021-01-04 12:39:55 +08:00
David Wu
30ebb681b7 clk: rockchip: Fixed xpcs_mii clock for rk3568
Change-Id: I3dfa606f4d790a8b8882bafb268a236a4c245529
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-04 10:21:46 +08:00
Bian Jin chen
14c6e632ad ARM: rockchip_defconfig: enable CONFIG_INCREMENTAL_FS by default
Test:
    CtsIncrementalInstallHostTestCases
    android.incrementalinstall.cts.IncrementalFeatureTest

This config will enable the Incremental File System, which allows
Android OS to receive streamed APKs over adb.

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I0d903f95ed8c1b1765c36a0bd7fde25695138e5c
2021-01-04 10:18:15 +08:00
Tao Huang
67f163f569 scripts/gcc-wrapper.py: ignore pseudo_files.c:715
fs/incfs/pseudo_files.c:715: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: I229a33517fbe556abeac4e51b35a8ccd4e91f458
2021-01-04 10:18:15 +08:00
Tao Huang
112e3d237a ANDROID: Incremental fs: Fix printk format warnings in format.c
fs/incfs/format.c: In function 'incfs_read_next_metadata_record':
./include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
fs/incfs/format.c:619:3: note: in expansion of macro 'pr_warn'
   pr_warn("incfs: The record is too large. Size: %ld",
   ^~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1a0b1e32761dd4358ff3ca210041893373f0a1a5
2021-01-04 10:09:45 +08:00
Swapnil Jakhade
d393ebfbb8 UPSTREAM: dt-bindings: phy: Add PHY_TYPE_QSGMII definition
Add definition for QSGMII phy type.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1600327846-9733-5-git-send-email-sjakhade@cadence.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit 51862859fb)

Change-Id: I9d522cea7e3369a7ece722b8df9d3eb473af2568
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-04 09:38:45 +08:00
Anurag Kumar Vulisha
72d00ccae5 BACKPORT: dt-bindings: phy: Add DT bindings for Xilinx ZynqMP PSGTR PHY
Add DT bindings for the Xilinx ZynqMP PHY. ZynqMP SoCs have a High Speed
Processing System Gigabit Transceiver which provides PHY capabilities to
USB, SATA, PCIE, Display Port and Ehernet SGMII controllers.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200629120054.29338-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit cea0f76a48)

Change-Id: I1d4d304350ad1d48ce369411110d20c30d7f2a9c
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-04 09:38:05 +08:00
Dilip Kota
d0a93df32c UPSTREAM: dt-bindings: phy: Add PHY_TYPE_XPCS definition
Add definition for Ethernet PCS phy type.

Signed-off-by: Dilip Kota <eswara.kota@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-By: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/6091f0d2a1046f1e3656d9e33b6cc433d5465eaf.1589868358.git.eswara.kota@linux.intel.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit c5d3cdad68)

Change-Id: I90e09759d281b4a5f561525512b76d469f95291d
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-04 09:37:02 +08:00
Jyri Sarha
952858f8c7 UPSTREAM: dt-bindings: phy: Add PHY_TYPE_DP definition
Add definition for DisplayPort phy type.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 8a79db5e83)

Change-Id: I326b193f4edef6e5cf0bba7c54f6b32e389ea795
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-04 09:37:02 +08:00
Weixin Zhou
b2e245c2d7 driver: input: touchscreen: gt9xx: add new config of 768x1024
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ibd4577a4d23aefcf673a5e1a6a9b4f207441e0ea
2021-01-04 09:20:19 +08:00
Alex Wang
1b9f9fb52d arm64: dts: rockchip: rk3568-nvr: enable uboot logo
Change-Id: Ia6069db57ff17e77098b32796e8bd9b9010f7d3e
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
2021-01-04 09:18:06 +08:00
Sandy Huang
5f1d8fecc7 arm64: dts: rockchip: fix cma reserved size error for rk3568-android
Fixes: 8862f1ad4d ("arm64: dts: rockchip: move reserved_memory to rk3568.dtsi")
Change-Id: I3c85c968e322438fbee208de7f2f31b5f59a7cee
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-01-04 09:17:41 +08:00
Zefa Chen
076b562457 arm64: configs: rockchip_defconfig: Enable CONFIG_VIDEO_GC8034
Add camera gc8034 for rk3566 evb2.

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I392601bf1207101f84b41bcb940d48f6ff6b3a92
2020-12-31 18:07:54 +08:00
Zefa Chen
9d1c8090d3 arm64: dts: rockchip: rk3566 evb2 add camera gc8034
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2fef40e65e475ad5e6733485b32703d54c576b68
2020-12-31 18:05:15 +08:00