From d740e1fd6fa16f70ef93bc12946200330289891d Mon Sep 17 00:00:00 2001 From: liu shiwei Date: Sat, 25 Jan 2025 21:22:46 +0800 Subject: [PATCH 3/3] replace ttm_tt_populate(), Reference patch6.13 modification. --- include/gsgpu_ttm_helper.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/loonggpu-1.0.1/include/gsgpu_ttm_helper.h b/loonggpu-1.0.1/include/gsgpu_ttm_helper.h index 5eeebf3..0ab9e2d 100644 --- a/loonggpu-1.0.1/include/gsgpu_ttm_helper.h +++ b/loonggpu-1.0.1/include/gsgpu_ttm_helper.h @@ -5,6 +5,7 @@ #if defined(LG_DRM_TTM_TTM_DEVICE_H_PRESENT) #include #endif +#include #include "conftest.h" unsigned long gsgpu_ttm_io_mem_pfn_buddy(struct ttm_buffer_object *bo, @@ -159,7 +160,11 @@ static inline int lg_ttm_tt_bind(struct ttm_buffer_object *bo, lg_ttm_mem_t *mem return ttm_tt_bind(bo->ttm, mem, ctx); #else int r; - r = ttm_tt_populate(bo->bdev, bo->ttm, ctx); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) + r = ttm_tt_populate(bo->bdev, bo->ttm, ctx); +#else + r = ttm_bo_populate(bo, ctx); +#endif if (r) return r; r = gsgpu_ttm_backend_bind(bo->bdev, bo->ttm, mem); -- 2.47.2