kernel-config: Build the Rocket NPU driver in, not as a module - #159
Open
Notnurb wants to merge 1 commit into
Open
kernel-config: Build the Rocket NPU driver in, not as a module#159Notnurb wants to merge 1 commit into
Notnurb wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CONFIG_DRM_ACCEL_ROCKET=mloads too late: a module probes after the late_initcall that disables "unused" regulators, which cutsvdd_npu_s0before rocket touches it, so/dev/accel/accel0never appearsconfigs/linux/npumakingDRM_ACCEL_ROCKETbuilt-in, along withDRM,DRM_SCHEDandDRM_GEM_SHMEM_HELPER(rocket selects these, and a built-in driver can't depend on modular ones)=mfromconfigs/minconfig-mainlineThis is a prerequisite step for RK3576 NPU support. The
rocketdriver upstream currently only matches the RK3588 core (rockchip,rk3588-rknn-core). The RK3576 kernel/DTS enablement (based on the in-review v9 series fromgahingwoo/linux-rk3576-npu) is tracked separately and not part of this PR.Test plan
./build-kernel-mainline.shin the Docker/devcontainer, confirm the merged.confighasCONFIG_DRM_ACCEL_ROCKET=y/dev/accel/accel0is present and stays present well past the ~31s late_initcall mark