Merge "video: driver: implement memory_ops for upstream"
Este commit está contenido en:

cometido por
Gerrit - the friendly Code Review server

commit
4f297753f7
@@ -37,8 +37,7 @@ struct msm_vidc_mem_addr {
|
||||
u32 align_device_addr;
|
||||
u8 *align_virtual_addr;
|
||||
u32 mem_size;
|
||||
struct msm_vidc_map map;
|
||||
struct msm_vidc_alloc alloc;
|
||||
struct msm_vidc_mem mem;
|
||||
};
|
||||
|
||||
struct msm_vidc_iface_q_info {
|
||||
|
@@ -463,9 +463,7 @@ int msm_vidc_vb2_queue_deinit(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_get_control(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl);
|
||||
struct msm_vidc_buffers *msm_vidc_get_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type, const char *func);
|
||||
struct msm_vidc_mappings *msm_vidc_get_mappings(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type, const char *func);
|
||||
struct msm_vidc_allocations *msm_vidc_get_allocations(
|
||||
struct msm_vidc_mem_list *msm_vidc_get_mem_info(
|
||||
struct msm_vidc_inst *inst, enum msm_vidc_buffer_type buffer_type,
|
||||
const char *func);
|
||||
struct msm_vidc_buffer *msm_vidc_get_driver_buf(struct msm_vidc_inst *inst,
|
||||
|
@@ -39,28 +39,16 @@ struct msm_vidc_session_ops {
|
||||
int (*extra_count)(struct msm_vidc_inst *inst, enum msm_vidc_buffer_type type);
|
||||
};
|
||||
|
||||
struct msm_vidc_allocations_info {
|
||||
struct msm_vidc_allocations bin;
|
||||
struct msm_vidc_allocations arp;
|
||||
struct msm_vidc_allocations comv;
|
||||
struct msm_vidc_allocations non_comv;
|
||||
struct msm_vidc_allocations line;
|
||||
struct msm_vidc_allocations dpb;
|
||||
struct msm_vidc_allocations persist;
|
||||
struct msm_vidc_allocations vpss;
|
||||
struct msm_vidc_allocations partial_data;
|
||||
};
|
||||
|
||||
struct msm_vidc_mappings_info {
|
||||
struct msm_vidc_mappings bin;
|
||||
struct msm_vidc_mappings arp;
|
||||
struct msm_vidc_mappings comv;
|
||||
struct msm_vidc_mappings non_comv;
|
||||
struct msm_vidc_mappings line;
|
||||
struct msm_vidc_mappings dpb;
|
||||
struct msm_vidc_mappings persist;
|
||||
struct msm_vidc_mappings vpss;
|
||||
struct msm_vidc_mappings partial_data;
|
||||
struct msm_vidc_mem_list_info {
|
||||
struct msm_vidc_mem_list bin;
|
||||
struct msm_vidc_mem_list arp;
|
||||
struct msm_vidc_mem_list comv;
|
||||
struct msm_vidc_mem_list non_comv;
|
||||
struct msm_vidc_mem_list line;
|
||||
struct msm_vidc_mem_list dpb;
|
||||
struct msm_vidc_mem_list persist;
|
||||
struct msm_vidc_mem_list vpss;
|
||||
struct msm_vidc_mem_list partial_data;
|
||||
};
|
||||
|
||||
struct msm_vidc_buffers_info {
|
||||
@@ -136,8 +124,7 @@ struct msm_vidc_inst {
|
||||
struct vidc_bus_vote_data bus_data;
|
||||
struct msm_memory_pool pool[MSM_MEM_POOL_MAX];
|
||||
struct msm_vidc_buffers_info buffers;
|
||||
struct msm_vidc_mappings_info mappings;
|
||||
struct msm_vidc_allocations_info allocations;
|
||||
struct msm_vidc_mem_list_info mem_info;
|
||||
struct msm_vidc_timestamps timestamps;
|
||||
struct msm_vidc_timestamps ts_reorder; /* list of struct msm_vidc_timestamp */
|
||||
bool subscribed_input_psc;
|
||||
|
@@ -847,7 +847,7 @@ struct msm_vidc_fence {
|
||||
int fd;
|
||||
};
|
||||
|
||||
struct msm_vidc_alloc {
|
||||
struct msm_vidc_mem {
|
||||
struct list_head list;
|
||||
enum msm_vidc_buffer_type type;
|
||||
enum msm_vidc_buffer_region region;
|
||||
@@ -865,25 +865,15 @@ struct msm_vidc_alloc {
|
||||
struct dma_buf_map dmabuf_map;
|
||||
#endif
|
||||
void *kvaddr;
|
||||
};
|
||||
|
||||
struct msm_vidc_allocations {
|
||||
struct list_head list; // list of "struct msm_vidc_alloc"
|
||||
};
|
||||
|
||||
struct msm_vidc_map {
|
||||
struct list_head list;
|
||||
enum msm_vidc_buffer_type type;
|
||||
enum msm_vidc_buffer_region region;
|
||||
struct dma_buf *dmabuf;
|
||||
dma_addr_t device_addr;
|
||||
unsigned long attrs;
|
||||
u32 refcount;
|
||||
u64 device_addr;
|
||||
struct sg_table *table;
|
||||
struct dma_buf_attachment *attach;
|
||||
};
|
||||
|
||||
struct msm_vidc_mappings {
|
||||
struct list_head list; // list of "struct msm_vidc_map"
|
||||
struct msm_vidc_mem_list {
|
||||
struct list_head list; // list of "struct msm_vidc_mem"
|
||||
};
|
||||
|
||||
struct msm_vidc_buffer {
|
||||
|
@@ -21,8 +21,7 @@ struct msm_memory_dmabuf {
|
||||
|
||||
enum msm_memory_pool_type {
|
||||
MSM_MEM_POOL_BUFFER = 0,
|
||||
MSM_MEM_POOL_MAP,
|
||||
MSM_MEM_POOL_ALLOC,
|
||||
MSM_MEM_POOL_ALLOC_MAP,
|
||||
MSM_MEM_POOL_TIMESTAMP,
|
||||
MSM_MEM_POOL_DMABUF,
|
||||
MSM_MEM_POOL_PACKET,
|
||||
@@ -72,14 +71,10 @@ struct msm_vidc_memory_ops {
|
||||
struct dma_buf_attachment *attach);
|
||||
int (*dma_buf_unmap_attachment)(struct msm_vidc_core *core,
|
||||
struct dma_buf_attachment *attach, struct sg_table *table);
|
||||
int (*memory_map)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_map *map);
|
||||
int (*memory_unmap)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_map *map);
|
||||
int (*memory_alloc)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_alloc *alloc);
|
||||
int (*memory_free)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_alloc *alloc);
|
||||
int (*memory_alloc_map)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*memory_unmap_free)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
u32 (*buffer_region)(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
};
|
||||
|
Referencia en una nueva incidencia
Block a user