[PR #289] gpu_unlock: detect aperture API by header presence #283

Open
opened 2026-11-07 17:54:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Zagitta/gpu-unlock/pull/289
Author: @lslowmotion
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/rhel-aperture-backport


📝 Commits (1)

  • faf4da4 gpu_unlock: detect aperture API by header presence

📊 Changes

1 file changed (+12 additions, -2 deletions)

View changed files

📝 kernel/gpu_unlock/unlock_610.c (+12 -2)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Zagitta/gpu-unlock/pull/289 **Author:** [@lslowmotion](https://github.com/lslowmotion) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/rhel-aperture-backport` --- ### 📝 Commits (1) - [`faf4da4`](https://github.com/Zagitta/gpu-unlock/commit/faf4da414946cf921a625d9813460666a3d6ed91) gpu_unlock: detect aperture API by header presence ### 📊 Changes **1 file changed** (+12 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `kernel/gpu_unlock/unlock_610.c` (+12 -2) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Zagitta/gpu-unlock#283
No description provided.