Skip to content

board: rk3588: switch reComputer RK3588 to Panthor open-source GPU stack - #10320

Merged
rpardini merged 1 commit into
armbian:mainfrom
Seeed-Studio:feat/rk3588-enable-panthor-gpu-stack
Aug 20, 2026
Merged

board: rk3588: switch reComputer RK3588 to Panthor open-source GPU stack#10320
rpardini merged 1 commit into
armbian:mainfrom
Seeed-Studio:feat/rk3588-enable-panthor-gpu-stack

Conversation

@Mkiring

@Mkiring Mkiring commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Default the reComputer RK3588 to the open-source Panthor GPU stack, switchable at boot via the rockchip-rk3588-panthor-gpu DT overlay instead of compile-time kernel changes.
  • Kernel: keep the vendor Mali KMD untouched (CONFIG_MALI_BIFROST=m, everything else restored to previous values) and add CONFIG_DRM_PANTHOR=m. The base DTB carries two mutually exclusive GPU nodes for the same hardware (gpu@fb000000 for the Mali KMD, gpu-panthor@fb000000 for Panthor); the overlay disables one and enables the other, so exactly one KMD binds per boot — flipping stacks needs no rebuild.
  • Board: ship overlays=rockchip-rk3588-panthor-gpu by default (RECOMPUTER_GPU_STACK=panthor), skip the libmali userspace and install Mesa instead (bookworm: from backports). Removing the overlay from armbianEnv.txt switches back to the Mali KMD; libmali userspace for that path (OpenCL/Vulkan compute) is installed separately.
  • Why Panthor as the default: on trixie and later the vendor libmali blob is ABI-incompatible with the newer desktop stack (grey screen / compositor fails); Panthor+Mesa works out of the box.
  • Both drivers are modules and autoload via OF modalias from the enabled node only; the initramfs firmware hook from earlier revisions was dropped (the module requests mali_csffw.bin after the rootfs is mounted; the firmware is still installed to /lib/firmware).

Testing (reComputer RK3588 DevKit, dual-driver 6.1.115 kernel)

  • Overlay on (default): panthor.ko autoloads, bifrost_kbase stays unloaded, gpu-panthor@fb000000 => okay, panthor fb000000.gpu-panthor: [drm] mali-g610 id 0xa867, Mesa render nodes present
  • Overlay removed: bifrost_kbase.ko autoloads, panthor stays unloaded, gpu@fb000000 => okay, rk kbase platform init in dmesg
  • Overlay restored → back on Panthor
  • Full desktop image build + smoke test with the new config

Summary by CodeRabbit

  • New Features
    • Added Panthor GPU stack support for the RK3588 development kit.
    • Enabled the Panthor graphics driver, Mesa graphics components, and required GPU firmware.
    • Improved graphics compatibility with updated kernel and userspace graphics support.
  • Bug Fixes
    • Prevented legacy Mali libraries and configuration from conflicting with Panthor.
    • Preserved existing Mali graphics behavior for non-Panthor configurations.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cfcac999-0b0c-4dda-8944-cde521d50a9b

📥 Commits

Reviewing files that changed from the base of the PR and between fa684a2 and 6f2b6b6.

📒 Files selected for processing (3)
  • config/boards/recomputer-rk3588-devkit.conf
  • config/kernel/linux-seeed-rk3588-vendor.config
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
🚧 Files skipped from review as they are similar to previous changes (3)
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
  • config/boards/recomputer-rk3588-devkit.conf
  • config/kernel/linux-seeed-rk3588-vendor.config

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The RK3588 board configuration now supports the Panthor GPU stack. It selects the Panthor overlay, configures the kernel driver, installs Mesa packages, removes conflicting Mali userspace files, selects Mesa GBM, and installs the required firmware.

Changes

Panthor GPU stack

Layer / File(s) Summary
Kernel and board Panthor selection
config/kernel/linux-seeed-rk3588-vendor.config, config/boards/recomputer-rk3588-devkit.conf
The kernel builds Panthor as a module and changes Mali Bifrost to a module. The board selects the Panthor device-tree overlay and skips Mali userspace installation when Panthor is selected.
Mesa userspace integration
config/boards/recomputer-rk3588-devkit.conf, config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc
Bookworm builds configure Debian backports and install Mesa/Vulkan packages. Panthor builds remove conflicting Mali files, refresh ldconfig, skip the Mali EGL override, and select Mesa GBM.
Panthor firmware installation
config/boards/recomputer-rk3588-devkit.conf
The build searches configured kernel sources for mali_csffw.bin, reports an error when the firmware is absent, and installs it in the ARM Mali firmware path. The previous initramfs firmware-copy hook is removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6f2b6

This PR changes the default GPU stack and keeps an explicit boot-time fallback, with no actionable merge-blocking risk identified in the supplied evidence; it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant BoardConfig as RK3588 board configuration
  participant KernelConfig as RK3588 kernel configuration
  participant DebianBackports as Debian Bookworm backports
  participant Rootfs as RK35xx root filesystem
  participant KernelSources as Configured kernel sources

  BoardConfig->>KernelConfig: Configure Panthor and related Mali options
  BoardConfig->>BoardConfig: Select the Panthor device-tree overlay
  BoardConfig->>DebianBackports: Configure backports and install Mesa/Vulkan packages
  BoardConfig->>Rootfs: Remove conflicting Mali files and select Mesa GBM
  BoardConfig->>KernelSources: Search for mali_csffw.bin
  KernelSources-->>BoardConfig: Return Panthor firmware
  BoardConfig->>Rootfs: Install firmware in the ARM Mali firmware path
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: switching the reComputer RK3588 to the Panthor open-source GPU stack.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

@github-actions github-actions Bot added 08 Milestone: Third quarter release size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/boards/recomputer-rk3588-devkit.conf`:
- Around line 97-108: Update the generated panthor-firmware hook script to
handle the mkinitramfs prereqs invocation before sourcing hook functions or
copying firmware: when $1 is prereqs, print the hook’s prerequisites (none) and
exit successfully. Keep the existing firmware installation flow for normal
invocations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e61d6e40-a5fd-4a90-8bf0-763282c830b1

📥 Commits

Reviewing files that changed from the base of the PR and between 7edcf62 and bb072a4.

📒 Files selected for processing (3)
  • config/boards/recomputer-rk3588-devkit.conf
  • config/kernel/linux-seeed-rk3588-vendor.config
  • config/sources/vendors/seeed-studio/recomputer-rk35xx-common.inc

Comment thread config/boards/recomputer-rk3588-devkit.conf Outdated
Comment thread config/kernel/linux-seeed-rk3588-vendor.config Outdated
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions github-actions Bot added the Ready to merge Reviewed, tested and ready for merge label Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot removed the Needs review Seeking for review label Aug 20, 2026
The proprietary Mali/Bifrost GPU driver (mali-valhall-g610 / libmali)
has poor compatibility with newer Debian releases and desktop
environments, causing the desktop to fail to start. Switch the
reComputer RK3588 DevKit to the upstream Panthor DRM driver + Mesa
userspace stack.

Changes:
- Kernel: enable CONFIG_DRM_PANTHOR, disable all Mali/Bifrost configs
- Boot: add RECOMPUTER_GPU_STACK="panthor" and load the panthor DT overlay
- Rootfs: skip proprietary libmali, install Mesa from bookworm-backports
- Firmware: ship mali_csffw.bin required by Panthor
- Cleanup: remove Mali EGL/GBM wrapper leftovers when using Panthor

board: rk3588: handle prereqs invocation in panthor-firmware hook

mkinitramfs calls each hook first with $1=prereqs to query
dependencies, then again to perform the actual work. Add the
standard prereqs guard so the hook prints an empty dependency
list and exits before running mkdir/cp.

The previous form worked in practice — mkinitramfs exports
DESTDIR before the prereqs query (verified against
initramfs-tools 0.151, and confirmed by the built initrd
containing mali_csffw.bin), so the cp did not fail. But it
relied on that invariant and ran side effects during a
metadata-only call. Following the documented hook contract
makes the behavior explicit and forward-compatible.

board: rk3588: keep Mali KMD, switch GPU stacks via panthor overlay

Per review feedback, don't disable the vendor Mali KMD at compile time:
users then can't switch back to libmali for OpenCL/Vulkan compute. The
base DTB carries two mutually exclusive GPU nodes for the same hardware
(gpu@fb000000 for the Mali KMD, gpu-panthor@fb000000 for Panthor), and
the rockchip-rk3588-panthor-gpu overlay disables one and enables the
other, so with both KMDs present exactly one driver binds, chosen per
boot by the overlay.

CONFIG_DRM_PANTHOR=m and CONFIG_MALI_BIFROST=m: both modules autoload
via OF modalias from the enabled node only. Device-verified on a
reComputer RK3588 (dual-driver kernel):

  overlay on (default): panthor.ko loaded, bifrost_kbase not loaded,
                        gpu-panthor@fb000000 => okay, G610 probes fine
  overlay off:          bifrost_kbase.ko loaded, panthor not loaded,
                        gpu@fb000000 => okay, kbase platform probes

The default image still ships overlays=rockchip-rk3588-panthor-gpu plus
the Mesa userspace (on trixie+ libmali is ABI-incompatible with the
newer desktop stack), so nothing changes for the out-of-the-box desktop.

Building Panthor as a module also means the firmware is requested after
the rootfs is mounted, so the initramfs hook copying mali_csffw.bin is
no longer needed; the firmware file itself is still installed to
/lib/firmware.

Signed-off-by: Mkirin <haohao.wang@seeed.cc>
@Mkiring
Mkiring force-pushed the feat/rk3588-enable-panthor-gpu-stack branch from 6f2b6b6 to 36ceb7c Compare August 20, 2026 11:54
@github-actions github-actions Bot added Needs review Seeking for review and removed Ready to merge Reviewed, tested and ready for merge labels Aug 20, 2026
@rpardini
rpardini merged commit 07cd7fb into armbian:main Aug 20, 2026
13 checks passed
Comment on lines +77 to +99
function pre_update_initramfs__recomputer_rk3588_install_panthor_firmware() {
[[ "${RECOMPUTER_GPU_STACK}" == "panthor" ]] || return 0

local root_dir="${MOUNT:-${SDCARD}}"
local fw_src=""
local -a fw_candidates=(
"${SRC}/cache/sources/${LINUXSOURCEDIR:-}/drivers/gpu/arm/bifrost/mali_csffw.bin"
"${SRC}/../linux-rockchip/drivers/gpu/arm/bifrost/mali_csffw.bin"
)
fw_candidates+=("${SRC}"/cache/sources/linux-kernel-worktree/*/drivers/gpu/arm/bifrost/mali_csffw.bin)

for candidate in "${fw_candidates[@]}"; do
if [[ -f "${candidate}" ]]; then
fw_src="${candidate}"
break
fi
done

[[ -n "${fw_src}" ]] || exit_with_error "Panthor firmware not found" "mali_csffw.bin"

display_alert "Panthor firmware" "Installing ${fw_src}" "info"
install -Dm0644 "${fw_src}" "${root_dir}/lib/firmware/arm/mali/arch10.8/mali_csffw.bin"
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Mkiring this causes breakage; not all image-builders (which build the initramfs) have the cache/sources of the kernel (in CI for example the kernel is built by dedicated runners).

Also, the mali blobs are in armbian-firmware package. Why this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send a PR dropping this hook as it doesn't seem to be necessary at all.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sent #10488

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorpecovnik had already sent #10487 -- either is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

3 participants