Comes from mail "230423: 15:04: ARM support: Yao: ".
This patch and fw_230426 can resolve the occurrence
of "Unhandled Page fault" and CS_FAULTs exceptions
in the stress test "Dvfs+Gl_retrace+Rockx+emmc".
In another mail, Yao said "before any further suggestion or conclusion from RD,
you could temporally WA the issue by disable tiler heap reclaim".
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: If06aa8e207b05f1a277aae9a86d1ff76b9a9f93b
To resolve the error of "Failed to get pid pointer for ...",
when running in container environment that uses pid_namespace.
Change-Id: Iff033d9cd8af33b9f2a536cbfbe2ae1e8d71bfba
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The original error check message:
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c:371 midgard_kbase_devfreq_init() error: 'kbdev->devfreq' dereferencing possible ERR_PTR()
Modifications here are based on corresponding codes in drivers/gpu/arm/bifrost/.
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I6d74d39b92ce89e72814f3a0749b79140338b229
Including:
kbase_device_kinstr_prfcnt_init(),
kbase_device_kinstr_prfcnt_term(),
kbase_device_io_history_init(),
kbase_device_io_history_term.
To resolve compilation errors when CONFIG_DEBUG_FS is not enabled.
Change-Id: Ibeaf97bd9fdbbb45308160e11c4dbb386a0dea71
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The pvtpll will power-down when suspend, and it will cause gpu resume
failed, so do not use pvtpll when suspend.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ibf06cc8d836c994468751a66cf9ed3d0cc1e4b9f
In addition, add some more modifications, according to
commit ccf3f0670c ("MALI: bifrost: from ARM: Remove references to PageMovable()").
Note, the corresponding mali_csffw.bin for DDK g15 MUST be used.
Change-Id: Ie233cd29d8d169202d5b80b00a97ccb90e6bd3f2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The original patch is attached in the mail of Zhigang.Yao@arm.com at 2023-02-08 09:00.
Commit message in the original patch:
{
From d1245d8578ba6ae4fb1b0f70417a97ea6afa920d Mon Sep 17 00:00:00 2001
From: Raffaele Aquilone <raffaele.aquilone@arm.com>
Date: Thu, 19 Jan 2023 15:26:12 +0000
Subject: [PATCH] GPUCORE-36657 Remove PageMovable() symbol
The PageMovable() function has been removed from the DDK because
it cannot be used in Android. The movable status of the page has
been duplicated into the status variable of the page metadata,
and it's kept up to date every time the movable property is set or
cleared, except in those cases where it's not necessary to keep
alive the information.
The unit test that attempts to migrate a firmware page has been
removed because now the driver has no way to detect that a page
without metadata is not movable; the driver has to trust that
the system doesn't try to isolate pages which are not movable.
...
}
Its base is not current g15.
I applied it manually on DDK g15.
Change-Id: I7e8a29f3ce79d991bc8b3a746690e9ef279e572a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Note, the corresponding mali_csffw.bin for DDK g15 MUST be used.
Change-Id: Ic30634fa6247d62bf96f506c64d13b89e16b02e6
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Validate vmf_insert_pfn return value with VM_FAULT_NOPAGE
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Change-Id: I53b1eabd20ab76f08f5edf571ead1ffaccd19ec1
This is part of the workaround for HW_issue_of_fragment_endpoint_TERMINATED_responses,
though it is not expected to be triggered often.
Change-Id: I6b0cf15b8050ebacd3099f52af1a03d786c6ff44
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Note, the corresponding mali_csffw.bin for DDK g13 MUST be used.
Change-Id: I63c00b4eccd2e780aea2691faa2ecea6847c41e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
To implement quick reset.
Not work for CSF based Valhall GPU.
Change-Id: I4d84d3a11ec4a5632c1a5f09bd90ed241fb9fc9a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
It's allowed to run without firmware protected mode entry.
While the customer of RK3588 might be troubled by the log.
Change-Id: I9f1b7c795f2095f1851692c93a7f4598acf702fc
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The most recent situation is that the null pointer exception
is only reported from repeated reboot test on rk3588_EDGE_SDK,
not on rk3588_Linux_SDK or rk3588_Android_SDK.
Change-Id: I1e5ce9eb9fd32c29294e115e6014a8114c896754
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The system calls pm_runtime_get_noresume() to prevent device
from entering to runtime suspend status when reboot, and the
pm_runtime_put_sync_suspend() is called in a delay work,
so when reboot the power domain may be power on,
but the regulator is disabled, it's not allowed.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie25451ddf4fc866e93e7272a8d9a809919a96e1d
When system resume, all power domains will power on in
dpm_noirq_resume_devices(), if vdd gpu is disabled before system
suspend, the pd gpu will failed to power on when system resume,
the detail as follows:
rockchip-pm-domain fd8d8000.power-management:power-controller: failed to get ack on domain 'gpu', target_idle = 0, target_ack = 0, val=0x8080f
Kernel panic - not syncing: panic_on_set_idle set ...
CPU: 0 PID: 1947 Comm: Binder:352_2 Not tainted 5.10.66 #960
Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
Call trace:
dump_backtrace+0x0/0x1c8
show_stack+0x1c/0x2c
dump_stack_lvl+0xdc/0x12c
dump_stack+0x1c/0x64
panic+0x150/0x3a4
rockchip_pmu_set_idle_request+0x1f8/0x1fc
rockchip_pd_power+0x11c/0x1e0
rockchip_pd_power_on+0x28/0x38
genpd_sync_power_on+0xf4/0x134
genpd_resume_noirq+0x70/0xd0
device_resume_noirq+0x1a8/0x410
dpm_noirq_resume_devices+0x100/0x55c
dpm_resume_noirq+0x18/0x34
suspend_enter+0x33c/0x52c
suspend_devices_and_enter+0xec/0x338
enter_state+0x12c/0x3f8
pm_suspend+0x60/0xcc
state_store+0x108/0x148
kobj_attr_store+0x1c/0x34
sysfs_kf_write+0x40/0x58
kernfs_fop_write_iter+0xf0/0x194
vfs_write+0x328/0x390
ksys_write+0x78/0xe8
__arm64_sys_write+0x20/0x30
el0_svc_common+0xc0/0x23c
do_el0_svc+0x28/0x88
el0_svc+0x14/0x24
el0_sync_handler+0x88/0xec
el0_sync+0x1a8/0x1c0
SMP: stopping secondary CPUs
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I89f80d37ab2cc61c715bce3f8a25c26552918922
In mail 'RE: <rock-chips>: G610: Valhall Android DDK r36:
Does device driver warning log "Could not get a valid AS for group ..." matter?',
zhigang.yao@arm.com declared that it should not be a warning:
"This is expected behavior.
GPU has a limited present HW address space resource,
max is 16, and is implementation specific, (8 on Odin?).
So if there are more than 16 (8 on Odin) process,
some of it might not get a valid present address space,
and the warning would be printed as you have observed."
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ic8324c37461776672d516b472db66549d91fe552
When call pm_runtime_get_sync(), the runtime callback will change clock
source to normal pll, but now pm_runtime_get_sync() is called in a delay
work and the wakelock seems to be invalid on linux system,
so when suspend the pm_runtime_get_sync() may not be called.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I0a951b455c10158ca63d747e35e9001cdbdde91c
If use savedefconfig to update defconfig, PM_DEVFREQ and DEVFREQ_THERMAL
will be removed, and dmc and opp_select also depend on PM_DEVFREQ,
enable them default.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ied5ac8e70fe195294df2752160ce6e56360f2db8
In order to get target read margin and scmi clk earlier,
and it will also be used in later submissions.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I75bd79dc4963fa0dcc73d7c66a696e1cc0c177b7
The warning logs fixed are "GPU activity takes longer than time interval, ...".
This fix is provided as 496f5e3.diff by Zhigang.Yao@arm.com of support_mali.
The original commit message within 496f5e3.diff:
{
From 496f5e37a803266e71cbf7b6eb5871fe2fcd8931 Mon Sep 17 00:00:00 2001
From: Tu Vuong <tu.vuong@arm.com>
Date: Wed, 09 Feb 2022 09:31:20 +0000
Subject: [PATCH] GPUCORE-30123 Fix incorrect dmesg warning for unexpected GPU activities
The DVFS utilisation calculation detects when the GPU has expended more
cycles than expected compared to the actual time passed. This margin was
not sufficient as it didn't take into account the worst-case scenario
where samples are taken TIMER_DEFAULT_VALUE_MS apart.
}
Change-Id: I16bb904fd77006f6ab1e4419e44a9834550e4c07
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The panic was triggered
by running "cat /sys/kernel/debug/mali0/ipa_current_power".
It is fixed by enlarging KBASE_IPA_BLOCK_TYPE_NUM according to the fact
that we set 4 clks for GPU in rk3588 dts.
Change-Id: I3a87f6f2d25cf296d95d033d3d98c51666ea482d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>