if (gcmIS_SUCCESS(status))
{
/* Allocate memory. */
- if ((Flag & videoMemory->capability) != Flag)
- {
- status = gcvSTATUS_NOT_SUPPORTED;
-
- gcmkFATAL("%s(%d): Reject alloc because VIDMEM (pool=%d) caps=0x%x cannot meet required Flag=0x%x",
- __FUNCTION__, __LINE__, pool, videoMemory->capability, Flag);
- }
#if defined(gcdLINEAR_SIZE_LIMIT)
/* 512 KB */
- else if (Bytes > gcdLINEAR_SIZE_LIMIT)
+ if (Bytes > gcdLINEAR_SIZE_LIMIT)
{
status = gcvSTATUS_OUT_OF_MEMORY;
}
-#endif
else
+#endif
{
hasFastPools = gcvTRUE;
status = gckVIDMEM_AllocateLinear(Kernel,
memory->bytes = heapBytes;
memory->freeBytes = heapBytes;
memory->minFreeBytes = heapBytes;
- memory->capability = ~0u;
memory->threshold = Threshold;
memory->mutex = gcvNULL;
#include "gc_hal_kernel_linux.h"
-#include "gc_hal_kernel_allocator.h"
#include <linux/pagemap.h>
#include <linux/seq_file.h>
#include <linux/mman.h>
if (gcmIS_SUCCESS(status))
{
- gckALLOCATOR allocator = ((PLINUX_MDL)device->contiguousPhysical)->allocator;
- device->contiguousVidMem->capability = allocator->capability | gcvALLOC_FLAG_MEMLIMIT;
device->contiguousVidMem->physical = device->contiguousPhysical;
device->contiguousBase = physAddr;
break;
}
else
{
- gckALLOCATOR allocator;
-
gcmkONERROR(gckOS_RequestReservedMemory(
device->os, ContiguousBase, ContiguousSize,
"galcore contiguous memory",
&device->contiguousPhysical
));
- allocator = ((PLINUX_MDL)device->contiguousPhysical)->allocator;
- device->contiguousVidMem->capability = allocator->capability | gcvALLOC_FLAG_MEMLIMIT;
device->contiguousVidMem->physical = device->contiguousPhysical;
device->requestedContiguousBase = ContiguousBase;
device->requestedContiguousSize = ContiguousSize;