mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
gpu : force gcvSURF_TILE_STATUS use contiguous memory
This commit is contained in:
8
drivers/staging/rk29/vivante/hal/inc/gc_hal_options.h
Normal file → Executable file
8
drivers/staging/rk29/vivante/hal/inc/gc_hal_options.h
Normal file → Executable file
@@ -304,14 +304,12 @@
|
||||
|
||||
|
||||
/*
|
||||
dkm : gcdPAGE_ALLOC_LIMIT & gcdPAGE_ALLOC_LIMIT_SIZE
|
||||
dkm : gcdPAGE_ALLOC_LIMIT
|
||||
|
||||
<20><><EFBFBD><EFBFBD>gckOS_AllocatePagedMemoryEx<45><78>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>page<67>Ĵ<EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳpage<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ᵼ<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
gcdPAGE_ALLOC_LIMIT <20><><EFBFBD><EFBFBD>Page<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
gcdPAGE_ALLOC_LIMIT_SIZE <20><><EFBFBD><EFBFBD>Page<67><65><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С,<2C><>λΪM
|
||||
<20><><EFBFBD><EFBFBD>gckOS_AllocatePagedMemoryEx<45><78>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>page<67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̫<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD>䲻<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ᵼ<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ͣflush cache)
|
||||
<EFBFBD>µ<EFBFBD><EFBFBD>ں<EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
#define gcdPAGE_ALLOC_LIMIT 0
|
||||
#define gcdPAGE_ALLOC_LIMIT_SIZE 0
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -290,6 +290,11 @@ _AllocateMemory(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#if (0==gcdPAGE_ALLOC_LIMIT)
|
||||
// dkm : force gcvSURF_TILE_STATUS use contiguous memory
|
||||
if(gcvSURF_TILE_STATUS == Type) pool = gcvPOOL_CONTIGUOUS;
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
@@ -388,7 +393,10 @@ _AllocateMemory(
|
||||
while ((*Pool == gcvPOOL_DEFAULT)
|
||||
|| (*Pool == gcvPOOL_LOCAL)
|
||||
|| (*Pool == gcvPOOL_UNIFIED)
|
||||
|| ((*Pool == gcvPOOL_SYSTEM) && (pool==gcvPOOL_CONTIGUOUS))
|
||||
#if (0==gcdPAGE_ALLOC_LIMIT)
|
||||
// dkm : let gcvPOOL_SYSTEM can use contiguous memory
|
||||
|| ((*Pool == gcvPOOL_SYSTEM) && (pool==gcvPOOL_CONTIGUOUS))
|
||||
#endif
|
||||
);
|
||||
|
||||
if (gcmIS_SUCCESS(status))
|
||||
|
||||
@@ -3019,16 +3019,17 @@ gceSTATUS gckOS_AllocatePagedMemoryEx(
|
||||
{
|
||||
// dkm: gcdPAGE_ALLOC_LIMIT
|
||||
#if gcdPAGE_ALLOC_LIMIT
|
||||
if( (g_pages_alloced + numPages) > (256*gcdPAGE_ALLOC_LIMIT_SIZE) ) {
|
||||
#define PAGE_ALLOC_LIMIT_SIZE 0
|
||||
if( (g_pages_alloced + numPages) > (256*PAGE_ALLOC_LIMIT_SIZE) ) {
|
||||
//printk("full %d! \n", g_pages_alloced);
|
||||
addr = NULL;
|
||||
} else {
|
||||
addr = (char *)__get_free_pages(GFP_ATOMIC | GFP_DMA | __GFP_NOWARN, GetOrder(numPages));
|
||||
addr = (char *)__get_free_pages(GFP_ATOMIC | GFP_DMA | __GFP_NOWARN | __GFP_NO_KSWAPD, GetOrder(numPages));
|
||||
if(addr) {
|
||||
g_pages_alloced += numPages;
|
||||
//printk("alloc %d / %d \n", numPages, g_pages_alloced);
|
||||
} else {
|
||||
printk("gpu : alloc %d fail! (%d/%d)\n", numPages, g_pages_alloced, (256*gcdPAGE_ALLOC_LIMIT_SIZE) );
|
||||
printk("gpu : alloc %d fail! (%d/%d)\n", numPages, g_pages_alloced, (256*PAGE_ALLOC_LIMIT_SIZE) );
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user