video: driver: add memory ops support
add memory ops support so that different implementations can exist for memory_alloc, memory_free, memory_map and memory_unmap, dma buf attach, detach, map, unmap and get buffer region in upstream and downstream drivers. Change-Id: Ifabc34e7a8b0284579c1bc4a8f477fe558d068f4 Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

szülő
02ed467c8a
commit
4250372925
@@ -955,17 +955,4 @@ struct msm_vidc_sfr {
|
||||
u8 rg_data[1];
|
||||
};
|
||||
|
||||
#define call_mem_op(c, op, ...) \
|
||||
(((c) && (c)->mem_ops && (c)->mem_ops->op) ? \
|
||||
((c)->mem_ops->op(__VA_ARGS__)) : 0)
|
||||
|
||||
struct msm_vidc_memory_ops {
|
||||
int (*allocate)(void *inst, struct msm_vidc_buffer *mbuf);
|
||||
int (*dma_map)(void *inst, struct msm_vidc_buffer *mbuf);
|
||||
int (*dma_unmap)(void *inst, struct msm_vidc_buffer *mbuf);
|
||||
int (*free)(void *inst, struct msm_vidc_buffer *mbuf);
|
||||
int (*cache_op)(void *inst, struct msm_vidc_buffer *mbuf,
|
||||
enum msm_vidc_cache_op cache_op);
|
||||
};
|
||||
|
||||
#endif // _MSM_VIDC_INTERNAL_H_
|
||||
|
Reference in New Issue
Block a user