[Letux-kernel] [PATCH] pvrsgx/1.14: get_user_pages_remote no longer takes task_struct

David Shah dave at ds0.me
Tue Aug 18 20:25:00 CEST 2020


Fixes the build of the 1.14 driver version on v5.9-rc1.

Note that Pyra-OS still uses 1.14.3699939 for X11 integration with
DRI3WSEGL.

This isn't actually running yet, I get the following error:

[   12.663492] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
[   13.846168] PVR_K:(Error): PollForValueKM: Timeout. Expected 0x1 but found 0x0 (mask 0x1).
[   13.880820] PVR_K:(Error): SGXInitialise: Wait for uKernel initialisation failed

followed by a PVR register dump.

Signed-off-by: David Shah <dave at ds0.me>
---
 .../eurasia_km/services4/srvkm/env/linux/osfunc.c             | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c b/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c
index 99dc282eaf4b..8b34a0a0804f 100644
--- a/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c
+++ b/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c
@@ -3723,7 +3723,9 @@ PVRSRV_ERROR OSAcquirePhysPageAddr(IMG_VOID *pvCPUVAddr,
     bMMapSemHeld = IMG_TRUE;
 
     /* Get page list */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+    psInfo->iNumPagesMapped = get_user_pages_remote(current->mm, uStartAddr, psInfo->iNumPages, FOLL_WRITE, psInfo->ppsPages, NULL, NULL);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
     psInfo->iNumPagesMapped = get_user_pages_remote(current, current->mm, uStartAddr, psInfo->iNumPages, FOLL_WRITE, psInfo->ppsPages, NULL, NULL);
 #else
     psInfo->iNumPagesMapped = get_user_pages_remote(current, current->mm, uStartAddr, psInfo->iNumPages, FOLL_WRITE, psInfo->ppsPages, NULL);
-- 
2.28.0



More information about the Letux-kernel mailing list