Skip to content

feat(drm): limit DRM module installation to amdgpu, loongson, and radeon - #2693

Open
devkontrol wants to merge 1 commit into
dracut-ng:mainfrom
devkontrol:mips
Open

feat(drm): limit DRM module installation to amdgpu, loongson, and radeon#2693
devkontrol wants to merge 1 commit into
dracut-ng:mainfrom
devkontrol:mips

Conversation

@devkontrol

Copy link
Copy Markdown
Collaborator

If we are using mips64el (assumed to be MIPS-based Loongson), only install modules for loongson, radeon, and amdgpu as these are the only three DRM drivers supported by these platforms. We need to minimise the sizes of the initramfs so that it fits within the RAM allocated by the system firmware.

Upstreamed from https://github.com/AOSC-Dev/aosc-os-abbs/blob/9173a17045c165d6c60944ed7a0f1c1deb606fa8/app-admin/dracut-ng/autobuild/patches/0001-AOSCOS-LOONGSON3-45drm-limit-DRM-module-installation.patch

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

If we are using mips64el (assumed to be MIPS-based Loongson), only install
modules for loongson, radeon, and amdgpu as these are the only three DRM
drivers supported by these platforms. We need to minimise the sizes of the
initramfs so that it fits within the RAM allocated by the system firmware.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
@devkontrol
devkontrol requested a review from a team as a code owner August 30, 2026 11:51
@github-actions github-actions Bot added drm Issues related to the drm module modules Issue tracker for all modules labels Aug 30, 2026
@LaszloGombos
LaszloGombos requested a balanced review from Copilot August 30, 2026 12:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Limits DRM modules on MIPS64 Loongson systems to reduce initramfs size.

Changes:

  • Excludes amdkfd and hyperv_fb from general MIPS64 installation.
  • Restricts non-host-only DRM scanning to AMDGPU, AMDXCP, Loongson, and Radeon paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +21 to +25
if [[ ${DRACUT_ARCH:-$(uname -m)} != mips64 ]]; then
hostonly=$(optional_hostonly) instmods amdkfd hyperv_fb "=drivers/pwm"
else
hostonly=$(optional_hostonly) instmods "=drivers/pwm"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drm Issues related to the drm module modules Issue tracker for all modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants