Repository navigation
Conversation
Signed-off-by: Andreas Cord-Landwehr <cordlandwehr@kde.org> Signed-off-by: OOHehir <40183643+OOHehir@users.noreply.github.com>
…tered pvr_init() no longer calls pvr_devices_register(), as the GPU comes from the device tree, so pvr_devices stays NULL. pvr_exit() still calls pvr_devices_unregister(), whose BUG_ON(!pvr_devices) then fires on every unload of the module: on a systemd image, rc.pvr.service runs "modprobe -r pvrsrvkm" at shutdown & every reboot ends in a kernel panic. The path exists only when the driver is built as a module; starfive_visionfive2_defconfig builds it in. Return early instead, as there is nothing to unregister. Signed-off-by: OOHehir <40183643+OOHehir@users.noreply.github.com>
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.
What
Two commits on
JH7110_VisionFive2_6.12.y_devel:DRM_IMG_ROGUEbecomestristate, sopvrsrvkmcan be built as a module. Andreas Cord-Landwehr's patch, carried in meta-riscv (the Yocto BSP layer for VisionFive 2) since 2023.Why
Built as a module,
pvr_exit()callspvr_devices_unregister(), which starts withBUG_ON(!pvr_devices).pvr_init()no longer callspvr_devices_register(), as the GPU comes from the device tree, sopvr_devicesis always NULL & every unload panics:On Yocto images
rc.pvrunloads the module at shutdown, so every reboot ends this way.starfive_visionfive2_defconfigbuilds the driver in, where the change has no effect.Testing
VisionFive 2 v1.3B, 4cecf16 with both commits, built by meta-riscv (which also applies its compiler-fix patches),
DRM_IMG_ROGUE=m:modprobe -r pvrsrvkm)rgx_triangle_testrebootNot tested: the built-in configuration. Commit 2 only changes code under
#if defined(MODULE).Related: riscv/meta-riscv#713