diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:39 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:39 +0100 |
commit | 2759f0c1063c83d0096b010cc3f4750d429f5a62 (patch) | |
tree | 9658008bad2952827b78796c44594e038bb64376 /drivers/media/video/tiler | |
parent | eebe0bed12f0dfa35fc50ec8fa6da0e7184cdf69 (diff) |
TILER: Expose physical alignment after MBLK or GBLK.
This patch sets the offset and alignment members of the
tiler_block_info struct after successful GBLK or MBLK ioctls.
This is required to be able to continuosly map multiple blocks
if ssptr is not exposed to user space.
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 | 4 | ||||
-rw-r--r-- | drivers/media/video/tiler/tiler-main.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/tiler/tiler-iface.c b/drivers/media/video/tiler/tiler-iface.c index c505c278be9..6f9574015c1 100644 --- a/drivers/media/video/tiler/tiler-iface.c +++ b/drivers/media/video/tiler/tiler-iface.c @@ -325,6 +325,8 @@ static s32 tiler_ioctl(struct inode *ip, struct file *filp, u32 cmd, if (mi) { block_info.id = mi->blk.id; block_info.stride = tiler_vstride(&mi->blk); + block_info.offs = mi->blk.phys & ~PAGE_MASK; + block_info.align = PAGE_SIZE; #ifdef CONFIG_TILER_EXPOSE_SSPTR block_info.ssptr = mi->blk.phys; #endif @@ -386,6 +388,8 @@ static s32 tiler_ioctl(struct inode *ip, struct file *filp, u32 cmd, if (mi) { block_info.id = mi->blk.id; block_info.stride = tiler_vstride(&mi->blk); + block_info.offs = mi->blk.phys & ~PAGE_MASK; + block_info.align = PAGE_SIZE; #ifdef CONFIG_TILER_EXPOSE_SSPTR block_info.ssptr = mi->blk.phys; #endif diff --git a/drivers/media/video/tiler/tiler-main.c b/drivers/media/video/tiler/tiler-main.c index a9ac6db00da..d3cba6a0014 100644 --- a/drivers/media/video/tiler/tiler-main.c +++ b/drivers/media/video/tiler/tiler-main.c @@ -825,7 +825,7 @@ static void fill_block_info(struct mem_info *i, struct tiler_block_info *blk) blk->id = i->blk.id; blk->key = i->blk.key; blk->offs = i->blk.phys & ~PAGE_MASK; - blk->align = 0; + blk->align = PAGE_SIZE; } /* |