Commit Graph

1066174 Commits

Author SHA1 Message Date
Finley Xiao
f1123f2aab PM / devfreq: rockchip_dmc: Change frequency according to vop frame bandwidth
Sometimes the vop line bandwidth is not high, the vop also report
buf empty err, and the frame bandwidth is high at this time, so change
ddr frequency according to frame bandwidth can fix the error.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia893a07def99aaaa4da421b6d619a8fd3eec9745
2021-10-29 19:00:34 +08:00
Sandy Huang
a3d4f6e0df drm/rockchip: vop: add calculate current frame data size
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie9c92c651b8c379c77aac941d03bf3f772ed7eea
2021-10-29 19:00:34 +08:00
Zhen Chen
a42b57181b MALI: rockchip: upgrade bifrost DDK to g7p1-01bet0, from g6p0-01eac0
Including modifications under drivers/base/ from the new DDK.

Resolve lots of conflicts.

Fix compilation errors when CONFIG_DEBUG_FS is disabled.

Change-Id: I69f9ac87d927441d0b92b8dac8b704922aeb6a0a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-10-29 18:44:22 +08:00
Zhen Chen
8e59d03969 MALI: bifrost: fix a bug that makes vdd_gpu abnormally low
Change-Id: Ic0b785ead0da551e9e640c45b73f6686a1ec5cca
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-10-29 18:44:22 +08:00
Zhen Chen
404110b7de MALI: rockchip: upgrade bifrost DDK to g6p0-01eac0, from g2p0-01eac0
Include a new directory include/uapi/gpu/arm/bifrost/,
which includes some header files of bifrost device driver.
In the original part of g6, the path is include/uapi/gpu/arm/midgard/.
I changed the "midgard" to "bifrost", and modified the paths of the header files in .c files.

I resolved some conflicts between modifications form ARM and RK, manually.

In addition, introduce source files of protected_memory_allocator
that might be needed by bifrost_device_driver into build system.

Further more, to avoid errors when building in GKI mode,
add "WITH Linux-syscall-note" to SPDX tag of uapi headers.

Change-Id: I09d500a0fdbc5da352c81dc4fcfbffb5b7f907f5
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-10-29 18:44:22 +08:00
Giuliano Procida
ea440234c7 ANDROID: GKI: refresh XML following ANDROID_KABI_USE change
The ABI diff is essentially bogus, but included here for completeness.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct xhci_hcd at xhci.h:1756:1' changed:
  type size hasn't changed
  1 data member deletion:
    'union {xhci_vendor_ops* vendor_ops; struct {u64 android_kabi_reserved1;} __UNIQUE_ID_android_kabi_hide322; union {};}', at offset 59392 (in bits) at xhci.h:1935:1
  18 impacted interfaces

Bug: 210255585
Change-Id: Ic646e0edd2ab19fcd9b7b88b6e6a604299fc4824
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-10-29 11:11:40 +01:00
Tao Huang
da27a9f52c arm64: rockchip_gki.config: Enable CONFIG_RK_HEADSET
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I03ff3e3d003e2a884b16b18735ee19be0c565252
2021-10-29 18:06:44 +08:00
Shunhua Lan
342259045c rk_headset: enable rk_headset and fix complie error
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I3f1906ddca16b2fedf403c7c88e00ff1dc4edd42
2021-10-29 18:06:44 +08:00
Greg Kroah-Hartman
f8b361d17d ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use __UNIQUE()
The __UNIQUE_ID() macro causes problems as it turns out to not be
deterministic across different compiler runs as it relies on the
__COUNTER__ macro which could have been used on other .h files previous
to this .h file being included.

This shows up specifically when building with "LTO=thin" vs. "LTO=full"
as different build paths seem to be triggered.

As the structure name isn't really needed at all here, we were just
including it for older compilers that could not handle anonymous
structures in a union, just drop the whole thing which resolves the abi
naming issue.

Bug: 210255585
Reported-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6b9449fa9d26ffc5d66b2f0f3b41e2d5f3003f68
2021-10-29 10:57:02 +01:00
Sandy Huang
cd2119c1ce drm/rockchip: vop2: add support rk3588 DSC
RK3588 can support DSC (Display Stream Compression) with the following
feature:

1. DSC 8K encoder for HDMI TX0/MIPI DSI2 Host0 interface
2. DSC 4K encoder for HDMI TX1/MIPI DSI2 Host1 interface
3. Conformance Standard: VESA DSC v1.1 and v1.2a
4. Data path: VOP VP -> DSC encoder -> DSI/HDMI controller -> phy -> panel

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ia395374102be0e1710bb2049d7407a6cc0d5f873
2021-10-29 17:12:50 +08:00
Andy Yan
aa3aee14d0 drm/rockchip: vop2: Add vop2 internal pd support for rk3588
There are 7 internal power domains on rk3588 vop:

Cluster0/1/2/3 each have one, and Cluster0 power domain act
as parent pd of Cluster1/2/3.

Esmart0/1/2/3 share on pd.

DSC_8K/DSC_4K each have one.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: If2c3c79980d2690761d12e64a486aca9be992e4b
2021-10-29 17:01:03 +08:00
Wu Liangqing
e976889d1a arm64: dts: rockchip: rk3588: adjust rk3588/rk3588s evb dts structure
separate rk3588-evb and rk3588s-evb

Change-Id: I6298f3db43d9853c136857e0b09152f6b311717a
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-10-29 16:54:12 +08:00
Tao Huang
9346f9db7d arm64: dts: rockchip: rk806: Fix indentation
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I711b651c32a2993ce993363373ec7cc40cfc6aa1
2021-10-29 16:53:20 +08:00
Kever Yang
a14e5e74a9 phy: phy-rockchip-snps-pcie3: support rk3588
RK3588 is using the same snps phy for pcie3.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I4fe45cdd4f634437f4b863d9a34e523e2deeaf9f
2021-10-29 16:41:30 +08:00
Guochun Huang
cfd737a904 drm/rockchip: rk628: fix lvds default data format
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ib99e6e3d285b3693428523fdd11027d8862ee734
2021-10-29 16:00:57 +08:00
Sandy Huang
dd32d33d69 drm/rocckhip: vop: rename to NEXT_HDR feature
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I148ecf0f400c98e8c5e79716a6c69add3b21b6e5
2021-10-29 15:29:05 +08:00
Shawn Lin
2a53aab5cf mmc: dw_mmc-rockchip: Skip all phases bigger than 270 degrees
Per design recommendation, it'd better not try to use any phase
which is bigger than 270. Let's officially follow this.

Change-Id: I8dee3eb648d321cc86e0926844cde528dbb5bd95
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-10-29 15:28:39 +08:00
Woody Lin
ad8da78c87 UPSTREAM: sched/scs: Reset the shadow stack when idle_task_exit
Commit f1a0a376ca ("sched/core: Initialize the idle task with
preemption disabled") removed the init_idle() call from
idle_thread_get(). This was the sole call-path on hotplug that resets
the Shadow Call Stack (scs) Stack Pointer (sp).

Not resetting the scs-sp leads to scs overflow after enough hotplug
cycles. Therefore add an explicit scs_task_reset() to the hotplug code
to make sure the scs-sp does get reset on hotplug.

Fixes: f1a0a376ca ("sched/core: Initialize the idle task with preemption disabled")
Signed-off-by: Woody Lin <woodylin@google.com>
[peterz: Changelog]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lore.kernel.org/r/20211012083521.973587-1-woodylin@google.com
(cherry picked from commit 63acd42c0d)
Bug: 201047587
Bug: 201771367
Change-Id: I9e48270f8d4c698c140cc3f427cadae636acb6d7
2021-10-29 01:25:30 +00:00
Guochun Huang
5bb9b625e7 arm64: dts: rockchip: rk3588: add dsi dts nodes
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ia8ccd04ccaf337480da6c27b67dcc0a38e33ec6d
2021-10-29 07:59:29 +08:00
Guochun Huang
8cc47fe067 arm64: dts: rockchip: rk3588: add mipi dcphy dts nodes
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I68b0de9bb0ddf00a171754adaae3d2dffd789d2c
2021-10-29 07:57:31 +08:00
Tengfei Fan
74782dd0ce ANDROID: cpuhp/pause: add function define if not define CONFIG_CPUSETS
Add define of cpuset_update_active_cpus_affine() for fix compile error
when not define CONFIG_CPUSETS.

Bug: 204347727
Fixes: 09bd9e940e ("ANDROID: cpuhp/pause: schedule cpu_hotplug_work on
resume cpu")
Change-Id: Icf79df5e22233d15e4e8257a5f54176efbcd975b
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
2021-10-28 15:12:01 +00:00
Weixin Zhou
a939cdfe9d nvmem: rk628-efuse: add rk628 efuse driver
Change-Id: I1b379fb75ba65f5628653ce114d1d440e9a95ec9
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2021-10-28 19:30:03 +08:00
Elaine Zhang
9528bfc14a clk: rockchip: rk3588: export clk_aux16m_x id for dp
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Iec7deb4005d4ce3b842eccd89018a7d9f335434c
2021-10-28 16:31:46 +08:00
Wyon Bi
ccfe243eb8 arm64: dts: rockchip: rk3588: Add dp1 node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I4e5334e83304b08e8cd1c52166c2394e91f9747a
2021-10-28 16:31:27 +08:00
Wyon Bi
17650f44dc arm64: dts: rockchip: rk3588s: Add dp0 node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Idab51106a7336bd8d95a478b51559546805e2b71
2021-10-28 16:31:27 +08:00
shengfei Xu
01122322cb arm64: dts: rockchip: rk806: fix the name for the NLDO_REG4
the name is consistent with the schematic diagram of the hardware.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I63256863f52ce8141b45829a4efd4b81e2424f44
2021-10-28 16:31:00 +08:00
Simon Xue
78f050e418 iommu/rockchip: wrap enable/disable operation for user
There are issues about the field "links" of struct device
by calling pm_runtime_get_sync/pm_runtime_put_sync to
enable/disable iommu, wrap helpers to make things easy.

Change-Id: I03a85dc8c67b902e79b1e86a201b2074e2562d83
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-10-28 15:47:09 +08:00
Liangliang Li
75a5637ccf ANDROID: GKI: Add a symbol to vendor symbol list
Functions changes summary: 0 Removed, 0 Changed (2375 filtered out), 2 Added functions
Variables changes summary: 0 Removed, 0 Changed (24 filtered out), 2 Added variables

2 Added functions:

  [A] 'function int __traceiter_android_vh_filemap_fault_cache_page(void*, vm_fault*, page*)'
  [A] 'function int __traceiter_android_vh_filemap_fault_get_page(void*, vm_fault*, page**, bool*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_filemap_fault_cache_page'
  [A] 'tracepoint __tracepoint_android_vh_filemap_fault_get_page'

Bug: 204163778

Change-Id: I579eedf59470f5c806e28abe7148a99e52b1ff90
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
2021-10-28 02:01:57 +00:00
Jaegeuk Kim
1c0e68339c ANDROID: f2fs: fix potential deadlock by android ftrace
sb_internal#2 --> &s->s_dquot.dqio_sem --> fs_reclaim

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(fs_reclaim);
                                lock(&s->s_dquot.dqio_sem);
                                lock(fs_reclaim);
   lock(sb_internal#2);

 *** DEADLOCK ***

 3 locks held by kswapd0/133:
  #0: ffffffda597c93a8 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x4/0x50
  #1: ffffffda597bc890 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0xa0/0x19c
  #2: ffffff80d5fb90e0 (&type->s_umount_key#50){.+.+}-{3:3}, at: super_cache_scan+0x40/0x1dc

stack backtrace:
 CPU: 7 PID: 133 Comm: kswapd0 Tainted: G        W  O      5.10.43-android12-9-g4665ec64f3df #1
 Hardware name: MT6879(ENG) (DT)
 Call trace:
  dump_backtrace.cfi_jt+0x0/0x8
  show_stack+0x1c/0x2c
  dump_stack_lvl+0xd8/0x16c
  print_circular_bug+0x2d4/0x2d8
  check_noncircular+0x190/0x1a4
  validate_chain+0xc54/0x2d34
  __lock_acquire+0x7e4/0xed4
  lock_acquire+0x114/0x394
  f2fs_evict_inode+0x1a0/0x8b8
  evict+0xd4/0x2f8
  iput+0x1c0/0x258
  dentry_unlink_inode+0x16c/0x1dc
  __dentry_kill+0x128/0x280
  shrink_dentry_list+0x6c/0x420
  prune_dcache_sb+0x5c/0x90
  super_cache_scan+0x13c/0x1dc
  do_shrink_slab+0x1e0/0x388
  shrink_slab+0xf4/0x19c
  shrink_node_memcgs+0x80/0x25c
  shrink_node+0x324/0x710
  balance_pgdat+0x3a8/0x6a8
  kswapd+0x484/0x594
  kthread+0x15c/0x1ac
  ret_from_fork+0x10/0x30

Bug: 201025620
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Idaa303eb7c681a56ad5d4e1f6dddbda71f7fece4
2021-10-27 18:37:38 +00:00
Dan Vacura
8d5dd0a5a4 ANDROID: gki_defconfig: enable CONFIG_USB_CONFIGFS_F_UVC
Enable the UVC function driver to allow USB gadgets
to connect as a standard video device to a host.

Bug: 200712777
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: Ia037f8560664f9e98f28f3fede609764d5d5699d
2021-10-27 12:55:32 +00:00
Jiewen Wang
d4091df63c ANDROID: GKI: Update symbols list for vivo
Add symbol to symbol list for oem module.

Functions changes summary: 0 Removed, 0 Changed (2375 filtered out), 1
Added functions
Variables changes summary: 0 Removed, 0 Changed (24 filtered out), 1
Added variables

1 Added function:

  [A] 'function int __traceiter_android_vh_shrink_slab_bypass(void*,
gfp_t, int, mem_cgroup*, int, bool*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_shrink_slab_bypass'

Bug: 204278767
Change-Id: I075f034ddad2657435429a9f712322a3a207caa6
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
2021-10-27 17:37:32 +08:00
shengfei Xu
5b87fd45e0 arm64: dts: rockchip: rk3588-evb: rearrange the regulator configuration
rk806-double.dtsi: for two rk806s schemes
rk806-single.dtsi: for one rk806 schemes

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I7dfa2c33d50d59bb08d4cd1e1005181344304240
2021-10-27 17:25:27 +08:00
Andy Yan
c4b5e35d90 drm/rockchip: vop2: Add splice mode for alpha
Used for 8K output on rk3588

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ic5a5443f85c063fcf45a2c91a676766a773a0317
2021-10-27 16:11:32 +08:00
Andy Yan
b5502e21e2 drm/rockchip: vop2: Add splice support for HDR10
We need two HDR10 controllers in splice mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ie4f98f64b3afa1a4bbf561d4dc061031febd22e5
2021-10-27 16:10:55 +08:00
Andy Yan
f001cec92f drm/rockchip: vop: Use __drm_atomic_helper_plane_reset instead of copying the logic
A new helper function(__drm_atomic_helper_plane_reset) has been added
for linking a plane with its state and resetting the core
properties(alpha, rotation, etc.) to their default values.
Use that instead of duplicating the logic.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I3219f6ee0eef49c59277c84ea6efc72ae4a90ef9
2021-10-27 15:49:52 +08:00
Andy Yan
339b80072b drm/rockchip: vop2: Use __drm_atomic_helper_plane_reset instead of copying the logic
A new helper function(__drm_atomic_helper_plane_reset) has been added
for linking a plane with its state and resetting the core
properties(alpha, rotation, etc.) to their default values.
Use that instead of duplicating the logic.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ic9db9e9d6eee32796899fceba4df7cbf1eaaf5f6
2021-10-27 15:49:52 +08:00
Giuliano Procida
a451a6c447 ANDROID: GKI: Add missing symbol list whitespace
The missing leading whitespace in android/abi_gki_aarch64_galaxy
caused its symbols to be dropped from the distribution
abi_symbollist file and the distribution vmlinux binary.

Bug: 203852249
Change-Id: I7854401e0a55ad89beacde588c24f1d1698e9e17
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-10-27 07:45:39 +00:00
Finley Xiao
62a5b05abd arm64: dts: rockchip: rk3568: Add cpu bandwidth for dmc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia29bfccacb72fa1f9f9fbeb68e23aa2b51b25563
2021-10-27 15:28:30 +08:00
Finley Xiao
e866f07afb arm64: dts: rockchip: rk3568: Add nocp device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6b429393383588d7fc763bc0947a793c10bbb0ef
2021-10-27 15:28:30 +08:00
Finley Xiao
1400843a24 PM / devfreq: rockchip_dmc: Change frequency according to cpu bandwidth
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I69376a2e620292642b1118f770c50f9002c450b4
2021-10-27 15:28:30 +08:00
Finley Xiao
4ad4f153e4 PM / devfreq: rockchip-nocp: Add support for rk3568
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2d311d48a54a1f254eda749aa6d9d157d106e02b
2021-10-27 15:28:30 +08:00
Finley Xiao
b3aa59c8b4 arm64: dts: rockchip: rk3568: Modify vop-bw-dmc-freq
Add support for display screen whose resolution is 1920x1200.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I22b9a8d1fbd095f08d4b58c0c41252ebbfb985f0
2021-10-27 15:28:30 +08:00
Finley Xiao
c2636d3312 PM / devfreq: rockchip_dmc: Add sysfs interface for ondemand_data
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I399a78aa2f63b266824a5cd302328a0d3e2aadcd
2021-10-27 15:28:30 +08:00
Finley Xiao
23333b7bbf PM / devfreq: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency for dmc
Change-Id: Ie08689996ee4f3554c2d0e6bef61d23029bc5d07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-10-27 15:28:30 +08:00
Finley Xiao
4def68e21f PM / devfreq: rockchip_dmc: Add rockchip_simple_ondemand_data
Add a new struct rockchip_simple_ondemand_data so that rockchip_dmc.c
does not need to depend on CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND.

Change-Id: Iafe7ec8bbc9a36aaf3dffbe669a8ee927f45d3a1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-10-27 15:28:30 +08:00
Kever Yang
ec4895ba14 driver: rknpu: Fix build error on Android kernel build env
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ie11dde883f659318bea9665ca9a4bc5d520d4c2a
2021-10-27 15:22:52 +08:00
Wangqiang Guo
825fc1800d input: sensor: accel: support 3-Axis accelerometer: da228e
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I272c179d151acefcd54fa01cf25fc3790a141ecd
2021-10-27 15:16:30 +08:00
Jon Lin
5764ae855c PCI: rockchip: dw: support for RK3588 platforms
Change-Id: Icd44e65523732ffef5dac21514d8559caba07982
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-10-27 14:56:53 +08:00
Wangqiang Guo
81c3553f89 input: sensor: accel: support 3-Axis accelerometer: da215s
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: Ia1c00b45fb86043c730835f95543bbd01dd882ee
2021-10-27 14:55:57 +08:00
Greg Kroah-Hartman
a32d8ee384 Revert "ANDROID: mpam: add vendor hook to record MPAM"
This reverts commit 1aa1f6a7cf.

The hook android_vh_mpam_set is not used by any vendor, so remove
it to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 165333282
Cc: C-J.Chen <C-J.Chen@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I18356743538df7d41a00f54479bf2a0bc3a62e06
2021-10-27 08:05:03 +02:00