Skip to content

gpu_unlock: detect aperture API by header presence - #289

Open
lslowmotion wants to merge 1 commit into
Zagitta:mainfrom
lslowmotion:fix/rhel-aperture-backport
Open

lslowmotion wants to merge 1 commit into
Zagitta:mainfrom
lslowmotion:fix/rhel-aperture-backport

Conversation

@lslowmotion

Copy link
Copy Markdown

RHEL 9.7 backports the 6.0 aperture helpers into its 5.14-based kernel, so include/linux/aperture.h exists and remove_conflicting_pci_framebuffers() is gone, yet LINUX_VERSION_CODE still reports 5.14.0. The old version check therefore selected the removed function, breaking the DKMS build with an implicit-declaration error.

Detect the new API with __has_include(<linux/aperture.h>) instead, which works for both upstream >= 6.0 and RHEL backports regardless of the reported kernel version.

RHEL 9.7 backports the 6.0 aperture helpers into its 5.14-based kernel,
so include/linux/aperture.h exists and remove_conflicting_pci_framebuffers()
is gone, yet LINUX_VERSION_CODE still reports 5.14.0. The old version check
therefore selected the removed function, breaking the DKMS build with an
implicit-declaration error.

Detect the new API with __has_include(<linux/aperture.h>) instead, which
works for both upstream >= 6.0 and RHEL backports regardless of the
reported kernel version.
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