diff options
Diffstat (limited to 'tiler')
-rw-r--r-- | tiler/Android.mk | 2 | ||||
-rw-r--r-- | tiler/mem_types.h | 19 | ||||
-rw-r--r-- | tiler/memmgr.c | 29 | ||||
-rw-r--r-- | tiler/memmgr.h | 23 | ||||
-rw-r--r-- | tiler/memmgr_test.c | 92 | ||||
-rw-r--r-- | tiler/tilermgr.c | 2 | ||||
-rw-r--r-- | tiler/tilermgr.h | 2 |
7 files changed, 83 insertions, 86 deletions
diff --git a/tiler/Android.mk b/tiler/Android.mk index ecb8e62..ffd3105 100644 --- a/tiler/Android.mk +++ b/tiler/Android.mk @@ -9,6 +9,7 @@ LOCAL_MODULE := libtimemmgr LOCAL_MODULE_TAGS := optional tests include $(BUILD_HEAPTRACKED_SHARED_LIBRARY) +ifeq (0,1) include $(CLEAR_VARS) LOCAL_SRC_FILES := memmgr_test.c testlib.c LOCAL_SHARED_LIBRARIES := libtimemmgr @@ -29,5 +30,6 @@ LOCAL_SHARED_LIBRARIES := libtimemmgr LOCAL_MODULE := tiler_ptest LOCAL_MODULE_TAGS:= tests include $(BUILD_HEAPTRACKED_EXECUTABLE) +endif endif diff --git a/tiler/mem_types.h b/tiler/mem_types.h index 18453bb..85b4c37 100644 --- a/tiler/mem_types.h +++ b/tiler/mem_types.h @@ -39,6 +39,7 @@ /* for bool definition */ #include <stdbool.h> #include <stdint.h> +#include <tiler.h> /** --------------------------------------------------------------------------- * Type definitions @@ -59,18 +60,16 @@ typedef uint16_t pixels_t; * Pixel format * * Page mode is encoded in the pixel format to handle different - * set of buffers uniformly + * set of buffers uniformly. */ -enum pixel_fmt_t { - PIXEL_FMT_MIN = 0, - PIXEL_FMT_8BIT = 0, - PIXEL_FMT_16BIT = 1, - PIXEL_FMT_32BIT = 2, - PIXEL_FMT_PAGE = 3, - PIXEL_FMT_MAX = 3 -}; -typedef enum pixel_fmt_t pixel_fmt_t; +#define PIXEL_FMT_8BIT TILFMT_8BIT +#define PIXEL_FMT_16BIT TILFMT_16BIT +#define PIXEL_FMT_32BIT TILFMT_32BIT +#define PIXEL_FMT_PAGE TILFMT_PAGE +#define PIXEL_FMT_MAX TILFMT_MAX + +typedef enum tiler_fmt pixel_fmt_t; /** * Ducati Space Virtual Address Pointer diff --git a/tiler/memmgr.c b/tiler/memmgr.c index 1f780cc..5eec95e 100644 --- a/tiler/memmgr.c +++ b/tiler/memmgr.c @@ -48,6 +48,7 @@ #define BUF_MAPPED 2 #define BUF_ANY ~0 +#include <mem_types.h> #include <tiler.h> typedef struct tiler_block_info tiler_block_info; @@ -66,6 +67,12 @@ typedef struct tiler_block_info tiler_block_info; #include "tilermem_utils.h" #include "memmgr.h" +#ifdef HEAPTRACKER +extern void print_backtrace(const intptr_t *bt, int depth); +#else +static void print_backtrace(const intptr_t *bt, int depth) {} +#endif + /* list of allocations */ struct _AllocData { struct tiler_buf_info buf; @@ -510,11 +517,16 @@ static void *tiler_mmap(struct tiler_block_info *blks, int num_blocks, /* register buffer with tiler */ struct tiler_buf_info buf; buf.num_blocks = num_blocks; + + if (num_blocks > TILER_MAX_NUM_BLOCKS) + return NULL; + /* work on copy in buf */ memcpy(buf.blocks, blks, sizeof(tiler_block_info) * num_blocks); #ifndef STUB_TILER dump_buf(&buf, "==(RBUF)=>"); int ret = ioctl(td, TILIOC_RBUF, &buf); + print_backtrace(NULL, 0); dump_buf(&buf, "<=(RBUF)=="); if (NOT_I(ret,==,0)) return NULL; size = buf.length; @@ -573,6 +585,7 @@ static void *tiler_mmap(struct tiler_block_info *blks, int num_blocks, NOT_I(buf_cache_add(&buf, buf_type),==,0)) { #ifndef STUB_TILER + print_backtrace(NULL, 0); A_I(ioctl(td, TILIOC_URBUF, &buf),==,0); #else FREE(buf_c); @@ -600,12 +613,10 @@ static void *tiler_mmap(struct tiler_block_info *blks, int num_blocks, * sized (fit on whole pages). * @return 0 on success, non-0 error value on failure. */ -static int check_block(tiler_block_info *blk, bool is_page_sized) +static int check_block(const tiler_block_info *blk, bool is_page_sized) { /* check pixelformat */ - if (NOT_I(blk->fmt,>=,PIXEL_FMT_MIN) || - NOT_I(blk->fmt,<=,PIXEL_FMT_MAX)) return MEMMGR_ERR_GENERIC; - + if (NOT_I(blk->fmt,<=,PIXEL_FMT_MAX)) return MEMMGR_ERR_GENERIC; if (blk->fmt == PIXEL_FMT_PAGE) { /* check 1D buffers */ @@ -649,7 +660,7 @@ static int check_block(tiler_block_info *blk, bool is_page_sized) * * @return 0 on success, non-0 error value on failure. */ -static int check_blocks(struct tiler_block_info *blks, int num_blocks, +static int check_blocks(const struct tiler_block_info *blks, int num_blocks, int num_pagesize_blocks) { /* check arguments */ @@ -660,7 +671,7 @@ static int check_blocks(struct tiler_block_info *blks, int num_blocks, int ix; for (ix = 0; ix < num_blocks; ix++) { - struct tiler_block_info *blk = blks + ix; + const struct tiler_block_info *blk = blks + ix; CHK_I(blk->ssptr,==,0); CHK_I(blk->id,==,0); int ret = check_block(blk, ix < num_pagesize_blocks); @@ -714,7 +725,7 @@ void *MemMgr_Alloc(MemAllocBlock blocks[], int num_blocks) void *bufPtr = NULL; /* need to access ssptrs */ - struct tiler_block_info *blks = (tiler_block_info *) blocks; + struct tiler_block_info *blks = blocks; /* check block allocation params, and state */ if (NOT_I(check_blocks(blks, num_blocks, num_blocks - 1),==,0) || @@ -769,6 +780,7 @@ int MemMgr_Free(void *bufPtr) { #ifndef STUB_TILER dump_buf(&buf, "==(URBUF)=>"); + print_backtrace(NULL, 0); ret = A_I(ioctl(td, TILIOC_URBUF, &buf),==,0); dump_buf(&buf, "<=(URBUF)=="); @@ -808,7 +820,7 @@ void *MemMgr_Map(MemAllocBlock blocks[], int num_blocks) /* we only map 1 page aligned 1D buffer for now */ if (NOT_I(num_blocks,==,1) || - NOT_I(blocks[0].pixelFormat,==,PIXEL_FMT_PAGE) || + NOT_I(blocks[0].fmt,==,PIXEL_FMT_PAGE) || NOT_I(blocks[0].dim.len & (PAGE_SIZE - 1),==,0) || #ifdef STUB_TILER NOT_I(MemMgr_IsMapped(blocks[0].ptr),==,0) || @@ -867,6 +879,7 @@ int MemMgr_UnMap(void *bufPtr) { #ifndef STUB_TILER dump_buf(&buf, "==(URBUF)=>"); + print_backtrace(NULL, 0); ret = A_I(ioctl(td, TILIOC_URBUF, &buf),==,0); dump_buf(&buf, "<=(URBUF)=="); diff --git a/tiler/memmgr.h b/tiler/memmgr.h index 8f99904..4a4b9b8 100644 --- a/tiler/memmgr.h +++ b/tiler/memmgr.h @@ -83,27 +83,10 @@ * * @author a0194118 (9/1/2009) */ -struct MemAllocBlock { - pixel_fmt_t pixelFormat; /* pixel format */ - union { - struct { - pixels_t width; /* width of 2D buffer */ - pixels_t height; /* height of 2D buffer */ - } area; - bytes_t len; /* length of 1D buffer. Must be multiple of - stride if stride is not 0. */ - } dim; - uint32_t stride; /* must be multiple of page size. Can be 0 only - if pixelFormat is PIXEL_FMT_PAGE. */ - void *ptr; /* pointer to beginning of buffer */ - uint32_t id; /* buffer ID - received at allocation */ - uint32_t key; /* buffer key - given at allocation */ - uint32_t group_id; /* group ID */ - /* alignment requirements for ssptr: ssptr & (align - 1) == offs */ - uint32_t reserved; /* system space address (used internally) */ -}; -typedef struct MemAllocBlock MemAllocBlock; +#include <tiler.h> + +typedef struct tiler_block_info MemAllocBlock; /** * Returns the page size. This is required for allocating 1D diff --git a/tiler/memmgr_test.c b/tiler/memmgr_test.c index 2bb76b6..3998d54 100644 --- a/tiler/memmgr_test.c +++ b/tiler/memmgr_test.c @@ -196,14 +196,14 @@ static bytes_t def_stride(bytes_t width) * * @author a0194118 (9/4/2009) * - * @param pixelFormat Pixelformat + * @param.fmt Pixelformat * * @return Bytes per pixel */ -static bytes_t def_bpp(pixel_fmt_t pixelFormat) +static bytes_t def_bpp(pixel_fmt_t fmt) { - return (pixelFormat == PIXEL_FMT_32BIT ? 4 : - pixelFormat == PIXEL_FMT_16BIT ? 2 : 1); + return fmt == PIXEL_FMT_32BIT ? 4 : + (fmt == PIXEL_FMT_16BIT ? 2 : 1); } /** @@ -229,7 +229,7 @@ void fill_mem(uint16_t start, MemAllocBlock *block) IN; uint16_t *ptr = (uint16_t *)block->ptr, delta = 1, step = 1; bytes_t height, width, stride, i; - if (block->pixelFormat == PIXEL_FMT_PAGE) + if (block->fmt == PIXEL_FMT_PAGE) { height = 1; stride = width = block->dim.len; @@ -240,7 +240,7 @@ void fill_mem(uint16_t start, MemAllocBlock *block) width = block->dim.area.width; stride = block->stride; } - width *= def_bpp(block->pixelFormat); + width *= def_bpp(block->fmt); bytes_t size = height * stride; P("(%p,0x%x*0x%x,s=0x%x)=0x%x", block->ptr, width, height, stride, start); @@ -249,7 +249,7 @@ void fill_mem(uint16_t start, MemAllocBlock *block) uint32_t *ptr32 = (uint32_t *)ptr; while (height--) { - if (block->pixelFormat == PIXEL_FMT_32BIT) + if (block->fmt == PIXEL_FMT_32BIT) { for (i = 0; i < width; i += sizeof(uint32_t)) { @@ -296,7 +296,7 @@ void fill_mem(uint16_t start, MemAllocBlock *block) } } - CHK_P((block->pixelFormat == PIXEL_FMT_32BIT ? (void *)ptr32 : (void *)ptr),==, + CHK_P((block->fmt == PIXEL_FMT_32BIT ? (void *)ptr32 : (void *)ptr),==, (block->ptr + size)); OUT; } @@ -317,7 +317,7 @@ int check_mem(uint16_t start, MemAllocBlock *block) IN; uint16_t *ptr = (uint16_t *)block->ptr, delta = 1, step = 1; bytes_t height, width, stride, r, i; - if (block->pixelFormat == PIXEL_FMT_PAGE) + if (block->fmt == PIXEL_FMT_PAGE) { height = 1; stride = width = block->dim.len; @@ -328,13 +328,13 @@ int check_mem(uint16_t start, MemAllocBlock *block) width = block->dim.area.width; stride = block->stride; } - width *= def_bpp(block->pixelFormat); + width *= def_bpp(block->fmt); CHK_I(width,<=,stride); uint32_t *ptr32 = (uint32_t *)ptr; for (r = 0; r < height; r++) { - if (block->pixelFormat == PIXEL_FMT_32BIT) + if (block->fmt == PIXEL_FMT_32BIT) { for (i = 0; i < width; i += sizeof(uint32_t)) { @@ -420,7 +420,7 @@ void *alloc_1D(bytes_t length, bytes_t stride, uint16_t val) MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = PIXEL_FMT_PAGE; + block.fmt = PIXEL_FMT_PAGE; block.dim.len = length; block.stride = stride; @@ -431,9 +431,9 @@ void *alloc_1D(bytes_t length, bytes_t stride, uint16_t val) NOT_I(MemMgr_Is1DBlock(bufPtr),!=,0) || NOT_I(MemMgr_Is2DBlock(bufPtr),==,0) || NOT_I(MemMgr_GetStride(bufPtr),==,block.stride) || - NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.reserved) || + NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.ssptr) || NOT_I(TilerMem_GetStride(TilerMem_VirtToPhys(bufPtr)),==,PAGE_SIZE) || - NOT_L((PAGE_SIZE - 1) & (long)bufPtr,==,(PAGE_SIZE - 1) & block.reserved)) + NOT_L((PAGE_SIZE - 1) & (long)bufPtr,==,(PAGE_SIZE - 1) & block.ssptr)) { MemMgr_Free(bufPtr); return NULL; @@ -463,7 +463,7 @@ int free_1D(bytes_t length, bytes_t stride, uint16_t val, void *bufPtr) MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = PIXEL_FMT_PAGE; + block.fmt = PIXEL_FMT_PAGE; block.dim.len = length; block.stride = stride; block.ptr = bufPtr; @@ -501,7 +501,7 @@ void *alloc_2D(pixels_t width, pixels_t height, pixel_fmt_t fmt, bytes_t stride, MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = fmt; + block.fmt = fmt; block.dim.area.width = width; block.dim.area.height = height; block.stride = stride; @@ -518,9 +518,9 @@ void *alloc_2D(pixels_t width, pixels_t height, pixel_fmt_t fmt, bytes_t stride, NOT_I(MemMgr_Is2DBlock(bufPtr),!=,0) || NOT_I(block.stride,!=,0) || NOT_I(MemMgr_GetStride(bufPtr),==,block.stride) || - NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.reserved) || + NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.ssptr) || NOT_I(TilerMem_GetStride(TilerMem_VirtToPhys(bufPtr)),==,cstride) || - NOT_L((PAGE_SIZE - 1) & (long)bufPtr,==,(PAGE_SIZE - 1) & block.reserved)) + NOT_L((PAGE_SIZE - 1) & (long)bufPtr,==,(PAGE_SIZE - 1) & block.ssptr)) { MemMgr_Free(bufPtr); return NULL; @@ -553,7 +553,7 @@ int free_2D(pixels_t width, pixels_t height, pixel_fmt_t fmt, bytes_t stride, MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = fmt; + block.fmt = fmt; block.dim.area.width = width; block.dim.area.height = height; block.stride = def_stride(width * def_bpp(fmt)); @@ -589,10 +589,10 @@ void *alloc_NV12(pixels_t width, pixels_t height, uint16_t val) MemAllocBlock blocks[2]; ZERO(blocks); - blocks[0].pixelFormat = PIXEL_FMT_8BIT; + blocks[0].fmt = PIXEL_FMT_8BIT; blocks[0].dim.area.width = width; blocks[0].dim.area.height = height; - blocks[1].pixelFormat = PIXEL_FMT_16BIT; + blocks[1].fmt = PIXEL_FMT_16BIT; blocks[1].dim.area.width = width >> 1; blocks[1].dim.area.height = height >> 1; @@ -611,12 +611,12 @@ void *alloc_NV12(pixels_t width, pixels_t height, uint16_t val) NOT_I(blocks[1].stride,!=,0) || NOT_I(MemMgr_GetStride(bufPtr),==,blocks[0].stride) || NOT_I(MemMgr_GetStride(buf2),==,blocks[1].stride) || - NOT_P(TilerMem_VirtToPhys(bufPtr),==,blocks[0].reserved) || - NOT_P(TilerMem_VirtToPhys(buf2),==,blocks[1].reserved) || + NOT_P(TilerMem_VirtToPhys(bufPtr),==,blocks[0].ssptr) || + NOT_P(TilerMem_VirtToPhys(buf2),==,blocks[1].ssptr) || NOT_I(TilerMem_GetStride(TilerMem_VirtToPhys(bufPtr)),==,TILER_STRIDE_8BIT) || NOT_I(TilerMem_GetStride(TilerMem_VirtToPhys(buf2)),==,TILER_STRIDE_16BIT) || - NOT_L((PAGE_SIZE - 1) & (long)blocks[0].ptr,==,(PAGE_SIZE - 1) & blocks[0].reserved) || - NOT_L((PAGE_SIZE - 1) & (long)blocks[1].ptr,==,(PAGE_SIZE - 1) & blocks[1].reserved)) + NOT_L((PAGE_SIZE - 1) & (long)blocks[0].ptr,==,(PAGE_SIZE - 1) & blocks[0].ssptr) || + NOT_L((PAGE_SIZE - 1) & (long)blocks[1].ptr,==,(PAGE_SIZE - 1) & blocks[1].ssptr)) { MemMgr_Free(bufPtr); return NULL; @@ -651,12 +651,12 @@ int free_NV12(pixels_t width, pixels_t height, uint16_t val, void *bufPtr) MemAllocBlock blocks[2]; memset(blocks, 0, sizeof(blocks)); - blocks[0].pixelFormat = PIXEL_FMT_8BIT; + blocks[0].fmt = PIXEL_FMT_8BIT; blocks[0].dim.area.width = width; blocks[0].dim.area.height = height; blocks[0].stride = def_stride(width); blocks[0].ptr = bufPtr; - blocks[1].pixelFormat = PIXEL_FMT_16BIT; + blocks[1].fmt = PIXEL_FMT_16BIT; blocks[1].dim.area.width = width >> 1; blocks[1].dim.area.height = height >> 1; blocks[1].stride = def_stride(width); @@ -697,7 +697,7 @@ void *map_1D(void *dataPtr, bytes_t length, bytes_t stride, uint16_t val) MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = PIXEL_FMT_PAGE; + block.fmt = PIXEL_FMT_PAGE; block.dim.len = length; block.stride = stride; block.ptr = dataPtr; @@ -710,10 +710,10 @@ void *map_1D(void *dataPtr, bytes_t length, bytes_t stride, uint16_t val) NOT_I(MemMgr_Is1DBlock(bufPtr),!=,0) || NOT_I(MemMgr_Is2DBlock(bufPtr),==,0) || NOT_I(MemMgr_GetStride(bufPtr),==,block.stride) || - NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.reserved) || + NOT_P(TilerMem_VirtToPhys(bufPtr),==,block.ssptr) || NOT_I(TilerMem_GetStride(TilerMem_VirtToPhys(bufPtr)),==,PAGE_SIZE) || NOT_L((PAGE_SIZE - 1) & (long)bufPtr,==,0) || - NOT_L((PAGE_SIZE - 1) & block.reserved,==,0)) + NOT_L((PAGE_SIZE - 1) & block.ssptr,==,0)) { MemMgr_UnMap(bufPtr); return NULL; @@ -747,7 +747,7 @@ int unmap_1D(void *dataPtr, bytes_t length, bytes_t stride, uint16_t val, void * MemAllocBlock block; memset(&block, 0, sizeof(block)); - block.pixelFormat = PIXEL_FMT_PAGE; + block.fmt = PIXEL_FMT_PAGE; block.dim.len = length; block.stride = stride; block.ptr = dataPtr; @@ -1205,30 +1205,30 @@ int star_test(uint32_t num_ops, uint16_t num_slots) switch (mem[ix].op) { case 0: case 1: - blk.pixelFormat = PIXEL_FMT_PAGE; + blk.fmt = PIXEL_FMT_PAGE; blk.dim.len = mem[ix].length; break; case 5: - blk.pixelFormat = PIXEL_FMT_16BIT; + blk.fmt = PIXEL_FMT_16BIT; blk.dim.area.width = mem[ix].width >> 1; blk.dim.area.height = mem[ix].height >> 1; blk.stride = def_stride(mem[ix].width); /* same for Y and UV */ blk.ptr = mem[ix].bufPtr + mem[ix].height * blk.stride; check_mem(mem[ix].val, &blk); case 2: - blk.pixelFormat = PIXEL_FMT_8BIT; + blk.fmt = PIXEL_FMT_8BIT; blk.dim.area.width = mem[ix].width; blk.dim.area.height = mem[ix].height; blk.stride = def_stride(mem[ix].width); break; case 3: - blk.pixelFormat = PIXEL_FMT_16BIT; + blk.fmt = PIXEL_FMT_16BIT; blk.dim.area.width = mem[ix].width; blk.dim.area.height = mem[ix].height; blk.stride = def_stride(mem[ix].width * 2); break; case 4: - blk.pixelFormat = PIXEL_FMT_32BIT; + blk.fmt = PIXEL_FMT_32BIT; blk.dim.area.width = mem[ix].width; blk.dim.area.height = mem[ix].height; blk.stride = def_stride(mem[ix].width * 4); @@ -1406,14 +1406,14 @@ int neg_alloc_tests() blk = block + num_blocks - 1; P("/* bad pixel format */"); - blk->pixelFormat = PIXEL_FMT_MIN - 1; + blk->fmt = -1; blk->dim.len = PAGE_SIZE; ret |= NEGA(MemMgr_Alloc(block, num_blocks)); - blk->pixelFormat = PIXEL_FMT_MAX + 1; + blk->fmt = PIXEL_FMT_MAX + 1; ret |= NEGA(MemMgr_Alloc(block, num_blocks)); P("/* bad 1D stride */"); - blk->pixelFormat = PIXEL_FMT_PAGE; + blk->fmt = PIXEL_FMT_PAGE; blk->stride = PAGE_SIZE - 1; ret |= NEGA(MemMgr_Alloc(block, num_blocks)); @@ -1422,7 +1422,7 @@ int neg_alloc_tests() ret |= NEGA(MemMgr_Alloc(block, num_blocks)); P("/* bad 2D stride */"); - blk->pixelFormat = PIXEL_FMT_8BIT; + blk->fmt = PIXEL_FMT_8BIT; blk->dim.area.width = PAGE_SIZE - 1; blk->stride = PAGE_SIZE - 1; blk->dim.area.height = 16; @@ -1441,7 +1441,7 @@ int neg_alloc_tests() blk->dim.area.height = 16; } - block[0].pixelFormat = block[1].pixelFormat = PIXEL_FMT_8BIT; + block[0].fmt = block[1].fmt = PIXEL_FMT_8BIT; block[0].dim.area.width = 16384; block[0].dim.area.height = block[1].dim.area.width = 16; block[1].dim.area.height = 8192; @@ -1509,14 +1509,14 @@ int neg_map_tests() blk = block + num_blocks - 1; P("/* bad pixel format */"); - blk->pixelFormat = PIXEL_FMT_MIN - 1; + blk->fmt = -1; blk->dim.len = PAGE_SIZE; ret |= NEGM(MemMgr_Map(block, num_blocks)); - blk->pixelFormat = PIXEL_FMT_MAX + 1; + blk->fmt = PIXEL_FMT_MAX + 1; ret |= NEGM(MemMgr_Map(block, num_blocks)); P("/* bad 1D stride */"); - blk->pixelFormat = PIXEL_FMT_PAGE; + blk->fmt = PIXEL_FMT_PAGE; blk->stride = PAGE_SIZE - 1; ret |= NEGM(MemMgr_Map(block, num_blocks)); @@ -1525,7 +1525,7 @@ int neg_map_tests() ret |= NEGM(MemMgr_Map(block, num_blocks)); P("/* bad 2D stride */"); - blk->pixelFormat = PIXEL_FMT_8BIT; + blk->fmt = PIXEL_FMT_8BIT; blk->dim.area.width = PAGE_SIZE - 1; blk->stride = PAGE_SIZE - 1; blk->dim.area.height = 16; @@ -1551,7 +1551,7 @@ int neg_map_tests() ret |= NEGM(MemMgr_Map(block, 1)); P("/* 1 1D buffer with no address */"); - block[0].pixelFormat = PIXEL_FMT_PAGE; + block[0].fmt = PIXEL_FMT_PAGE; block[0].dim.len = 2 * PAGE_SIZE; block[0].ptr = NULL; ret |= NEGM(MemMgr_Map(block, 1)); diff --git a/tiler/tilermgr.c b/tiler/tilermgr.c index 470de5c..f946095 100644 --- a/tiler/tilermgr.c +++ b/tiler/tilermgr.c @@ -70,7 +70,7 @@ int TilerMgr_Open() return TILERMGR_ERR_NONE; } -SSPtr TilerMgr_Alloc(enum pixel_fmt_t pixfmt, pixels_t width, pixels_t height) +SSPtr TilerMgr_Alloc(pixel_fmt_t pixfmt, pixels_t width, pixels_t height) { int ret = -1; struct tiler_block_info block = {0}; diff --git a/tiler/tilermgr.h b/tiler/tilermgr.h index cd76822..4530eb0 100644 --- a/tiler/tilermgr.h +++ b/tiler/tilermgr.h @@ -43,7 +43,7 @@ int TilerMgr_Open(); int TilerMgr_Close(); -SSPtr TilerMgr_Alloc(enum pixel_fmt_t pixfmt, pixels_t width, pixels_t height); +SSPtr TilerMgr_Alloc(pixel_fmt_t pixfmt, pixels_t width, pixels_t height); int TilerMgr_Free(SSPtr ssptr); SSPtr TilerMgr_PageModeAlloc(bytes_t length); int TilerMgr_PageModeFree(SSPtr ssptr); |