Add shader and tiler time in debugfs dvfs_utilization
so that gputop can add shader and tiler utilization in page 4.
Signed-off-by: Chingling Wang <chingling.wang@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
gputop issue u32 type will make busy_time and idle_time overflow,
which resulting crazy output in kernle debugfs dvfs_utilization output data
Signed-off-by: Chingling Wang <chingling.wang@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 425d9bee92e304ec53f53279103223915ac15bc5)
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I20d207ce5125c2733f6bb6202e916e6e16904ade
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
(cherry picked from commit 71024e54b222ae9f08658c40f32cd84b879e2333)
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I5b1888024550a20800359d86bfb64e5531a2aef2
(cherry picked from commit 2c8e299fef2444c9ef045094434e185113e511ff)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Change-Id: I5016937b6ed0b266cee1e66788e8ec0a38309eb9
(cherry picked from commit 91553b26b17cd22c4537e9d0a870fd7d42b75b4a)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Wujian sun <wujian.sun_1@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Remove UAF during ctx termination
Change-Id: I9fb60cae7b576c0836196dc0c64771bd0be229f9
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Signed-off-by: Jessie Hao <juan.hao@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
same as LF-11706 in lf-6.12.y, need use the latest SM dev branch
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
same as LF-11706 in lf-6.12.y, add directive for the gpumix reset control,
which has been moved into SM.
Change-Id: Ide9d01e34cd6b9061d177f70c6caacb785732f22
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Signed-off-by: Jessie Hao <juan.hao@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
enable the power trace as Android cts required
Revert "MGS-7623 gpu: disable the power trace by default"
This reverts commit 387c0e6dfc.
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Revert "LF-12970 gpu: init gpu frequency at 500MHz"
Revert "LF-12971 gpu: gpu_active_counter for debug print"
This reverts commit 8c25e35bf9.
This reverts commit 8b1eec00c2.
add gpu clk notifier based on the CCF(clock control framework) due to
no POST_RATE_CHANGE message from the SCMI protocol
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
This commit addresses the unmapped area search not ending its loop
operation issue. The change applies the worst-case size to the
Maple-Tree (kernel 6.1.x) search as well, matching the cases with the
GPUCORE-43479
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
roll back the mali specific unmap to r47p0 although it fix LF-12433,
this unmap function will block the ps command return after the
application run serveral times
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
init gpu frequency at 500MHz to address the DVFS failure that arises
when the start frequency is 1GHz.
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
fix below build error when CONFIG_KASAN=y
drivers/gpu/arm/midgard/mali_kbase_ioctl_helpers.h:77:22: note: ‘param’ declared here
77 | type param; \
| ^~~~~
drivers/gpu/arm/midgard/mali_kbase_core_linux.c:1666:17: note: in expansion of macro ‘KBASE_HANDLE_IOCTL_INOUT’
1666 | KBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_VERSION_CHECK_RESERVED,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function ‘instrument_copy_from_user_before’,
inlined from ‘_copy_from_user’ at ./include/linux/uaccess.h:148:3,
inlined from ‘copy_from_user’ at ./include/linux/uaccess.h:183:7,
drivers/gpu/arm/midgard/mali_kbase_core_linux.c:1672:3:
./include/linux/kasan-checks.h:38:27: error: ‘param’ may be used uninitialized [-Werror=maybe-uninitialized]
38 | #define kasan_check_write __kasan_check_write
./include/linux/instrumented.h:129:9: note: in expansion of macro ‘kasan_check_write’
129 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
fix below build error when CONFIG_KASAN=y
inlined from ‘int_id_overrides_write’ at drivers/gpu/arm/midgard/mali_kbase_pbha_debugfs.c:96:6:
./include/linux/kasan-checks.h:38:27: error: ‘raw_str’ may be used uninitialized [-Werror=maybe-uninitialized]
38 | #define kasan_check_write __kasan_check_write
./include/linux/instrumented.h:129:9: note: in expansion of macro ‘kasan_check_write’
129 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
make the poll temperature thread freezable, and invoke
the try_to_freeze() in the poll thread
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Tested-by: Xu Yang <xu.yang_2@nxp.com>
use PM(Power Management) domain perf API for
GPU freq scaling instead of clk_set_rate
in CCF(Clock Control Framework)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
- Reject non-protected allocations containing the BASE_MEM_PROTECTED memory flag.
- Reject allocations containing the BASE_MEM_DONT_NEED memory flag (it is only settable).
- Reject allocations containing the BASE_MEM_UNUSED_BIT_xx memory flags.
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
Handling of page metadata after migration in kbase_mmu_migrate_page()
has been made slightly safer. Only if the page is still in the
ALLOCATED_MAPPED state is it safe to access and update the
metadata. There's no problem if the page became NOT_MOVABLE.
It is an error, instead, if the page has changed to any other
state.
The kbase_set_phy_alloc_page_status() helper must be called
while keeping the region lock to prevent race conditions where
the pages of a GPU VA region could be set to NOT_MOVABLE
while a page migration is in progress.
TI2: 1151297 (page migration tests, ps 7)
TI2: 1151300 (DDK precommit, ps 7)
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
- Made the SAME_VA memory flag queryable.
- Re-allow child process to do supported file operations (like mmap, ioctl
read, poll) on the file descriptor of mali device that was inherited
from the parent process.
- Implement support for setting GPU Timestamp Offset register.
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
- Add support for CS_FAULT reporting to userspace
- Made the BASE_MEM_IMPORT_SYNC_ON_MAP_UNMAP and BASE_MEM_KERNEL_SYNC memory
flags queryable.
- Implement support for HWC block state availability.
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
mali gpu: default platform is imx, instead of devicetree
remove the tests in linux kernel
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
1. Disallows changing the sharability on the GPU of imported dma-bufs
to BASE_MEM_COHERENT_SYSTEM using KBASE_IOCTL_MEM_FLAGS_CHANGE.
2. Implement full block state support for hardware counters.
3. add imx platform instead of devicetree
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
In OpenCL-CTS allocation test, GPU firmware reports Iterator
PROGRESS_TIMER timeout again. Use 5s as default progress timeout
value is not enough for i.MX95 in current situation,
increase it to 10s.
Signed-off-by: Eric Guo <eric.guo@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
MGS-7457: implemented GPU suspend/resume feature without Q-channel in A0,
This feature in Mali GPU kernel driver will be dropped in B0 SW releases.
reset the GPUMIX when resume and open, otherwise the CPU will be in WFI.
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>