From 1ed6bfdc0327fc89baa96f6236200da7799b8010 Mon Sep 17 00:00:00 2001 From: Fredrik Allansson Date: Mon, 20 Sep 2010 09:42:33 +0200 Subject: b2r2lib: Support for hwmem buffers The B2R2 library has been updated to support hwmem buffers. ST-Ericsson ID: WP269630 Change-Id: I8e96dac7dddf9b0cd0bac6226052ed3646e940c6 Signed-off-by: Fredrik Allansson Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5196 Reviewed-by: Robert FEKETE Tested-by: Robert FEKETE Reviewed-by: Robert LIND --- include/blt_api.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/blt_api.h b/include/blt_api.h index 1b0c1d0..0633e04 100755 --- a/include/blt_api.h +++ b/include/blt_api.h @@ -226,13 +226,13 @@ enum blt_ptr_type { */ BLT_PTR_PHYSICAL, /** - * @brief Use fd and offset to determine the userspace virtual address. + * @brief Use fd and offset to determine buffer location. */ BLT_PTR_FD_OFFSET, /** - * @brief GEM address + * @brief Use hwmem_buf_name and offset to determine buffer location. */ - BLT_PTR_GEM, + BLT_PTR_HWMEM_BUF_NAME_OFFSET, }; /** @@ -243,13 +243,19 @@ struct blt_buf { * @brief Pointer type */ enum blt_ptr_type type; + /** + * @brief Hwmem buffer name. + */ + int32_t hwmem_buf_name; /** * @brief File descriptor (e.g. file handle to a pmem device) */ int32_t fd; /** - * @brief Offset in file. If 'type' is set to BLT_PTR_VIRTUAL, - * then the offset is interpreted as plain userspace virtual address + * @brief Offset where buffer can be found. When used in + * conjunction with a hwmem buffer the offset must be a multiple + * of the image size. If 'type' is set to BLT_PTR_VIRTUAL or + * BLT_PTR_PHYSICAL, then the offset is interpreted as an address. */ uint32_t offset; /** @@ -259,8 +265,8 @@ struct blt_buf { /** * @brief Pointer to the bitmap data. This field can be used to specify * an alternative way to access the buffer. Whenever the 'bits' pointer - * is set to non-NULL, the underlying implementation - * is free to decide whether or not to use it in favor of 'fd' and/or 'offset'. + * is set to non-NULL, the underlying implementation is free to decide + * whether or not to use it in favor of other ways to locate the buffer. */ void *bits; }; -- cgit v1.2.3