diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:42 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:42 +0100 |
commit | 966f30624562482b1660ab4242d8e106ce23e194 (patch) | |
tree | bbbc5162ae2e5f5d161e6f07edf97cbcac60b363 /drivers/media/video/tiler | |
parent | 33cccd7849331dcf927120cd3de1ea34e185bfb6 (diff) |
TILER: Added tilview_create to create views from a pointer.
This circumvents the idea of tilview, but is needed and omap_vout
and dss2 cannot currently share a tilview object. Once 2D areas
areas are integrated into dss2, this method can be removed.
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-geom.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/tiler/tiler-geom.c b/drivers/media/video/tiler/tiler-geom.c index ca9dd735e16..a988a635c0c 100644 --- a/drivers/media/video/tiler/tiler-geom.c +++ b/drivers/media/video/tiler/tiler-geom.c @@ -186,6 +186,19 @@ static u32 tiler_get_address(u32 orient, enum tiler_fmt fmt, u32 x, u32 y) return TIL_ADDR((tmp << alignment), orient, fmt); } +void tilview_create(struct tiler_view_t *view, u32 phys, u32 width, u32 height) +{ + BUG_ON(!is_tiler_addr(phys)); + + view->tsptr = phys & ~MASK_VIEW; + view->bpp = geom[TILER_FMT(phys)].bpp_m; + view->width = width; + view->height = height; + view->h_inc = view->bpp; + view->v_inc = tiler_stride(view->tsptr); +} +EXPORT_SYMBOL(tilview_create); + void tilview_get(struct tiler_view_t *view, struct tiler_block_t *blk) { view->tsptr = blk->phys & ~MASK_VIEW; |