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 | 8dacacbfbb26713b180161f96cf4b8393e457c57 (patch) | |
tree | b2838403c3fcd80ea77f3c0bfc6f9d98b298dc0d /drivers/media/video/tiler | |
parent | 2759f0c1063c83d0096b010cc3f4750d429f5a62 (diff) |
TILER: Fix 1D in-page offset support and QBLK kernel panic.
Added missing brackets for handling failing QBLK ioctl.
Added 1D in-page offset.
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 | 5 | ||||
-rw-r--r-- | drivers/media/video/tiler/tiler-main.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/tiler/tiler-iface.c b/drivers/media/video/tiler/tiler-iface.c index 6f9574015c1..79514e3c20c 100644 --- a/drivers/media/video/tiler/tiler-iface.c +++ b/drivers/media/video/tiler/tiler-iface.c @@ -524,9 +524,10 @@ static s32 tiler_ioctl(struct inode *ip, struct file *filp, u32 cmd, #endif return -EPERM; - if (mi) + if (mi) { ops->describe(mi, &block_info); - ops->unlock_free(mi, false); + ops->unlock_free(mi, false); + } if (!mi) return -EFAULT; diff --git a/drivers/media/video/tiler/tiler-main.c b/drivers/media/video/tiler/tiler-main.c index d3cba6a0014..ff05e2d356c 100644 --- a/drivers/media/video/tiler/tiler-main.c +++ b/drivers/media/video/tiler/tiler-main.c @@ -285,7 +285,8 @@ static s32 __analize_area(enum tiler_fmt fmt, u32 width, u32 height, if (fmt == TILFMT_PAGE) { /* adjust size to accomodate offset, only do page alignment */ *align = PAGE_SIZE; - width += *offs & (PAGE_SIZE - 1); + *in_offs = *offs & ~PAGE_MASK; + width += *in_offs; /* for 1D area keep the height (1), width is in tiler slots */ *x_area = DIV_ROUND_UP(width, tiler.page); |