mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
mem-buf: Add accessor for mem_buf_desc sgl list
Allow clients to see what IPA address a mem_buf object is mapped to. Change-Id: Ib3d47cb78bf7b1b217950e1e59b8d542abb3a331 Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
This commit is contained in:
parent
2ac7e03c0b
commit
8145bbae35
|
|
@ -1145,6 +1145,14 @@ static int get_mem_buf(void *membuf_desc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct gh_sgl_desc *mem_buf_get_sgl(void *__membuf)
|
||||
{
|
||||
struct mem_buf_desc *membuf = __membuf;
|
||||
|
||||
return membuf->sgl_desc;
|
||||
}
|
||||
EXPORT_SYMBOL(mem_buf_get_sgl);
|
||||
|
||||
static void mem_buf_retrieve_release(struct qcom_sg_buffer *buffer)
|
||||
{
|
||||
sg_free_table(&buffer->sg_table);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ void mem_buf_put(void *membuf_desc);
|
|||
|
||||
void *mem_buf_get(int fd);
|
||||
|
||||
struct gh_sgl_desc *mem_buf_get_sgl(void *membuf);
|
||||
#else
|
||||
|
||||
static inline int mem_buf_get_fd(void *membuf_desc)
|
||||
|
|
@ -120,5 +121,9 @@ static inline void *mem_buf_get(int fd)
|
|||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static inline struct gh_sgl_desc *mem_buf_get_sgl(void *membuf)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#endif /* CONFIG_QCOM_MEM_BUF */
|
||||
#endif /* _MEM_BUF_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user