Skip to content

kernel-config: Build the Rocket NPU driver in, not as a module - #159

Open
Notnurb wants to merge 1 commit into
flipperdevices:devfrom
Notnurb:npu-rocket-builtin
Open

kernel-config: Build the Rocket NPU driver in, not as a module#159
Notnurb wants to merge 1 commit into
flipperdevices:devfrom
Notnurb:npu-rocket-builtin

Conversation

@Notnurb

@Notnurb Notnurb commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • CONFIG_DRM_ACCEL_ROCKET=m loads too late: a module probes after the late_initcall that disables "unused" regulators, which cuts vdd_npu_s0 before rocket touches it, so /dev/accel/accel0 never appears
  • Add configs/linux/npu making DRM_ACCEL_ROCKET built-in, along with DRM, DRM_SCHED and DRM_GEM_SHMEM_HELPER (rocket selects these, and a built-in driver can't depend on modular ones)
  • Drop the now-contradictory =m from configs/minconfig-mainline

This is a prerequisite step for RK3576 NPU support. The rocket driver upstream currently only matches the RK3588 core (rockchip,rk3588-rknn-core). The RK3576 kernel/DTS enablement (based on the in-review v9 series from gahingwoo/linux-rk3576-npu) is tracked separately and not part of this PR.

Test plan

  • ./build-kernel-mainline.sh in the Docker/devcontainer, confirm the merged .config has CONFIG_DRM_ACCEL_ROCKET=y
  • Boot on a board with the RK3588-class rocket core, confirm /dev/accel/accel0 is present and stays present well past the ~31s late_initcall mark

CONFIG_DRM_ACCEL_ROCKET=m loads too late: a module probes well after
the late_initcall that switches off "unused" regulators, which cuts
vdd_npu_s0 before rocket ever gets to it, so /dev/accel/accel0 never
appears. Making it built-in fixes that ordering.

DRM_ACCEL_ROCKET built-in requires DRM, DRM_SCHED and
DRM_GEM_SHMEM_HELPER built-in too, since rocket selects them and a
built-in driver cannot depend on modular ones. Add these to a new
configs/linux/npu fragment rather than growing the base config, and
drop the now-contradictory =m from minconfig-mainline.

This is a prerequisite for enabling RK3576 NPU support (RK3588's
rocket core is the only one currently matched); the RK3576 kernel
and DTS changes are tracked separately.
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.

1 participant