From 28f6727e980c91f734e878b8254130ce8b8d0368 Mon Sep 17 00:00:00 2001 From: liu shiwei Date: Sat, 25 Jan 2025 21:21:22 +0800 Subject: [PATCH 2/3] replace drm_aperture_remove_conflicting_framebuffr(), Reference patch6.13 modification. --- include/gsgpu_helper.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/loonggpu-1.0.1/include/gsgpu_helper.h b/loonggpu-1.0.1/include/gsgpu_helper.h index c4f9727..8d08041 100644 --- a/loonggpu-1.0.1/include/gsgpu_helper.h +++ b/loonggpu-1.0.1/include/gsgpu_helper.h @@ -21,9 +21,13 @@ #include "gsgpu.h" #include #include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) #if defined(LG_DRM_DRM_APERTURE_H_PRESENT) #include #endif +#endif +#include #include #include #if defined(LG_LINUX_PCI_DMA_COMPAT_H_PRESENT) @@ -839,8 +843,13 @@ static int lg_kick_out_firmware_fb(struct pci_dev *pdev, struct drm_driver *drv) return 0; #else - drm_aperture_remove_conflicting_framebuffers(pci_resource_start(pdev, 2), - pci_resource_len(pdev, 2), drv); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) + drm_aperture_remove_conflicting_framebuffers(pci_resource_start(pdev, 2), + pci_resource_len(pdev, 2), drv); +#else + aperture_remove_conflicting_devices(pci_resource_start(pdev, 2), + pci_resource_len(pdev, 2), drv->name); +#endif return 0; #endif } -- 2.47.2