Commit Graph

367 Commits

Author SHA1 Message Date
Jiyu Yang
b1d8a6dd8b LF-4656-1 gpu: disable systrace by default
this was introduced in MGS-6394 imx-2620, to support trace-cmd

Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 05c19f3b781dc0101275a3f5707492f66f4ee8e8)

Change-Id: Ibd70ff1c8d8efad998ca21b5c88df2fc54ed4c16
Reviewed-by: jiajia Qian <jiajia.qian@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2025-06-20 11:26:52 +08:00
Guangliu Ding
a330624467 MGS-7834 [#imx-3270] refine runtime pm feature in gpu subsystem
Boards with gpu subsystem, such as 8MP, have gpu device and gpu2d,
gpu3d sub-devices. gpu2d and gpu3d devices have enabled runtime pm
while gpu device not. But gpu runtime pm suspend and resume callbacks
are binded to gpu device, which leads to gpu runtime pm callback
not working.
So we enable runtime pm of gpu device in gpu subsystem to
request/release high bus freq when GPU work/idle.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
2024-10-08 14:18:35 +08:00
Guangliu Ding
5e2120623f LF-13259 [#imx-3270] Revert "MGS-7591-2 [#imx-3270] modify runtime pm in gpu subsystem"
It's wrong to request/release high bus freq when GPU probe/remove.
Instead, we need to request/release high bus freq when GPU work/idle.
So we revert this patch to avoid ddrc freq can't enter low bus mode.

This reverts commit c413b53ce5.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
Reviewed-by: Jacky Bai <jacky.bai@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2024-08-22 16:15:10 +08:00
jiajia Qian
d9cc39a418 MGS-7802 [#imx-3183] 0027-CL939971-KERNEL-SPACE-6411_nxp-EGL-Add-support-for-E
Add support for
 "EGL_EXT_device_enumeration" and "EGL_EXT_platform_device".

Signed-off-by: jiajia Qian <jiajia.qian@nxp.com>
2024-07-30 14:10:59 +08:00
jiajia Qian
c90ad4765b MGS-7781 [#imx-2976] 0094-KERNEL-SPACE-Update-gc_feature_database.h-to-929381
Update gc_feature_database.h to 929381

Signed-off-by: jiajia Qian <jiajia.qian@nxp.com>
2024-07-30 14:10:59 +08:00
Yuan Tian
43d406ef0d MGS-7676 [#imx-2976] 0072-KERNEL-SPACE-Update-gc_feature_database.h-to-891778
Update gc_feature_database.h to 891778

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-07-30 14:10:58 +08:00
Hui Wang
89c1f41cc2 MA-22433 [#imx-3183] 0005-CL893434-KERNEL-SPACE-22Q2-IMX-3201-add-data-for-gpu
CL893434 [KERNEL SPACE] [22Q2][IMX-3201]: add data for gpu_work_period. [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>
Signed-off-by: Hui Wang <hui.wang_7@nxp.com>
2024-07-17 15:38:27 +08:00
Hui Wang
5b082625a7 MA-22404 [#imx-3183] 0058-CL918820-KERNEL-SPACE-NXP-Fix-unmapped-address-issue
CL918820 [KERNEL SPACE] [NXP]: Fix unmapped address issue when wrapUserMemory. [Shiheng.Zhou]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>
Signed-off-by: Hui Wang <hui.wang_7@nxp.com>
2024-07-17 15:38:27 +08:00
Guangliu Ding
c413b53ce5 MGS-7591-2 [#imx-3270] modify runtime pm in gpu subsystem
Boards with gpu subsystem, such as 8MP, have gpu device and gpu2d,
gpu3d sub-devices. gpu2d and gpu3d devices have enabled runtime pm
while gpu device not. But gpu runtime pm suspend and resume callbacks
are binded to gpu device, which leads to gpu runtime pm callback
not working.
So we enable runtime pm of gpu device in gpu subsystem to fix this issue.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
2024-07-01 15:58:54 +08:00
Yuan Tian
e07bf23ca7 MGS-7676 [#imx-2976] 0068-CL891407-KERNEL-SPACE-6.4.11_22Q2_NXP-Limit-the-chip
6.4.11_22Q2_NXP: Limit the chip
 range who supports USC reset function.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-23 15:02:29 +08:00
Yuan Tian
ec73ad3a61 MGS-7676 [#imx-2976] 0034-IMX-3262-CL880253-KERNEL-SPACE-6.4.11-Fix-IMX-3262-G
Fix IMX-3262
 GPU hang while the vertex data count is very large in 8mm through splitting
 large vertex data draw call.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-23 15:02:19 +08:00
Yuan Tian
0c39e5ed92 MGS-7676 [#imx-2976] 0013-KERNEL-SPACE-Update-copyright
Update copyright

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-23 15:00:32 +08:00
Yuan Tian
0be37d9a9c MGS-7408 [#imx-2976] 0111-CL744345-KERNEL-SPACE-22Q2_NXP-Use-of-EXTRA_CFLAGS-is-
22Q2_NXP: Use of EXTRA_CFLAGS is
 deprecated, use ccflags-y instead

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:20:53 +08:00
IPD_SCM_CN
fdd5b88545 LF-11244-6 [#imx-3234] Pass local memory usage to kernel
CL884364 Pass local memory usage to kernel

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:49 +08:00
IPD_SCM_CN
e7ad8b7c61 LF-11244-5 [#imx-3234] Only need to switch security mode between different processes
CL864472 Only need to switch security mode between different processes.

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:49 +08:00
Yuan Tian
90e63eb75d LF-11244-4 [#imx-3234] bugfix/CVE-2023-4969 becomes invalid
Revert "MGS-7524 [#imx-3234] Enable USC reset when reconstruct context"

This reverts commit 609426ade13312a8072313143fcde64aaf4065c3.

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:49 +08:00
IPD_SCM_CN
99713abba4 LF-11244-3 [#imx-3234] Refine switch security mode
CL851741 Refine switch security mode.

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:49 +08:00
Yuan Tian
6911967952 LF-11244-2 [#imx-3234] Fix CVE 2023 4969 hang regression
shelved patch 823948

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:48 +08:00
Yuan Tian
dee119a7ec LF-11244-1 [#imx-3234] Enable USC reset
Revert "LF-11244 [#ccc] GPU hang in vulkan sascha stress test"

This reverts commit 06d6875852b3190dabfdee06e028113e14f2b9d2.

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:48 +08:00
Jessie Hao
f87ef1b7f1 MA-22201 [#imx-3183] 0013-CL864414-KERNEL-SPACE-22Q2-IMX-3201-Simply-create-a
CL864414 [KERNEL SPACE] [22Q2][IMX-3201]: Simply create a new tracepoint
gpu_work_period to pass Android-14 CTS case GpuWorkTracePointTest. [Ying.Zhang]

This pick VSI
0013-CL864414-KERNEL-SPACE-22Q2-IMX-3201-Simply-create-a-.patch
0018-Fix-license.patch

Signed-off-by: Jessie Hao <juan.hao@nxp.com>
2024-04-22 12:11:48 +08:00
Guangliu Ding
2946afdd45 MGS-7591 [#imx-3270] Modify CONFIG_PM_RUNTIME version usage issues
Modify CONFIG_PM_RUNTIME version usage issues.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
2024-04-22 12:11:48 +08:00
Yuan Tian
2a89b27d7d MGS-7613 [#imx-2976] 0181-KERNEL-SPACE-Update-gc_feature_database.h-to-850347
Update gc_feature_database.h to 850347

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:48 +08:00
Yuan Tian
caacf9c38b MGS-7613 [#imx-2976] 0169-CL844508-KERNEL-SPACE-NXP-Add-a-macro-of-gcdDISABLE_
[NXP]: Add a macro of
 gcdDISABLE_RS_CLOCK_GATING. By Shiheng.Zhou

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:48 +08:00
Yuan Tian
b7d72a3db5 MGS-7613 [#imx-2976] 0165-CL842730-KERNEL-SPACE-6.4.11_NXP-Fix-cl815168.-Move-
[6.4.11_NXP]: Fix cl815168.
 Move two function declarations out of marco gcdENABLE_TRUST_APPLICATION's
 control. [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:47 +08:00
Yuan Tian
0271a8fba8 MGS-7613 [#imx-2976] 0162-CL834614-KERNEL-SPACE-22Q2_NXP-Fix-remain-build-erro
[22Q2_NXP]: Fix remain build
 errors with kernel 6.7 when turn on -Wmissing-declarations &
 -Wmissing-prototypes. [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:47 +08:00
Yuan Tian
a430245698 MGS-7613 [#imx-2976] 0119-KERNEL-SPACE-Update-gc_feature_database.h-to-815454
Update gc_feature_database.h to 815454

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:47 +08:00
Yuan Tian
02e6aa02c6 MGS-7613 [#imx-2976] 0103-KERNEL-SPACE-Fix-license
[KERNEL SPACE]Fix license

Signed-off-by: IPD_SCM_CN <IPD_SCM_CN@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:47 +08:00
Yuan Tian
7af42808bc MGS-7592 [#imx-3183] 0110-CL804117-KERNEL-SPACE-22Q2_NXP-Reallocate-virtual-no
22Q2_NXP: Reallocate virtual
 node when weston import capture only process node and don't fill page table
 for contigourous pool when enable capture only mode.

Signed-off-by: IPD_SCM_CN <IPD_SCM_CN@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:47 +08:00
Yuan Tian
8cb3566d5d MGS-7592 [#imx-3183] 0100-CL819842-KERNEL-SPACE-NXP-Fix-the-issue-that-videos-
[NXP]: Fix the issue that
 videos loop paly meet stuck. By Shiheng.Zhou

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:46 +08:00
Yuan Tian
6ef9702e3f MGS-7592 [#imx-3183] 0097-CL815454-KERNEL-SPACE-NXP-Fix-qnx-build-errors-in-cl
[NXP]: Fix qnx build errors
 in cl815868 and remove some useless extern function declarations.
 [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:46 +08:00
Yuan Tian
800e35c319 MGS-7592 [#imx-3183] 0096-CL815168-USER-SPACE-NXP-Fix-build-break-when-turn-on
[NXP]: Fix build break when
 turn on -Wmissing-declarations & -Wmissing-prototypes. [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:46 +08:00
Yuan Tian
d604f75a77 MGS-7592 [#imx-3183] 0095-CL815168-KERNEL-SPACE-NXP-Fix-build-break-when-turn-
[NXP]: Fix build break when turn on
 -Wmissing-declarations & -Wmissing-prototypes. [Ying.Zhang]

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:46 +08:00
Yuan Tian
1447fef383 MGS-7538 [#imx-3183] 0089-CL797373-KERNEL-SPACE-NXP-Add-the-hardware-info.-By-
[NXP]: Add the hardware info. By
 Shiheng.Zhou

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-22 12:11:46 +08:00
Jiyu Yang
cb2961c0e8 MGS-7209 [#imx-3281] fix ktime_get_real_ts64 improper usage
ktime_get_real_ts64 can jump backwards due to a leap second update,
NTP adjustment settimeofday() operation from user space.

Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Guangliu Ding <guangliu.ding@nxp.com>
Reviewed-by: Yuan Tian <yuan.tian@nxp.com>
2024-04-07 18:59:37 +09:00
Yuan Tian
1c7edd20b6 LF-11244 [#ccc] GPU hang in vulkan sascha stress test
Patches for imx-3234 caused vulkan sascha hang regression.
Disable USC reset to fix this regression.
The original fix for imx-3234 will be disabled accordingly.

Fixes: 39df2d1bf8 ("MGS-7524 [#imx-3234] 0004-CL747890-KERNEL-SPACE-6.4.11_22Q2_NXP-Support-USC-lo")
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Tested-by: Yuan Tian <yuan.tian@nxp.com>
2024-01-25 16:04:40 +08:00
Yuan Tian
0ab9c2c64d MGS-7538 [#imx-3183] fix shader clk update failure on 8MP
This commit fixes the issue that frequency modulation function
cannot be achieved on 8MP.

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
Reviewed by: Guangliu Ding <guangliu.ding@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2024-01-17 16:54:38 +08:00
Yuan Tian
97b64729ee MGS-7532 [#imx-3183] 0075-CL792113-KERNEL-SPACE-NXP-Fix-the-issue-about-the-fr
[NXP]: Fix the issue about the
 frequency can not be turned. By Shiheng.Zhou

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-25 11:00:19 +08:00
Yuan Tian
9a783570ce MGS-7532 [#imx-3183] 0072-CL791100-KERNEL-SPACE-22Q2-22Q2_NXP-Set-gpu_class-gc
22Q2 & 22Q2_NXP:Set gpu_class =
 gcvNULL after class_destroy.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-25 11:00:16 +08:00
Yuan Tian
58ef240c56 MGS-7532 [#imx-3183] 0071-CL790725-KERNEL-SPACE-NXP-Fix-the-issue-that-Scale-c
[NXP]: Fix the issue that Scale
 could not be modulated. By Shiheng.Zhou

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-25 11:00:13 +08:00
Yuan Tian
5084a8f8cc MGS-7532 [#imx-3183] 0058-CL779023-KERNEL-SPACE-Merging-CL675236-Fix-build-for
Merging CL675236: Fix build for linux 6.3 [Luca.Wei]

//SW/Rel5x/dev6.4.x/projects.dev/hal/os/linux/kernel/allocator/default/...

to //SW/Rel5x/dev6.4.x/projects.dev_6.4.11_22Q2_NXP/hal/os/linux/kernel/allocator/default/...

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-25 11:00:01 +08:00
Xianzhong Li
6226a5eae6 MGS-7524 [#imx-3234] Enable USC reset when reconstruct context
Delta state is necessary to reconstruct context after switch

Signed-off-by: Xianzhong Li <xianzhong.li@nxp.com>
2023-12-17 19:50:05 +08:00
Xianzhong Li
ee6389a7cf MGS-7524 [#imx-3234] Enable USC reset for i.MX8MQ/QXP GPU only
Use blit engine and secuirty feature to determine i.MX8MQ/QXP GPU type,
Both chips have CVE-2023-4969 security issue as they support OpenCL local memory with on-chip USC memory.

Fixed this security issue by toggling the GPU security mode to trigger a USC reset during GPU context switch,
VSI validated the second OpenCL process can only read 0s from the USC memory after context switch.

Signed-off-by: Xianzhong Li <xianzhong.li@nxp.com>
2023-12-17 19:50:05 +08:00
Yuan Tian
57d547ac24 MGS-7524 [#imx-3234] 0018-MGS-7466-imx-3183-IMX-3234-GPU-Security-Issue-regression
VIP doesn't support switch security mode, so remove the switch when it is VIP core.

Signed-off-by: Zhe Pan <zhe.pan@vivantecorp.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-17 19:50:04 +08:00
Yuan Tian
a3ecc40599 MGS-7524 [#imx-3234] 0017-CL754846-KERNEL-SPACE-6.4.x-6.4.11_NXP-Correct-cl753
6.4.x/6.4.11_NXP: Correct
 cl753480. Fix the power management option query.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-17 19:50:04 +08:00
Yuan Tian
a5f9f8f3a8 MGS-7524 [#imx-3234] 0013-CL753480-KERNEL-SPACE-6.4.x-6.4.11_NXP-Addon-fix-for
6.4.x/6.4.11_NXP: Addon fix for
 cl745295, cl747890.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-17 19:50:04 +08:00
Yuan Tian
4ce2bea05a MGS-7524 [#imx-3234] 0012-CL753471-KERNEL-SPACE-6.4.x-6.4.11_NXP-Disable-reset
6.4.x/6.4.11_NXP: Disable reset
 USC when context switch.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-17 19:50:04 +08:00
Yuan Tian
39df2d1bf8 MGS-7524 [#imx-3234] 0004-CL747890-KERNEL-SPACE-6.4.11_22Q2_NXP-Support-USC-lo
6.4.11_22Q2_NXP: Support USC
 local memory reset by switch security mode.

Signed-off-by: IPD_SCM <IPD_SCM@verisilicon.com>

Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
2023-12-17 19:50:04 +08:00
Guangliu Ding
6dbd8e63e9 LF-10537 [#imx-3251] Fix unused variable error in new thermal feature
Fix unused variable error in new thermal feature.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
2023-12-06 17:10:19 +08:00
Guangliu Ding
10d6cf83d5 MGS-7520 [#imx-3251] Add a null pointer check to gpu_cooling_device
Meet kernel NULL pointer dereference in _PutPower.
It is caused by releasing gpu_cooling_device (null pointer) on
7ULP/8ULP while gpu_cooling_device not supported on the two boards.
So we add a null pointer check to gpu_cooling_device.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
Signed-off-by: Dandan Sun <dandan.sun@nxp.com>
2023-12-01 17:29:58 +08:00
Guangliu Ding
cea5a71208 LF-10537 [#imx-3251] [layerscape] refine GPU frequency adjustment feature
for ls1028a, considering the unsupported GPU frequency adjustment
feature in the current "devfreq_cooling.c" driver, replacing it with
an improved solution within the "gc_hal_kernel_platform_imx.c" GPU
driver became necessary.

in this patch, GPU register as a cooling devices, thermal framework
will auto bind it.

Signed-off-by: Dandan Sun <dandan.sun@nxp.com>
Reviewed by: Guangliu Ding <guangliu.ding@nxp.com>
2023-11-29 17:04:05 +08:00