diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:46 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:46 +0100 |
commit | 6a791ca4bf9eb6c9df7a566b1c715302c1cc4923 (patch) | |
tree | 7185a36038bc8141f1f04f2bb004d9a44053759a /drivers/media/video/tiler | |
parent | f9895d1b0a7912ba5080534aca79cb919246a2bb (diff) |
TILER: Fixed id & physical address handing of tiler_alloc/free.
id is now populated by tiler_alloc/map. This is needed for
tiler_free to work.
id and physical address is cleared on tiler_free. This is needed
for tiler_alloc to work if called using the same tiler_block_t
structure.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Diffstat (limited to 'drivers/media/video/tiler')
-rw-r--r-- | drivers/media/video/tiler/tiler-iface.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/tiler/tiler-iface.c b/drivers/media/video/tiler/tiler-iface.c index 55ae1d6c2ba..ff653628a28 100644 --- a/drivers/media/video/tiler/tiler-iface.c +++ b/drivers/media/video/tiler/tiler-iface.c @@ -662,8 +662,10 @@ s32 tiler_allocx(struct tiler_block_t *blk, enum tiler_fmt fmt, res = ops->alloc(fmt, blk->width, blk->height, align, offs, blk->key, gid, pi, &mi); - if (mi) + if (mi) { blk->phys = mi->blk.phys; + blk->id = mi->blk.id; + } return res; } EXPORT_SYMBOL(tiler_allocx); @@ -691,8 +693,10 @@ s32 tiler_mapx(struct tiler_block_t *blk, enum tiler_fmt fmt, u32 gid, res = ops->map(fmt, blk->width, blk->height, blk->key, gid, pi, &mi, usr_addr); - if (mi) + if (mi) { blk->phys = mi->blk.phys; + blk->id = mi->blk.id; + } return res; } @@ -791,5 +795,6 @@ void tiler_free(struct tiler_block_t *blk) struct mem_info *mi = ops->lock(blk->key, blk->id, NULL); if (mi) ops->unlock_free(mi, true); + blk->phys = blk->id = 0; } EXPORT_SYMBOL(tiler_free); |