platform/kernel/linux-thead.git
9 months agoarch/riscv: fix gcc-14 build 86/317186/2 tizen-v5.10
Marek Szyprowski [Thu, 5 Sep 2024 08:52:08 +0000 (10:52 +0200)]
arch/riscv: fix gcc-14 build

The supervisor virtual memory configuration has been moved from the
mstatus register to the sptbr register. Accordingly, the sptbr register
has been renamed to satp (Supervisor Address Translation and Protection)
to reflect is broadened role.

https://riscv.org/wp-content/uploads/2017/05/riscv-privileged-v1.10.pdf

Suggested-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id0eea3bd4bf20da5a577f9d5b14bf58d591bb58b

14 months agoRISCV: tizen-lpi4a_defconfig: add CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS 21/309621/1
Marek Szyprowski [Fri, 12 Apr 2024 16:43:17 +0000 (18:43 +0200)]
RISCV: tizen-lpi4a_defconfig: add CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

Add CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS option to let Tizen
external modules to be build properly.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iefacac11aa6b0143d0724de6df0346c02b3c45cf

14 months agotizen: fix broken riscv-lpi4a-linux-kernel-devel package 20/309620/1
Marek Szyprowski [Fri, 12 Apr 2024 14:44:52 +0000 (16:44 +0200)]
tizen: fix broken riscv-lpi4a-linux-kernel-devel package

Exclude precompiled x86 binaries from -devel package to fix following
issue observed when building against generated -devel package:

=== the following packages failed to build due to missing build dependencies (1) ===
linux-tizen-modules:
  nothing provides libc.so.6(GLIBC_2.14)(64bit) needed by riscv-lpi4a-linux-kernel-devel
  nothing provides libc.so.6(GLIBC_2.2.5)(64bit) needed by riscv-lpi4a-linux-kernel-devel
  nothing provides libc.so.6(GLIBC_2.3)(64bit) needed by riscv-lpi4a-linux-kernel-devel
  nothing provides libc.so.6(GLIBC_2.3.4)(64bit) needed by riscv-lpi4a-linux-kernel-devel
  nothing provides libc.so.6(GLIBC_2.4)(64bit) needed by riscv-lpi4a-linux-kernel-devel

=== Total succeeded built packages: (0) ===

Suggested-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I85cdc5e91c581243f0c43f86ef79f9e1572d13ce

14 months agoRISCV: tizen-lpi4a_defconfig: enable options needed to boot Tizen OS 38/308738/1
Marek Szyprowski [Thu, 28 Mar 2024 14:49:12 +0000 (15:49 +0100)]
RISCV: tizen-lpi4a_defconfig: enable options needed to boot Tizen OS

Enable all options needed for Tizen OS and add packaging.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8cdaf28e53b4a5d4d11fca05ca812f4d616436f7

15 months agoRISCV: config: Add tizen-lpi4a_defconfig file
Jaehoon Chung [Fri, 8 Mar 2024 02:19:32 +0000 (11:19 +0900)]
RISCV: config: Add tizen-lpi4a_defconfig file

Add tizen-lpi4a_defconfig file as initial version.

Change-Id: Ic6bf265262796da496fa935a5840d38650d41cf4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: light: milkv meles: add mipi display and touch
NekoRouter [Wed, 28 Feb 2024 08:10:26 +0000 (16:10 +0800)]
riscv: dts: light: milkv meles: add mipi display and touch

(cherry picked from commit 3eee2bf4d220e0415135b63af972efab4ef970dc)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable CONFIG_DRM_PANEL_ORISETECH_OTA7290B
Haaland Chen [Fri, 1 Dec 2023 09:58:26 +0000 (17:58 +0800)]
revyos_defconfig: enable CONFIG_DRM_PANEL_ORISETECH_OTA7290B

Signed-off-by: Haaland Chen <haaland@milkv.io>
(cherry picked from commit 6b9b37135d82a01154220e44e398749581c981c3)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm: panel: Add Orise Technology ota7290b dsi panel
Haaland Chen [Fri, 1 Dec 2023 09:55:39 +0000 (17:55 +0800)]
drm: panel: Add Orise Technology ota7290b dsi panel

Signed-off-by: Haaland Chen <haaland@milkv.io>
(cherry picked from commit 93bec7933ce8df4093ccb9e99070b25ddc68fa85)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agotemp fix: disable poweron pin for aic8800 to make it work
NekoRouter [Sun, 18 Feb 2024 09:07:30 +0000 (17:07 +0800)]
temp fix: disable poweron pin for aic8800 to make it work

(cherry picked from commit 6f712a1d7f4069a89123f1d2f43e7daa502b4471)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoClean dts for console: remove warnings when build dtb
NekoRouter [Fri, 9 Feb 2024 16:32:28 +0000 (00:32 +0800)]
Clean dts for console: remove warnings when build dtb

(cherry picked from commit 40d4663361a9d536799ee2e646020fe358e0e51e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRevert "fix: enable usb_uas for high speed"
Han Gao [Thu, 8 Feb 2024 12:01:40 +0000 (20:01 +0800)]
Revert "fix: enable usb_uas for high speed"

This reverts commit 384c5e9e2709da47236086c52b6c5fcb2859e72c.

(cherry picked from commit 9443deb7d41a6999c2e6b33cff3c44b5153dfaaf)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: input: touchscreen: goodix: add read config retry
Lu Hui [Tue, 30 Jan 2024 03:40:05 +0000 (11:40 +0800)]
drivers: input: touchscreen: goodix: add read config retry

(cherry picked from commit ffab133a52aced49891c063078960214ee53aa1b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodts: lpi4a-laptop: remove gt9xx xmax & ymax
Lu Hui [Mon, 29 Jan 2024 09:17:58 +0000 (17:17 +0800)]
dts: lpi4a-laptop: remove gt9xx xmax & ymax

(cherry picked from commit 8c67a7d26b434e5697180194473f841d0427e871)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofix: enable usb_uas for high speed
Han Gao [Wed, 31 Jan 2024 12:37:38 +0000 (20:37 +0800)]
fix: enable usb_uas for high speed

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 384c5e9e2709da47236086c52b6c5fcb2859e72c)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agolpi4a add wakeup gpio key and usb resume fix
huaming.jiang [Tue, 2 Jan 2024 11:45:37 +0000 (19:45 +0800)]
lpi4a add wakeup gpio key and usb resume fix

Change-Id: I0479ed6cd676af7ad087968e1bb22f2b04e89337
(cherry picked from commit 1d7ed6a0c691726277ea12d63cc075af91936ead)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agocompat: add mainline dtb name
Han Gao [Wed, 31 Jan 2024 10:46:40 +0000 (18:46 +0800)]
compat: add mainline dtb name

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit a546653719facfe4079bda362eded7c3a6fc8209)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofeat: configs: support suspend & hibernation
Han Gao [Mon, 29 Jan 2024 10:20:58 +0000 (18:20 +0800)]
feat: configs: support suspend & hibernation

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 2ab5512161432179bd0826ad28a789061fa412e6)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agocompat: add old dtb name
Han Gao [Tue, 23 Jan 2024 16:18:38 +0000 (00:18 +0800)]
compat: add old dtb name

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 05c3f803b9e267ec68625787aa5990ab4772a7c9)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agosync: sync config for revyos
Han Gao [Thu, 18 Jan 2024 11:07:19 +0000 (19:07 +0800)]
sync: sync config for revyos

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit a6630353d8129f29eb37bf7fa787373ac604114e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofix: revert dpu_enc0 for build
Han Gao [Thu, 18 Jan 2024 09:46:02 +0000 (17:46 +0800)]
fix: revert dpu_enc0 for build

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 11046edaf7c7e0139da7c72ba93b0d25aea41a1b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodts: rename th1520
Han Gao [Tue, 2 Jan 2024 09:07:10 +0000 (17:07 +0800)]
dts: rename th1520

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit a695d43115310894d2b3b2142a802c1546e107e1)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoLinux_SDK_V1.4.2
thead_admin [Sun, 24 Dec 2023 02:32:32 +0000 (02:32 +0000)]
Linux_SDK_V1.4.2

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
(cherry picked from commit d4c68ef2c128089b56980b0a8b00771206144d77)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoLinux_SDK_V1.3.3
thead_admin [Tue, 14 Nov 2023 01:42:19 +0000 (01:42 +0000)]
Linux_SDK_V1.3.3

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
(cherry picked from commit e17ac7bab2079beba2376f104279619e037e9e2c)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoci: add pahole
Han Gao [Fri, 29 Dec 2023 14:31:52 +0000 (22:31 +0800)]
ci: add pahole

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 2bd2eac4a77b84410e0eb54bd19984186f6300e7)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoconfig: enable bpf for bpfcc & bpftrace
Han Gao [Fri, 29 Dec 2023 13:48:23 +0000 (21:48 +0800)]
config: enable bpf for bpfcc & bpftrace

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 6a61ffb0b615e5c1957e33b5319d9086f26fa2b4)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/verisilicon: bias fb address for dual-head offset
Icenowy Zheng [Thu, 28 Dec 2023 11:41:24 +0000 (19:41 +0800)]
drm/verisilicon: bias fb address for dual-head offset

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 6bb5a30b0ed20b9543e7cb234a504256c473a278)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoconfig: network: enable brcmfmac
Han Gao [Wed, 27 Dec 2023 14:38:48 +0000 (22:38 +0800)]
config: network: enable brcmfmac

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 6bafa84231401b6ff9098c3aa3201397788c8fc9)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/verisilicon: finally fix the cursor position
Icenowy Zheng [Wed, 27 Dec 2023 03:57:33 +0000 (11:57 +0800)]
drm/verisilicon: finally fix the cursor position

Fixes cursor disappearing when using rotated screen.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 593e484dbbf87b5c8860e9f3126c3fd6be149825)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: thead: downclock SD card for LPi4A
Icenowy Zheng [Fri, 15 Dec 2023 04:10:01 +0000 (12:10 +0800)]
riscv: dts: thead: downclock SD card for LPi4A

It's reported that @198MHz some R/W error will happen.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 108fcf335e0798ab0ecb07c8d30f8b566561a66a)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoconfig: network: wg & team & bonding
Han Gao [Wed, 27 Dec 2023 13:17:36 +0000 (21:17 +0800)]
config: network: wg & team & bonding

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 5441a6d3e18b50e82ed814fa46e7973508991438)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: light-lpi4a-z14inch-m0: add 14inch screen support
Lu Hui [Mon, 25 Dec 2023 08:14:26 +0000 (16:14 +0800)]
riscv: dts: light-lpi4a-z14inch-m0: add 14inch screen support

(cherry picked from commit 117a49c9b2c49b4757d5f49db846fa1407d31d34)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: panel: add 14inch-2160x1440_40Hz screen timing into simple-panel.c
Lu Hui [Mon, 25 Dec 2023 08:13:40 +0000 (16:13 +0800)]
drivers: panel: add 14inch-2160x1440_40Hz screen timing into simple-panel.c

(cherry picked from commit ceed3702cdda42a403e169fbce78dfb833b99d3c)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agosound: es8156 limit max volume
Lu Hui [Mon, 25 Dec 2023 07:16:13 +0000 (15:16 +0800)]
sound: es8156 limit max volume

(cherry picked from commit 274a4b08dd633132226bb9cbe2a6ce56abc4f212)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: disable sysrq from serial port
Lu Hui [Mon, 25 Dec 2023 07:12:36 +0000 (15:12 +0800)]
revyos_defconfig: disable sysrq from serial port

(cherry picked from commit 2c9ad7184446e445b3665582c845b588a80c8ab7)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable hid over i2c driver
Lu Hui [Mon, 25 Dec 2023 06:52:46 +0000 (14:52 +0800)]
revyos_defconfig: enable hid over i2c driver

(cherry picked from commit fa040f74fb0a30d0e6c53f65a3ff50f06ce5a027)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: light-lpi4a-console: add ydx trackpoint, thank ice
Lu Hui [Mon, 25 Dec 2023 06:52:24 +0000 (14:52 +0800)]
riscv: dts: light-lpi4a-console: add ydx trackpoint, thank ice

(cherry picked from commit 37075d067bfe8a723cc390d0bd0393577f607de2)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable cw2015 battery & gpio charger
Lu Hui [Mon, 25 Dec 2023 06:30:59 +0000 (14:30 +0800)]
revyos_defconfig: enable cw2015 battery & gpio charger

(cherry picked from commit 14763fe34c9b68f54dc4e071c0cb3c03402880dc)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable panel-bridge lt8911exb
Lu Hui [Mon, 25 Dec 2023 06:28:47 +0000 (14:28 +0800)]
revyos_defconfig: enable panel-bridge lt8911exb

(cherry picked from commit 3c3d82b1e908d5fc342c51b31e71434d754726a8)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable panel-minjun
Lu Hui [Mon, 25 Dec 2023 06:28:06 +0000 (14:28 +0800)]
revyos_defconfig: enable panel-minjun

(cherry picked from commit 633d39c11de58a19cd3c8c0a5cae7256eec8c8db)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: add light-lpi4a-[laptop|console|z14inch-m0].dts
Lu Hui [Mon, 25 Dec 2023 06:14:39 +0000 (14:14 +0800)]
riscv: dts: add light-lpi4a-[laptop|console|z14inch-m0].dts

(cherry picked from commit 25fc785ecc0c5629e6a4d93cf9e341791d10786b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable framebuffer console rotate
Lu Hui [Mon, 25 Dec 2023 06:12:12 +0000 (14:12 +0800)]
revyos_defconfig: enable framebuffer console rotate

(cherry picked from commit d49c77423aa216e1b3bce0e1f5ef3e6eaf772ba0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: light-lpi4a-dsi0-hdmi: allow panel ref by other dts file
Lu Hui [Mon, 25 Dec 2023 06:03:35 +0000 (14:03 +0800)]
riscv: dts: light-lpi4a-dsi0-hdmi: allow panel ref by other dts file

(cherry picked from commit 31b8e1e375964fbdb9045128fb6bba2276095fac)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: panel-bridge: add lt8911exb driver
Lu Hui [Mon, 25 Dec 2023 06:02:22 +0000 (14:02 +0800)]
drivers: panel-bridge: add lt8911exb driver

(cherry picked from commit 3a6df042b408e46420f20a4c1a6bdf32c730b1da)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: panel: add mingjun-070bi30ia2
Lu Hui [Mon, 25 Dec 2023 05:45:27 +0000 (13:45 +0800)]
drivers: panel: add mingjun-070bi30ia2

(cherry picked from commit f32b30324f27c4ca7978ac6e7711e8d1e2fef6ed)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: aic8800: upgrade to 20231212
Lu Hui [Mon, 25 Dec 2023 03:07:25 +0000 (11:07 +0800)]
drivers: aic8800: upgrade to 20231212

(cherry picked from commit 1fd93bc1a9b6fa6ffa509f20b9d0f85389cedf54)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: use ETNAVIV instead of Galcore
Icenowy Zheng [Tue, 5 Dec 2023 03:24:21 +0000 (11:24 +0800)]
revyos_defconfig: use ETNAVIV instead of Galcore

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit b8c5d354603d9833a4ee89bf0473f0753cad168f)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: hack: use only pta id 0
Icenowy Zheng [Sun, 3 Dec 2023 07:49:18 +0000 (15:49 +0800)]
drm/etnaviv: hack: use only pta id 0

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit afcdc418d4e64f6f0e62747b1959b6883e3711ee)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agolight: use etnaviv
Icenowy Zheng [Fri, 1 Dec 2023 05:33:22 +0000 (13:33 +0800)]
light: use etnaviv

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit d6f09caa32996bc000c009228ec6265dded9e15d)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agogalcore: adapt to vivante,gc
Icenowy Zheng [Wed, 29 Nov 2023 12:51:43 +0000 (20:51 +0800)]
galcore: adapt to vivante,gc

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 727e6f3be6d321781382fbb17b187ccbce72fab2)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: add GC620
Icenowy Zheng [Fri, 1 Dec 2023 05:30:22 +0000 (13:30 +0800)]
drm/etnaviv: add GC620

Dirty.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 2f78e6b748b213a472a12633e9adae911054ea1b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: add hwdb entry for TH1520 GC620
Icenowy Zheng [Fri, 1 Dec 2023 05:33:04 +0000 (13:33 +0800)]
drm/etnaviv: add hwdb entry for TH1520 GC620

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit cfe4413691d132559ded7d46f364e084c74fd043)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: add workaround for GC620 on TH1520 (0x5552)
Icenowy Zheng [Fri, 1 Dec 2023 05:32:39 +0000 (13:32 +0800)]
drm/etnaviv: add workaround for GC620 on TH1520 (0x5552)

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 373e8161c571f1326f505b2c77c2e68342aac69d)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: add handle for GPUs with only SECURITY_AHB flag
Icenowy Zheng [Fri, 1 Dec 2023 05:32:10 +0000 (13:32 +0800)]
drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 9ba56a64a89bd22d1a41711d0028505d6d53cf12)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: expedited MMU fault handling
Lucas Stach [Wed, 7 Jun 2023 13:02:23 +0000 (15:02 +0200)]
drm/etnaviv: expedited MMU fault handling

The GPU is halted when it hits a MMU exception, so there is no point in
waiting for the job timeout to expire or try to work out if the GPU is
still making progress in the timeout handler, as we know that the GPU
won't make any more progress.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit ad542ee013149aa3274550ae81074d97b3944849)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: drop GPU initialized property
Lucas Stach [Wed, 7 Jun 2023 13:02:22 +0000 (15:02 +0200)]
drm/etnaviv: drop GPU initialized property

Now that it is only used to track the driver internal state of
the MMU global and cmdbuf objects, we can get rid of this property
by making the free/finit functions of those objects safe to call
on an uninitialized object.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit e44f708a9e7bcf88a7ba3b6f2f15121c7681057c)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: better track GPU state
Lucas Stach [Wed, 7 Jun 2023 13:02:21 +0000 (15:02 +0200)]
drm/etnaviv: better track GPU state

Instead of only tracking if the FE is running, use a enum to better
describe the various states the GPU can be in. This allows some
additional validation to make sure that functions that expect a
certain GPU state are only called when the GPU is actually in that
state.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit ccbbd8ae8fa6669e2ff6dd9675ce1b4c85b55fdd)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: avoid runtime PM usage in etnaviv_gpu_bind
Lucas Stach [Wed, 7 Jun 2023 13:02:20 +0000 (15:02 +0200)]
drm/etnaviv: avoid runtime PM usage in etnaviv_gpu_bind

Nothing in this callpath actually touches the GPU, so there is no reason
to get it out of suspend state here. Only if runtime PM isn't enabled at
all we must make sure to enable the clocks, so the GPU init routine can
access the GPU later on.

This also removes the need to guard against the state where the driver
isn't fully initialized yet in the runtime PM resume handler.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit e286235a75b241be0a103258df04372fcb12f672)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: slow down FE idle polling
Lucas Stach [Fri, 16 Jun 2023 11:02:57 +0000 (13:02 +0200)]
drm/etnaviv: slow down FE idle polling

Currently the FE is spinning way too fast when polling for new work in
the FE idleloop. As each poll fetches 16 bytes from memory, a GPU running
at 1GHz with the current setting of 200 wait cycle between fetches causes
80 MB/s of memory traffic just to check for new work when the GPU is
otherwise idle, which is more FE traffic than in some GPU loaded cases.

Significantly increase the number of wait cycles to slow down the poll
interval to ~30µs, limiting the FE idle memory traffic to 512 KB/s, while
providing a max latency which should not hurt most use-cases. The FE WAIT
command seems to have some unknown discrete steps in the wait cycles so
we may over/undershoot the target a bit, but that should be harmless.

If the GPU core base frequency is unknown keep the 200 wait cycles as
a sane default.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit e084b32587998e2df07d27ee0ef9c41bb570e941)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: split fence lock
Lucas Stach [Thu, 1 Dec 2022 17:48:45 +0000 (18:48 +0100)]
drm/etnaviv: split fence lock

The fence lock currently protects two distinct things. It protects the fence
IDR from concurrent inserts and removes and also keeps drm_sched_job_arm and
drm_sched_entity_push_job in one atomic section to guarantee the fence seqno
monotonicity. Split the lock into those two functions.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
(cherry picked from commit 880ab177a16574d540a04d12d6c00668cf90bb18)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: print MMU exception cause
Christian Gmeiner [Fri, 2 Dec 2022 09:19:29 +0000 (10:19 +0100)]
drm/etnaviv: print MMU exception cause

The MMU tells us the fault status. While the raw register value is
already printed, it's a bit more user friendly to translate the
fault reasons into human readable format.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit c32beb855feb23005a8599eca46174334fdf9e71)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: switch to PFN mappings
Lucas Stach [Fri, 9 Sep 2022 09:20:44 +0000 (11:20 +0200)]
drm/etnaviv: switch to PFN mappings

There is no reason to use page based mappings, as the established
mappings are special driver mappings anyways and should not be
handled like normal pages.

Be consistent with what other drivers do and use raw PFN based
mappings.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 8304fb3b0e7d56aa04c19eb239f0d7ebca793fe0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: reap idle mapping if it doesn't match the softpin address
Lucas Stach [Thu, 14 Jul 2022 10:31:43 +0000 (12:31 +0200)]
drm/etnaviv: reap idle mapping if it doesn't match the softpin address

When a idle BO, which is held open by another process, gets freed by
userspace and subsequently referenced again by e.g. importing it again,
userspace may assign a different softpin VA than the last time around.
As the kernel GEM object still exists, we likely have a idle mapping
with the old VA still cached, if it hasn't been reaped in the meantime.

As the context matches, we then simply try to resurrect this mapping by
increasing the refcount. As the VA in this mapping does not match the
new softpin address, we consequently fail the otherwise valid submit.
Instead of failing, reap the idle mapping.

Cc: stable@vger.kernel.org # 5.19
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
(cherry picked from commit 51464f659288061a1e3a85689bb0c04d8e92f92a)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: move idle mapping reaping into separate function
Lucas Stach [Thu, 14 Jul 2022 10:31:42 +0000 (12:31 +0200)]
drm/etnaviv: move idle mapping reaping into separate function

The same logic is already used in two different places and now
it will also be needed outside of the compilation unit, so split
it into a separate function.

Cc: stable@vger.kernel.org # 5.19
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
(cherry picked from commit f87b29df53d7962b0f370599219723d9ab04e3b0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: print offender task information on hangcheck recovery
Christian Gmeiner [Fri, 3 Jun 2022 12:37:05 +0000 (14:37 +0200)]
drm/etnaviv: print offender task information on hangcheck recovery

Track the pid per submit, so we can print the name and cmdline of
the task which submitted the batch that caused the gpu to hang.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit c71d19490195b04221d74883a913360f1d2c70de)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: reap idle softpin mappings when necessary
Lucas Stach [Wed, 23 Mar 2022 16:08:25 +0000 (17:08 +0100)]
drm/etnaviv: reap idle softpin mappings when necessary

Right now the only point where softpin mappings get removed from the
MMU context is when the mapped GEM object is destroyed. However,
userspace might want to reuse that address space before the object
is destroyed, which is a valid usage, as long as all mapping in that
region of the address space are no longer used by any GPU jobs.

Implement reaping of idle MMU mappings that would otherwise
prevent the insertion of a softpin mapping.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
(cherry picked from commit dc96c0fe681d8782632c3c1fc69990fc78f9ade4)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: move flush_seq increment into etnaviv_iommu_map/unmap
Lucas Stach [Wed, 23 Mar 2022 16:08:24 +0000 (17:08 +0100)]
drm/etnaviv: move flush_seq increment into etnaviv_iommu_map/unmap

The flush sequence is a marker that the page tables have been changed
and any affected TLBs need to be flushed. Move the flush_seq increment
a little further down the call stack to place it next to the actual
page table manipulation. Not functional change.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
(cherry picked from commit 5ffd7f5029a443f25d7e1b1cf43cf75982fcf97b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: move MMU context ref/unref into map/unmap_gem
Lucas Stach [Wed, 23 Mar 2022 16:08:23 +0000 (17:08 +0100)]
drm/etnaviv: move MMU context ref/unref into map/unmap_gem

This makes it a little more clear that the mapping holds a reference
to the context once the buffer has been successfully mapped into that
context and simplifies the error handling a bit.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
(cherry picked from commit 0f89c7db165cbf0ead3fbf2ea652b1c5ed7e098b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: use a 32 bit mask as coherent DMA mask
Michael Walle [Tue, 7 Sep 2021 16:49:45 +0000 (18:49 +0200)]
drm/etnaviv: use a 32 bit mask as coherent DMA mask

The STLB and the first command buffer (which is used to set up the TLBs)
has a 32 bit size restriction in hardware. There seems to be no way to
specify addresses larger than 32 bit. Keep it simple and restict the
addresses to the lower 4 GiB range for all coherent DMA memory
allocations.

Please note, that platform_device_alloc() will initialize dev->dma_mask
to point to pdev->platform_dma_mask, thus dma_set_mask() will work as
expected.

While at it, move the dma_mask setup code to the of_dma_configure() to
keep all the DMA setup code next to each other.

Suggested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit 4a4a708db17d9a622fee339c6bb6c95e324d4cf0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: provide more ID values via GET_PARAM ioctl.
Christian Gmeiner [Wed, 16 Dec 2020 11:42:01 +0000 (12:42 +0100)]
drm/etnaviv: provide more ID values via GET_PARAM ioctl.

Make it possible for the user space to access these ID values.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit 255c988024684ed3777ea5bd8505912aa79ed68a)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: Add lockdep annotations for context lock
Guido Günther [Thu, 29 Oct 2020 14:20:56 +0000 (15:20 +0100)]
drm/etnaviv: Add lockdep annotations for context lock

etnaviv_iommu_find_iova has it so etnaviv_iommu_insert_exact and
lockdep_assert_held should have it as well.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit af2602ac879f2cdc23972dc230e65669b9809518)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: fix dumping of active MMU context
Lucas Stach [Fri, 14 Apr 2023 14:38:10 +0000 (16:38 +0200)]
drm/etnaviv: fix dumping of active MMU context

[ Upstream commit 20faf2005ec85fa1a6acc9a74ff27de667f90576 ]

gpu->mmu_context is the MMU context of the last job in the HW queue, which
isn't necessarily the same as the context from the bad job. Dump the MMU
context from the scheduler determined bad submit to make it work as intended.

Fixes: 17e4660ae3d7 ("drm/etnaviv: implement per-process address spaces on MMUv2")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit b6d74c35607f991e8b418d595aa21a179aba2aa3)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: fix reference leak when mmaping imported buffer
Lucas Stach [Fri, 24 Feb 2023 17:21:54 +0000 (18:21 +0100)]
drm/etnaviv: fix reference leak when mmaping imported buffer

commit 963b2e8c428f79489ceeb058e8314554ec9cbe6f upstream.

drm_gem_prime_mmap() takes a reference on the GEM object, but before that
drm_gem_mmap_obj() already takes a reference, which will be leaked as only
one reference is dropped when the mapping is closed. Drop the extra
reference when dma_buf_mmap() succeeds.

Cc: stable@vger.kernel.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8f3347a59856f4e4aa114b60e201796a54d77e29)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: don't truncate physical page address
Lucas Stach [Fri, 16 Sep 2022 10:40:31 +0000 (12:40 +0200)]
drm/etnaviv: don't truncate physical page address

[ Upstream commit d37c120b73128690434cc093952439eef9d56af1 ]

While the interface for the MMU mapping takes phys_addr_t to hold a
full 64bit address when necessary and MMUv2 is able to map physical
addresses with up to 40bit, etnaviv_iommu_map() truncates the address
to 32bits. Fix this by using the correct type.

Fixes: 931e97f3afd8 ("drm/etnaviv: mmuv2: support 40 bit phys address")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 9aa4002cc9863f74efcbcba2ea7f8cb27b6dd888)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: add missing quirks for GC300
Doug Brown [Sat, 10 Sep 2022 20:29:38 +0000 (13:29 -0700)]
drm/etnaviv: add missing quirks for GC300

[ Upstream commit cc7d3fb446a91f24978a6aa59cbb578f92e22242 ]

The GC300's features register doesn't specify that a 2D pipe is
available, and like the GC600, its idle register reports zero bits where
modules aren't present.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e025348004b268a5f9cff04efb869504bc75203e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem
Lucas Stach [Wed, 23 Mar 2022 16:08:22 +0000 (17:08 +0100)]
drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem

commit e168c25526cd0368af098095c2ded4a008007e1b upstream.

When the mapping is already reaped the unmap must be a no-op, as we
would otherwise try to remove the mapping twice, corrupting the involved
data structures.

Cc: stable@vger.kernel.org # 5.4
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 58f804da14e05700baa328bf20a26e31db66efbd)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: Introduce GEM object functions
Thomas Zimmermann [Wed, 23 Sep 2020 10:21:40 +0000 (12:21 +0200)]
drm/etnaviv: Introduce GEM object functions

GEM object functions deprecate several similar callback interfaces in
struct drm_driver. This patch replaces the per-driver callbacks with
per-instance callbacks in etnaviv. The only exception is gem_prime_mmap,
which is non-trivial to convert.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-4-tzimmermann@suse.de
(cherry picked from commit 277f5bc2bc8c1089442021edfe7facbb0b62cf7d)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/etnaviv: rework linear window offset calculation
Lucas Stach [Mon, 3 May 2021 10:24:22 +0000 (12:24 +0200)]
drm/etnaviv: rework linear window offset calculation

The current calculation based on the required_dma mask can be significantly
off, so that the linear window only overlaps a small part of the DRAM
address space. This can lead to the command buffer being unmappable, which
is obviously bad.

Rework the linear window offset calculation to be based on the command buffer
physical address, making sure that the command buffer is always mappable.

Tested-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
(cherry picked from commit 2dc08a7dac9ef66fb58df280a7b694c8c263af08)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/verisilicon: fix cursor position
Icenowy Zheng [Tue, 5 Dec 2023 12:06:22 +0000 (20:06 +0800)]
drm/verisilicon: fix cursor position

The cursor should be placed at (x + hot_x, y + hot_y) to allow partial
display of a cursor.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 05735e9ff48327e80a3f17f0aa1dc21a26f480d1)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agonf: enable nf mangle
Han Gao [Fri, 1 Dec 2023 09:40:23 +0000 (17:40 +0800)]
nf: enable nf mangle

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit d81a2398a8144608c4e5e7a7de96bff139e48e7a)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agomeles: add 4g/8g dts
Han Gao [Sun, 3 Dec 2023 06:14:38 +0000 (14:14 +0800)]
meles: add 4g/8g dts

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit e133903e4d08b12ac9088817e5274aabab682f13)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agomeles: fix: usb2.0
Han Gao [Sun, 3 Dec 2023 06:10:07 +0000 (14:10 +0800)]
meles: fix: usb2.0

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 8b4bca072c148d51a911667cfe17995c589e8a20)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: dts: light: add Milk-V Meles board
Haaland Chen [Fri, 1 Dec 2023 12:50:20 +0000 (20:50 +0800)]
riscv: dts: light: add Milk-V Meles board

Signed-off-by: Haaland Chen <haaland@milkv.io>
(cherry picked from commit 026ae08e531590301a7d2e7b3fc2d92624d929e5)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: default enable xtheadc
Han Gao [Wed, 29 Nov 2023 03:00:33 +0000 (11:00 +0800)]
riscv: default enable xtheadc

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 95a545985bb7d757e21a012557ec3743a715f9ca)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agotoolchains: fix mainline toolchain build
Han Gao [Wed, 29 Nov 2023 02:56:18 +0000 (10:56 +0800)]
toolchains: fix mainline toolchain build

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit f722795a380c2733ac949ad3e2c254bad6b886fa)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoci: kernel auto build on thead-gcc & mainline-gcc
Han Gao [Tue, 28 Nov 2023 23:40:40 +0000 (07:40 +0800)]
ci: kernel auto build on thead-gcc & mainline-gcc

thead-gcc: v2.8.0
mainline-gcc: v13.2

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 06bd593cfd220ac3622f2bd16b3497a35c0e6461)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: cmpxchg: implement arch_cmpxchg64_{relaxed|acquire|release}
Jisheng Zhang [Sat, 25 Nov 2023 08:21:44 +0000 (16:21 +0800)]
riscv: cmpxchg: implement arch_cmpxchg64_{relaxed|acquire|release}

After selecting ARCH_USE_CMPXCHG_LOCKREF, one straight futher
optimization is implementing the arch_cmpxchg64_relaxed() because the
lockref code does not need the cmpxchg to have barrier semantics. At
the same time, implement arch_cmpxchg64_acquire and
arch_cmpxchg64_release as well.

However, on both TH1520 and JH7110 platforms, I didn't see obvious
performance improvement with Linus' test case [1]. IMHO, this may
be related with the fence and lr.d/sc.d hw implementations. In theory,
lr/sc without fence could give performance improvement over lr/sc plus
fence, so add the code here to leave performance improvement room on
newer HW platforms.

Link: http://marc.info/?l=linux-fsdevel&m=137782380714721&w=4
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
(cherry picked from commit 556f057aca339cae1f71e91b41650337eaee4d9e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: select ARCH_USE_CMPXCHG_LOCKREF
Jisheng Zhang [Sat, 25 Nov 2023 08:21:43 +0000 (16:21 +0800)]
riscv: select ARCH_USE_CMPXCHG_LOCKREF

Select ARCH_USE_CMPXCHG_LOCKREF to enable the cmpxchg-based lockless lockref
implementation for riscv.

Using Linus' test case[1] on TH1520 platform, I see a 11.2% improvement.
On JH7110 platform, I see 12.0% improvement.

Link: http://marc.info/?l=linux-fsdevel&m=137782380714721&w=4
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
(cherry picked from commit 186355454e915e2ef9897127c495edbe4959c82e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoriscv: select ARCH_HAS_FAST_MULTIPLIER
Jisheng Zhang [Tue, 21 Nov 2023 14:43:40 +0000 (22:43 +0800)]
riscv: select ARCH_HAS_FAST_MULTIPLIER

Currently, riscv linux requires at least IMA, so all platforms have a
multiplier. And I assume the 'mul' efficiency is comparable or better
than a sequence of five or so register-dependent arithmetic
instructions. Select ARCH_HAS_FAST_MULTIPLIER to get slightly nicer
codegen. Refer to commit f9b4192923fa ("[PATCH] bitops: hweight()
speedup") for more details.

In a simple benchmark test calling hweight64() in a loop, it got:
about 14% preformance improvement on JH7110, tested on Milkv Mars.

about 23% performance improvement on TH1520 and SG2042, tested on
Sipeed LPI4A and SG2042 platform.

a slight performance drop on CV1800B, tested on milkv duo. Among all
riscv platforms in my hands, this is the only one which sees a slight
performance drop. It means the 'mul' isn't quick enough. However, the
situation exists on x86 too, for example, P4 doesn't have fast
integer multiplies as said in the above commit, x86 also selects
ARCH_HAS_FAST_MULTIPLIER. So let's select ARCH_HAS_FAST_MULTIPLIER
which can benefit almost riscv platforms.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
(cherry picked from commit b25b9b6b16dda999311ae1d785321c2f5c0d0a63)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoKernel: fix out-of-tree build for merged kernel modules
Icenowy Zheng [Fri, 27 Oct 2023 09:11:04 +0000 (17:11 +0800)]
Kernel: fix out-of-tree build for merged kernel modules

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 35a32afaf8c93301b2ca8087c80fef7fa0bee6a0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRe-disable pwm,qspi0,qspi1 on beagle board
NekoRouter [Mon, 23 Oct 2023 01:34:13 +0000 (09:34 +0800)]
Re-disable pwm,qspi0,qspi1 on beagle board

Keep light-a and beagle both can work

(cherry picked from commit 3e042d29a35059a459aabedecd15010292ce5fca)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRevert "sync: device-tree changes from main repo"
NekoRouter [Sun, 22 Oct 2023 07:34:09 +0000 (15:34 +0800)]
Revert "sync: device-tree changes from main repo"

Enable pwm, qspi0, qspi1 on all devices

This reverts partial of commit 40ef3b0976effabc6e9698d7ca33a0f8856e575c

(cherry picked from commit c32ad7b836c87ab5b796e724c39f14d5cbcb4715)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoAdd MIPI panel driver, MIPI panel and touch controller Kconfig, New devicetree file
NekoRouter [Sun, 11 Jun 2023 04:00:04 +0000 (12:00 +0800)]
Add MIPI panel driver, MIPI panel and touch controller Kconfig, New devicetree file

(cherry picked from commit 99a459c9f7964f8963d5d30d67cadace3bb18654)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofeat: update npu-ax3386 with sdk1.2.1
Han Gao [Wed, 18 Oct 2023 14:16:33 +0000 (22:16 +0800)]
feat: update npu-ax3386 with sdk1.2.1

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit c10fdb081d00a3f37cf73737f4a7f1738bc6b30e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoci: use revyos_beaglev_defconfig for ahead & cleanup
Han Gao [Tue, 10 Oct 2023 18:50:33 +0000 (02:50 +0800)]
ci: use revyos_beaglev_defconfig for ahead & cleanup

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit e3b22dbe54601be42d0f0ff0b336824044e255a7)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoconfig: use separate revyos_beaglev_defconfig
Han Gao [Tue, 10 Oct 2023 18:47:02 +0000 (02:47 +0800)]
config: use separate revyos_beaglev_defconfig

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit b9526ccc1254241f409c3fc71bb097a37d3405fb)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRevert "fix: temporarily turn off Bluetooth build for ahead"
Han Gao [Tue, 10 Oct 2023 18:45:02 +0000 (02:45 +0800)]
Revert "fix: temporarily turn off Bluetooth build for ahead"

Use separate config

This reverts commit fe82c45483201684aaf8198b03afdb8d5a01ba6e.

(cherry picked from commit f05fed4b3a16d42d57ad32dfc2cd61db7506e691)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofix: reduce log level for aic8800
Han Gao [Tue, 10 Oct 2023 16:02:08 +0000 (00:02 +0800)]
fix: reduce log level for aic8800

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit 3e8db613d4059c726e96a7310d63e1b60ccf7c51)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agorevyos_defconfig: enable aic8800 wifi
Lu Hui [Mon, 21 Aug 2023 10:04:41 +0000 (18:04 +0800)]
revyos_defconfig: enable aic8800 wifi

(cherry picked from commit e04af8ab3024657776d49009ea99f9e11a657642)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrivers: wireless: add aic8800 support
Lu Hui [Tue, 10 Oct 2023 09:54:43 +0000 (17:54 +0800)]
drivers: wireless: add aic8800 support

(cherry picked from commit a29e54cb024c46a6211932d648e739dcad6f932b)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agofix: temporarily turn off Bluetooth build for ahead
Han Gao [Tue, 10 Oct 2023 08:24:12 +0000 (16:24 +0800)]
fix: temporarily turn off Bluetooth build for ahead

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
(cherry picked from commit fe82c45483201684aaf8198b03afdb8d5a01ba6e)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>