Skip to content

Upgrade Mali DDK to g29p1-12eac0#506

Open
ginkage wants to merge 9 commits into
armbian:rk-6.1-rkr6.1from
ginkage:rk-6.1-rkr6.1
Open

Upgrade Mali DDK to g29p1-12eac0#506
ginkage wants to merge 9 commits into
armbian:rk-6.1-rkr6.1from
ginkage:rk-6.1-rkr6.1

Conversation

@ginkage

@ginkage ginkage commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Collection of patches from the 6.1.157 branch, plus a small tweak to RetrOLED CM5 dts.

Weixin Zhou and others added 9 commits June 10, 2026 17:13
ls -l sys/class/misc/mali0/device/kprcs/(pid)/
-r--r--r-- 1 root root 4096 2025-06-12 21:59 private_gpu_mem
-r--r--r-- 1 root root 4096 2025-06-12 21:59 total_gpu_mem

ls -l sys/class/misc/mali0/device/
-r--r--r-- 1 root root 4096 2025-06-12 22:35 private_gpu_mem
-r--r--r-- 1 root root 4096 2025-06-12 22:35 total_gpu_mem

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ie14aa324779492bd7983fcf1c94dab86bc066e2c
KBASE_PM_RUNTIME was originally defined by ARM.
However, in the modification to upgrade driver to g29p0-00eac0 (r54), ARM removed KBASE_PM_RUNTIME,
and the source code that depended on KBASE_PM_RUNTIME was modified to be enabled by default.
This modification corresponds to
commit fb91362 ("MALI: valhall: upgrade DDK to g29p0-00eac0, from g28p0-00eac0").

Some code previously added by finley.xiao@rock-chips.com also depends on KBASE_PM_RUNTIME.
After picking the above commit, the definition of KBASE_PM_RUNTIME was removed,
making the code added by Finley unable to be enabled.
This may lead to anomalies such as "failed to get ack on domain 'gpu'...",
as referenced in https://redmine.rock-chips.com/issues/568204.

This modification fixes the issue above.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ibf57f363f4f779eceb0e7891271e41cae1a560ea
mali_csffw.bin from Valhall DDK g29p1-11eac0(r54p1-11eac0) is included.

Change-Id: I7e6f5b9eef52334d8cd48a3c607e789ccc20ea3a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I920e4d72f0f5d1f7d15977ba54c49a2e508d24bd
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
…array

Previously, the GPU FW was built into the driver using '.incbin \"drivers/gpu/arm/valhall/mali_csffw.bin\"'.
If compiling outside the kernel directory, an error would occur, hence this modification is introduced.

The content of mali_csffw.bin is converted into the array 'mali_csffw' in mali_csffw.h.
The conversion command line is as follows:
hexdump -ve '"\n" 16/1 "0x%02X,"' drivers/gpu/arm/valhall/mali_csffw.bin | sed 's/0x  ,//g;1s/^/static u8 mali_csffw[]={/;$s/,$/\n};\n/' > drivers/gpu/arm/valhall/mali_csffw.h
Provided by huangtao@rock-chips.com.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I7afb8a2bd684a9ff24e8bacda89e9dd9ad19a5ff
Unable to handle kernel paging request at virtual address
deacffffffffe54c
Mem abort info:
  ESR = 0x0000000096000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
[deacffffffffe54c] address between user and kernel address ranges
Internal error: Oops: 0000000096000004 [armbian#1] PREEMPT SMP
Modules linked in: wifi_1105(O) plat_1105(O) r8168
CPU: 4 PID: 588 Comm: android.hardwar Tainted: G        W  O
6.1.118-ab1 armbian#1
Hardware name: Rockchip RK3576S TABLET DE30 Board (DT)
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : kbase_private_gpu_mem_show+0x28/0x6c
lr : kbase_kctx_attr_show+0x18/0x2c
sp : ffffffc011033c10
x29: ffffffc011033c10 x28: ffffff80d503adc0 x27: 0000000000000000
x26: 0000000000000000 x25: 000000007ffff001 x24: 0000000000000001
x23: ffffff8192afb6c0 x22: ffffffc0095fdd80 x21: ffffff8161723000
x20: ffffff8159825380 x19: ffffff80c8043528 x18: ffffffc011025070
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
x11: ffffffffffffe44c x10: 0000000000000000 x9 : dead000000000100
x8 : ffffff81598253d0 x7 : 0000000000000000 x6 : 000000000000003f
x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004
x2 : ffffff8161723000 x1 : ffffffc00a140550 x0 : ffffff8161723000
Call trace:
 kbase_private_gpu_mem_show+0x28/0x6c
 kbase_kctx_attr_show+0x18/0x2c
 sysfs_kf_seq_show+0x9c/0x114
 kernfs_seq_show+0x2c/0x38
 seq_read_iter+0x134/0x408
 kernfs_fop_read_iter+0x60/0x18c
 vfs_read+0x1a8/0x294
 ksys_read+0x78/0xe4
 __arm64_sys_read+0x1c/0x28
 invoke_syscall+0x40/0x104
 el0_svc_common+0xb8/0x164
 do_el0_svc+0x1c/0x28
 el0_svc+0x1c/0x48
 el0t_64_sync_handler+0x68/0xb4
 el0t_64_sync+0x164/0x168

Change-Id: I745b5142415faa3702df4894c658bb39eda0bebe
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3e4f955572591e86c90d77b80d3bb34afb44491f
Includes the update to mali_csffw.h (GPU Firmware).

To resolve the error in eglInitialize,
the implementation of kbase_region_tracker_init_exec() has been modified
back to a state close to that in r53.
It appears that there is an issue with the implementation of this function
in the ARM released DDK r54p1-12eac0.

Additionally, separate memory_group_manager.h of r54p1-12eac0 into memory_group_manager_for_valhall.h,
and modify the relevant references accordingly; while, keep memory_group_manager.h in its original state.
This is because r54p1-12eac0 modified the definition of struct memory_group_manager_ops
in memory_group_manager.h, which causes compilation errors in the drivers/gpu/arm/bifrost whose
current DDK version is g25(r50).

Change-Id: Ife9da3ed9a2189613b769ccac4a57411ac1c6cde
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bbe77b2-7984-4f3c-a08e-dbde0e025909

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ginkage ginkage marked this pull request as draft June 27, 2026 22:59
@ginkage ginkage marked this pull request as ready for review June 28, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants