aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLajos Molnar <molnar@ti.com>2011-12-16 14:10:28 +0800
committerAndy Green <andy.green@linaro.org>2011-12-26 22:33:02 +0800
commite5753e9e86852ebf88e5a2f33ace5fd01b53d810 (patch)
tree32420e55175dcb6249f769c86581dee77319fbfa /arch
parentcc11ea9843b7ceb4af53b067ed864be1eb00dcdb (diff)
TILER: Added key-id enforcement.
TILER block lookup is now based on key & id. However, it is still possible to look up a block's key & id based on its system space address. Signed-off-by: Lajos Molnar <molnar@ti.com> TILER: Added address space support for mmap. Now each TILER buffer occupies a range of the correct size in TILER's mmap memory space (offset + size). Signed-off-by: Lajos Molnar <molnar@ti.com> TILER: Added support for partial mmaping of TILER buffers Added support for mmapping only a portion of a TILER buffer. Also added helper functions that can be used by other drivers that use TILER to mmap and ioremap portions of TILER blocks. Signed-off-by: Lajos Molnar <molnar@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/include/mach/tiler.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/include/mach/tiler.h b/arch/arm/mach-omap2/include/mach/tiler.h
index 6f0757b9b24..be29f3ce3e2 100644
--- a/arch/arm/mach-omap2/include/mach/tiler.h
+++ b/arch/arm/mach-omap2/include/mach/tiler.h
@@ -26,6 +26,8 @@
#define TILER_MAX_NUM_BLOCKS 16
+#include <linux/mm.h>
+
#define TILIOC_GBLK _IOWR('z', 100, struct tiler_block_info)
#define TILIOC_FBLK _IOW('z', 101, struct tiler_block_info)
#define TILIOC_GSSP _IOWR('z', 102, u32)
@@ -125,6 +127,36 @@ s32 tiler_allocx(struct tiler_block_t *blk, enum tiler_fmt fmt, u32 align,
u32 offs, u32 gid, pid_t pid);
/**
+ * Mmaps a portion of a tiler block to a virtual address. Use this method in
+ * your driver's mmap function to potentially combine multiple tiler blocks as
+ * one virtual buffer.
+ *
+ * @param blk pointer to tiler block data
+ * @param offs offset from where to map (must be page aligned)
+ * @param size size of area to map (must be page aligned)
+ * @param addr virtual address
+ *
+ * @return error status
+ */
+s32 tiler_mmap_blk(struct tiler_block_t *blk, u32 offs, u32 size,
+ struct vm_area_struct *vma, u32 voffs);
+
+/**
+ * Ioremaps a portion of a tiler block. Use this method in your driver instead
+ * of ioremap to potentially combine multiple tiler blocks as one virtual
+ * buffer.
+ *
+ * @param blk pointer to tiler block data
+ * @param offs offset from where to map (must be page aligned)
+ * @param size size of area to map (must be page aligned)
+ * @param addr virtual address
+ *
+ * @return error status
+ */
+s32 tiler_ioremap_blk(struct tiler_block_t *blk, u32 offs, u32 size, u32 addr,
+ u32 mtype);
+
+/**
* Maps an existing buffer to a 1D or 2D TILER area for the
* current process with group ID 0.
*