From 604dfe47c92d62ae142008c374aaba9bef0635ab Mon Sep 17 00:00:00 2001 From: "shanlong.li" Date: Tue, 30 Jan 2024 00:06:39 -0800 Subject: [PATCH] driver:gpu: memset pagearray before use it by cacheable addr memset pageArray befor use it to fix up fw load error and grainy screen Signed-off-by: shanlong.li --- .../services/server/env/linux/physmem_osmem_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/img/img-rogue/services/server/env/linux/physmem_osmem_linux.c b/drivers/gpu/drm/img/img-rogue/services/server/env/linux/physmem_osmem_linux.c index e6bef8d19c545..320f855cdbdbc 100644 --- a/drivers/gpu/drm/img/img-rogue/services/server/env/linux/physmem_osmem_linux.c +++ b/drivers/gpu/drm/img/img-rogue/services/server/env/linux/physmem_osmem_linux.c @@ -1958,7 +1958,7 @@ _AllocOSPages_Fast(PMR_OSPAGEARRAY_DATA *psPageArrayData) { eError = _MemsetPageArray(uiOSPagesToAlloc - uiDevPagesFromPool, ppsPageAttributeArray, PAGE_KERNEL, - PVRSRV_ZERO_VALUE, 0); + PVRSRV_ZERO_VALUE, 1); if (eError != PVRSRV_OK) { PVR_DPF((PVR_DBG_ERROR, "Failed to zero pages (fast)")); @@ -1971,14 +1971,14 @@ _AllocOSPages_Fast(PMR_OSPAGEARRAY_DATA *psPageArrayData) * can point to different allocations: first for pages obtained from * the pool and then the remaining pages */ eError = _MemsetPageArray(uiDevPagesFromPool, ppsPageArray, PAGE_KERNEL, - PVRSRV_POISON_ON_ALLOC_VALUE, 0); + PVRSRV_POISON_ON_ALLOC_VALUE, 1); if (eError != PVRSRV_OK) { PVR_DPF((PVR_DBG_ERROR, "Failed to poison pages (fast)")); } eError = _MemsetPageArray(uiOSPagesToAlloc - uiDevPagesFromPool, ppsPageAttributeArray, PAGE_KERNEL, - PVRSRV_POISON_ON_ALLOC_VALUE, 0); + PVRSRV_POISON_ON_ALLOC_VALUE, 1); if (eError != PVRSRV_OK) { PVR_DPF((PVR_DBG_ERROR, "Failed to poison pages (fast)"));