Merge "Video: driver: Fix warnings for vendor checker"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
1b17415743
@@ -13,7 +13,6 @@
|
||||
|
||||
#define HFI_VIDEO_ARCH_LX 0x1
|
||||
|
||||
|
||||
struct hfi_header {
|
||||
u32 size;
|
||||
u32 session_id;
|
||||
|
@@ -20,20 +20,24 @@ u32 get_hfi_port_from_buffer_type(struct msm_vidc_inst *inst,
|
||||
u32 hfi_buf_type_from_driver(enum msm_vidc_domain_type domain,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
u32 hfi_buf_type_to_driver(enum msm_vidc_domain_type domain,
|
||||
enum hfi_buffer_type buffer_type, enum hfi_packet_port_type port_type);
|
||||
enum hfi_buffer_type buffer_type,
|
||||
enum hfi_packet_port_type port_type);
|
||||
u32 get_hfi_codec(struct msm_vidc_inst *inst);
|
||||
u32 get_hfi_colorformat(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_colorformat_type colorformat);
|
||||
int get_hfi_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer, struct hfi_buffer *buf);
|
||||
struct msm_vidc_buffer *buffer,
|
||||
struct hfi_buffer *buf);
|
||||
int hfi_create_header(u8 *packet, u32 packet_size,
|
||||
u32 session_id, u32 header_id);
|
||||
int hfi_create_packet(u8 *packet, u32 packet_size,
|
||||
u32 pkt_type, u32 pkt_flags, u32 payload_type, u32 port,
|
||||
u32 packet_id, void *payload, u32 payload_size);
|
||||
u32 pkt_type, u32 pkt_flags,
|
||||
u32 payload_type, u32 port,
|
||||
u32 packet_id, void *payload,
|
||||
u32 payload_size);
|
||||
int hfi_create_buffer(u8 *packet, u32 packet_size, u32 *offset,
|
||||
enum msm_vidc_domain_type domain, struct msm_vidc_buffer *data);
|
||||
|
||||
enum msm_vidc_domain_type domain,
|
||||
struct msm_vidc_buffer *data);
|
||||
int hfi_packet_sys_init(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size);
|
||||
int hfi_packet_image_version(struct msm_vidc_core *core,
|
||||
@@ -41,11 +45,15 @@ int hfi_packet_image_version(struct msm_vidc_core *core,
|
||||
int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size);
|
||||
int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size, u32 debug_config);
|
||||
u8 *pkt, u32 pkt_size,
|
||||
u32 debug_config);
|
||||
int hfi_packet_session_command(struct msm_vidc_inst *inst,
|
||||
u32 pkt_type, u32 flags, u32 port, u32 session_id,
|
||||
u32 payload_type, void *payload, u32 payload_size);
|
||||
u32 pkt_type, u32 flags,
|
||||
u32 port, u32 session_id,
|
||||
u32 payload_type, void *payload,
|
||||
u32 payload_size);
|
||||
int hfi_packet_sys_intraframe_powercollapse(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size, u32 enable);
|
||||
u8 *pkt, u32 pkt_size,
|
||||
u32 enable);
|
||||
|
||||
#endif // _HFI_PACKET_H_
|
||||
|
@@ -343,8 +343,8 @@ invalid_input:
|
||||
* Progressive: height
|
||||
* Interlaced: (height+1)>>1
|
||||
*/
|
||||
static inline unsigned int video_uv_meta_scanlines(
|
||||
unsigned int colorformat, unsigned int height)
|
||||
static inline unsigned int video_uv_meta_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
{
|
||||
int uv_tile_height = 0, uv_meta_scanlines = 0;
|
||||
|
||||
@@ -369,8 +369,8 @@ invalid_input:
|
||||
return uv_meta_scanlines;
|
||||
}
|
||||
|
||||
static inline unsigned int video_rgb_stride_bytes(
|
||||
unsigned int colorformat, unsigned int width)
|
||||
static inline unsigned int video_rgb_stride_bytes(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int alignment = 0, stride = 0, bpp = 4;
|
||||
|
||||
@@ -425,8 +425,8 @@ invalid_input:
|
||||
return scanlines;
|
||||
}
|
||||
|
||||
static inline unsigned int video_rgb_meta_stride(
|
||||
unsigned int colorformat, unsigned int width)
|
||||
static inline unsigned int video_rgb_meta_stride(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
{
|
||||
int rgb_tile_width = 0, rgb_meta_stride = 0;
|
||||
|
||||
@@ -449,8 +449,8 @@ invalid_input:
|
||||
return rgb_meta_stride;
|
||||
}
|
||||
|
||||
static inline unsigned int video_rgb_meta_scanlines(
|
||||
unsigned int colorformat, unsigned int height)
|
||||
static inline unsigned int video_rgb_meta_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
{
|
||||
int rgb_tile_height = 0, rgb_meta_scanlines = 0;
|
||||
|
||||
@@ -474,7 +474,9 @@ invalid_input:
|
||||
}
|
||||
|
||||
static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
unsigned int pix_width, unsigned int pix_height, unsigned int interlace)
|
||||
unsigned int pix_width,
|
||||
unsigned int pix_height,
|
||||
unsigned int interlace)
|
||||
{
|
||||
unsigned int size = 0;
|
||||
unsigned int y_plane, uv_plane, y_stride,
|
||||
@@ -513,12 +515,13 @@ static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096);
|
||||
y_meta_scanlines =
|
||||
video_y_meta_scanlines(colorformat, pix_height);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(
|
||||
y_meta_stride * y_meta_scanlines, 4096);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(y_meta_stride *
|
||||
y_meta_scanlines, 4096);
|
||||
uv_meta_scanlines =
|
||||
video_uv_meta_scanlines(colorformat, pix_height);
|
||||
uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride *
|
||||
uv_meta_scanlines, 4096);
|
||||
uv_meta_scanlines,
|
||||
4096);
|
||||
size = (y_ubwc_plane + uv_ubwc_plane + y_meta_plane +
|
||||
uv_meta_plane);
|
||||
} else {
|
||||
@@ -535,12 +538,14 @@ static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096);
|
||||
y_meta_scanlines =
|
||||
video_y_meta_scanlines(colorformat, (pix_height + 1) >> 1);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(
|
||||
y_meta_stride * y_meta_scanlines, 4096);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(y_meta_stride *
|
||||
y_meta_scanlines,
|
||||
4096);
|
||||
uv_meta_scanlines =
|
||||
video_uv_meta_scanlines(colorformat, (pix_height + 1) >> 1);
|
||||
uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride *
|
||||
uv_meta_scanlines, 4096);
|
||||
uv_meta_scanlines,
|
||||
4096);
|
||||
size = (y_ubwc_plane + uv_ubwc_plane + y_meta_plane +
|
||||
uv_meta_plane)*2;
|
||||
} else {
|
||||
@@ -552,12 +557,14 @@ static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096);
|
||||
y_meta_scanlines =
|
||||
video_y_meta_scanlines(colorformat, pix_height);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(
|
||||
y_meta_stride * y_meta_scanlines, 4096);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(y_meta_stride *
|
||||
y_meta_scanlines,
|
||||
4096);
|
||||
uv_meta_scanlines =
|
||||
video_uv_meta_scanlines(colorformat, pix_height);
|
||||
uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride *
|
||||
uv_meta_scanlines, 4096);
|
||||
uv_meta_scanlines,
|
||||
4096);
|
||||
size = (y_ubwc_plane + uv_ubwc_plane + y_meta_plane +
|
||||
uv_meta_plane);
|
||||
}
|
||||
@@ -568,12 +575,13 @@ static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096);
|
||||
y_meta_stride = video_y_meta_stride(colorformat, pix_width);
|
||||
y_meta_scanlines = video_y_meta_scanlines(colorformat, pix_height);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(
|
||||
y_meta_stride * y_meta_scanlines, 4096);
|
||||
y_meta_plane = MSM_MEDIA_ALIGN(y_meta_stride *
|
||||
y_meta_scanlines, 4096);
|
||||
uv_meta_stride = video_uv_meta_stride(colorformat, pix_width);
|
||||
uv_meta_scanlines = video_uv_meta_scanlines(colorformat, pix_height);
|
||||
uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride *
|
||||
uv_meta_scanlines, 4096);
|
||||
uv_meta_scanlines,
|
||||
4096);
|
||||
|
||||
size = y_ubwc_plane + uv_ubwc_plane + y_meta_plane +
|
||||
uv_meta_plane;
|
||||
|
@@ -21,6 +21,6 @@ int msm_vidc_set_v4l2_properties(struct msm_vidc_inst *inst);
|
||||
bool is_valid_cap_id(enum msm_vidc_inst_capability_type cap_id);
|
||||
bool is_valid_cap(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_inst_capability_type cap_id);
|
||||
enum msm_vidc_inst_capability_type msm_vidc_get_cap_id(
|
||||
struct msm_vidc_inst *inst, u32 id);
|
||||
enum msm_vidc_inst_capability_type
|
||||
msm_vidc_get_cap_id(struct msm_vidc_inst *inst, u32 id);
|
||||
#endif
|
||||
|
@@ -406,8 +406,8 @@ static inline bool is_enc_slice_delivery_mode(struct msm_vidc_inst *inst)
|
||||
const char *cap_name(enum msm_vidc_inst_capability_type cap_id);
|
||||
const char *v4l2_pixelfmt_name(struct msm_vidc_inst *inst, u32 pixelfmt);
|
||||
const char *v4l2_type_name(u32 port);
|
||||
void print_vidc_buffer(u32 tag, const char *tag_str, const char *str, struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *vbuf);
|
||||
void print_vidc_buffer(u32 tag, const char *tag_str, const char *str,
|
||||
struct msm_vidc_inst *inst, struct msm_vidc_buffer *vbuf);
|
||||
void print_vb2_buffer(const char *str, struct msm_vidc_inst *inst,
|
||||
struct vb2_buffer *vb2);
|
||||
enum msm_vidc_codec_type v4l2_codec_to_driver(struct msm_vidc_inst *inst,
|
||||
@@ -417,7 +417,8 @@ u32 v4l2_codec_from_driver(struct msm_vidc_inst *inst, enum msm_vidc_codec_type
|
||||
enum msm_vidc_colorformat_type v4l2_colorformat_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 colorformat, const char *func);
|
||||
u32 v4l2_colorformat_from_driver(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_colorformat_type colorformat, const char *func);
|
||||
enum msm_vidc_colorformat_type colorformat,
|
||||
const char *func);
|
||||
u32 v4l2_color_primaries_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 v4l2_primaries, const char *func);
|
||||
u32 v4l2_color_primaries_from_driver(struct msm_vidc_inst *inst,
|
||||
@@ -460,10 +461,12 @@ int msm_vidc_session_close(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_kill_session(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_get_inst_capability(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_change_core_state(struct msm_vidc_core *core,
|
||||
enum msm_vidc_core_state request_state, const char *func);
|
||||
enum msm_vidc_core_state request_state,
|
||||
const char *func);
|
||||
int msm_vidc_change_core_sub_state(struct msm_vidc_core *core,
|
||||
enum msm_vidc_core_sub_state clear_sub_states,
|
||||
enum msm_vidc_core_sub_state set_sub_states, const char *func);
|
||||
enum msm_vidc_core_sub_state set_sub_states,
|
||||
const char *func);
|
||||
int msm_vidc_core_init(struct msm_vidc_core *core);
|
||||
int msm_vidc_core_init_wait(struct msm_vidc_core *core);
|
||||
int msm_vidc_core_deinit(struct msm_vidc_core *core, bool force);
|
||||
@@ -475,7 +478,8 @@ int msm_vidc_print_buffer_info(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_print_inst_info(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_print_core_info(struct msm_vidc_core *core);
|
||||
int msm_vidc_smmu_fault_handler(struct iommu_domain *domain,
|
||||
struct device *dev, unsigned long iova, int flags, void *data);
|
||||
struct device *dev, unsigned long iova,
|
||||
int flags, void *data);
|
||||
int msm_vidc_trigger_ssr(struct msm_vidc_core *core,
|
||||
u64 trigger_ssr_val);
|
||||
void msm_vidc_ssr_handler(struct work_struct *work);
|
||||
@@ -492,9 +496,10 @@ int msm_vidc_vb2_queue_init(struct msm_vidc_inst *inst);
|
||||
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_mem_list *msm_vidc_get_mem_info(
|
||||
struct msm_vidc_inst *inst, enum msm_vidc_buffer_type buffer_type,
|
||||
enum msm_vidc_buffer_type buffer_type,
|
||||
const char *func);
|
||||
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,
|
||||
struct vb2_buffer *vb2);
|
||||
@@ -503,14 +508,14 @@ int msm_vidc_allocate_buffers(struct msm_vidc_inst *inst,
|
||||
int msm_vidc_free_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buf_type);
|
||||
void msm_vidc_update_stats(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf, enum msm_vidc_debugfs_event etype);
|
||||
struct msm_vidc_buffer *buf,
|
||||
enum msm_vidc_debugfs_event etype);
|
||||
void msm_vidc_stats_handler(struct work_struct *work);
|
||||
int schedule_stats_work(struct msm_vidc_inst *inst);
|
||||
int cancel_stats_work_sync(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_print_stats(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_print_memory_stats(struct msm_vidc_inst *inst);
|
||||
enum msm_vidc_buffer_type v4l2_type_to_driver(u32 type,
|
||||
const char *func);
|
||||
enum msm_vidc_buffer_type v4l2_type_to_driver(u32 type, const char *func);
|
||||
int msm_vidc_buf_queue(struct msm_vidc_inst *inst, struct msm_vidc_buffer *buf);
|
||||
int msm_vidc_queue_buffer_single(struct msm_vidc_inst *inst,
|
||||
struct vb2_buffer *vb2);
|
||||
@@ -557,7 +562,8 @@ int msm_vidc_get_mbs_per_frame(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_get_max_bitrate(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_get_fps(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_num_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type type, enum msm_vidc_buffer_attributes attr);
|
||||
enum msm_vidc_buffer_type type,
|
||||
enum msm_vidc_buffer_attributes attr);
|
||||
void core_lock(struct msm_vidc_core *core, const char *function);
|
||||
void core_unlock(struct msm_vidc_core *core, const char *function);
|
||||
void inst_lock(struct msm_vidc_inst *inst, const char *function);
|
||||
@@ -613,10 +619,11 @@ int msm_vidc_alloc_and_queue_input_internal_buffers(struct msm_vidc_inst *inst);
|
||||
int vb2_buffer_to_driver(struct vb2_buffer *vb2, struct msm_vidc_buffer *buf);
|
||||
struct msm_vidc_buffer *msm_vidc_fetch_buffer(struct msm_vidc_inst *inst,
|
||||
struct vb2_buffer *vb2);
|
||||
struct context_bank_info *msm_vidc_get_context_bank_for_region(struct msm_vidc_core *core,
|
||||
struct context_bank_info
|
||||
*msm_vidc_get_context_bank_for_region(struct msm_vidc_core *core,
|
||||
enum msm_vidc_buffer_region region);
|
||||
struct context_bank_info *msm_vidc_get_context_bank_for_device(
|
||||
struct msm_vidc_core *core, struct device *dev);
|
||||
struct context_bank_info
|
||||
*msm_vidc_get_context_bank_for_device(struct msm_vidc_core *core, struct device *dev);
|
||||
|
||||
#endif // _MSM_VIDC_DRIVER_H_
|
||||
|
||||
|
@@ -71,7 +71,8 @@ struct msm_vidc_inst {
|
||||
struct mutex client_lock;
|
||||
enum msm_vidc_state state;
|
||||
int (*event_handle)(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_event event, void *data);
|
||||
enum msm_vidc_event event,
|
||||
void *data);
|
||||
enum msm_vidc_sub_state sub_state;
|
||||
char sub_state_name[MAX_NAME_LENGTH];
|
||||
enum msm_vidc_domain_type domain;
|
||||
|
@@ -1046,7 +1046,7 @@ struct msm_vidc_stability {
|
||||
};
|
||||
|
||||
struct msm_vidc_sfr {
|
||||
u32 bufSize;
|
||||
u32 buf_size;
|
||||
u8 rg_data[1];
|
||||
};
|
||||
|
||||
|
@@ -66,10 +66,12 @@ struct msm_vidc_memory_ops {
|
||||
struct dma_buf *dbuf, struct device *dev);
|
||||
int (*dma_buf_detach)(struct msm_vidc_core *core, struct dma_buf *dbuf,
|
||||
struct dma_buf_attachment *attach);
|
||||
struct sg_table *(*dma_buf_map_attachment)(struct msm_vidc_core *core,
|
||||
struct sg_table
|
||||
*(*dma_buf_map_attachment)(struct msm_vidc_core *core,
|
||||
struct dma_buf_attachment *attach);
|
||||
int (*dma_buf_unmap_attachment)(struct msm_vidc_core *core,
|
||||
struct dma_buf_attachment *attach, struct sg_table *table);
|
||||
struct dma_buf_attachment *attach,
|
||||
struct sg_table *table);
|
||||
int (*memory_alloc_map)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*memory_unmap_free)(struct msm_vidc_core *core,
|
||||
|
@@ -80,10 +80,12 @@ enum msm_vidc_sub_state {
|
||||
enum msm_vidc_event FOREACH_EVENT(GENERATE_MSM_VIDC_ENUM);
|
||||
|
||||
/* core statemachine functions */
|
||||
enum msm_vidc_allow msm_vidc_allow_core_state_change(
|
||||
struct msm_vidc_core *core, enum msm_vidc_core_state req_state);
|
||||
enum msm_vidc_allow
|
||||
msm_vidc_allow_core_state_change(struct msm_vidc_core *core,
|
||||
enum msm_vidc_core_state req_state);
|
||||
int msm_vidc_update_core_state(struct msm_vidc_core *core,
|
||||
enum msm_vidc_core_state request_state, const char *func);
|
||||
enum msm_vidc_core_state request_state,
|
||||
const char *func);
|
||||
bool core_in_valid_state(struct msm_vidc_core *core);
|
||||
bool is_core_state(struct msm_vidc_core *core, enum msm_vidc_core_state state);
|
||||
bool is_core_sub_state(struct msm_vidc_core *core,
|
||||
@@ -95,12 +97,15 @@ const char *core_sub_state_name(enum msm_vidc_core_sub_state sub_state);
|
||||
bool is_drc_pending(struct msm_vidc_inst *inst);
|
||||
bool is_drain_pending(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_update_state(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_state request_state, const char *func);
|
||||
enum msm_vidc_state request_state,
|
||||
const char *func);
|
||||
int msm_vidc_change_state(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_state request_state, const char *func);
|
||||
enum msm_vidc_state request_state,
|
||||
const char *func);
|
||||
int msm_vidc_change_sub_state(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_sub_state clear_sub_state,
|
||||
enum msm_vidc_sub_state set_sub_state, const char *func);
|
||||
enum msm_vidc_sub_state set_sub_state,
|
||||
const char *func);
|
||||
const char *state_name(enum msm_vidc_state state);
|
||||
const char *sub_state_name(enum msm_vidc_sub_state sub_state);
|
||||
bool is_state(struct msm_vidc_inst *inst, enum msm_vidc_state state);
|
||||
|
@@ -19,8 +19,10 @@ struct vb2_queue *msm_vidc_get_vb2q(struct msm_vidc_inst *inst,
|
||||
void *msm_vb2_alloc(struct device *dev, unsigned long attrs,
|
||||
unsigned long size, enum dma_data_direction dma_dir,
|
||||
gfp_t gfp_flags);
|
||||
void *msm_vb2_attach_dmabuf(struct device *dev, struct dma_buf *dbuf,
|
||||
unsigned long size, enum dma_data_direction dma_dir);
|
||||
void *msm_vb2_attach_dmabuf(struct device *dev,
|
||||
struct dma_buf *dbuf,
|
||||
unsigned long size,
|
||||
enum dma_data_direction dma_dir);
|
||||
#else
|
||||
void *msm_vb2_alloc(struct vb2_buffer *vb, struct device *dev,
|
||||
unsigned long size);
|
||||
@@ -36,8 +38,10 @@ void msm_vb2_unmap_dmabuf(void *buf_priv);
|
||||
|
||||
/* vb2_ops */
|
||||
int msm_vb2_queue_setup(struct vb2_queue *q,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], struct device *alloc_devs[]);
|
||||
unsigned int *num_buffers,
|
||||
unsigned int *num_planes,
|
||||
unsigned int sizes[],
|
||||
struct device *alloc_devs[]);
|
||||
int msm_vidc_start_streaming(struct msm_vidc_inst *inst, struct vb2_queue *q);
|
||||
int msm_vidc_stop_streaming(struct msm_vidc_inst *inst, struct vb2_queue *q);
|
||||
int msm_vb2_start_streaming(struct vb2_queue *q, unsigned int count);
|
||||
|
@@ -280,11 +280,12 @@ struct msm_vidc_resources_ops {
|
||||
int (*clk_disable)(struct msm_vidc_core *core, const char *name);
|
||||
int (*clk_enable)(struct msm_vidc_core *core, const char *name);
|
||||
int (*clk_set_flag)(struct msm_vidc_core *core,
|
||||
const char *name, enum msm_vidc_branch_mem_flags flag);
|
||||
const char *name,
|
||||
enum msm_vidc_branch_mem_flags flag);
|
||||
int (*clk_print_residency_stats)(struct msm_vidc_core *core);
|
||||
int (*clk_reset_residency_stats)(struct msm_vidc_core *core);
|
||||
int (*clk_update_residency_stats)(
|
||||
struct msm_vidc_core *core, struct clock_info *cl, u64 rate);
|
||||
int (*clk_update_residency_stats)(struct msm_vidc_core *core,
|
||||
struct clock_info *cl, u64 rate);
|
||||
};
|
||||
|
||||
const struct msm_vidc_resources_ops *get_resources_ops(void);
|
||||
|
@@ -37,14 +37,18 @@ int __strict_check(struct msm_vidc_core *core,
|
||||
const char *function);
|
||||
int venus_hfi_session_property(struct msm_vidc_inst *inst,
|
||||
u32 pkt_type, u32 flags, u32 port,
|
||||
u32 payload_type, void *payload, u32 payload_size);
|
||||
u32 payload_type, void *payload,
|
||||
u32 payload_size);
|
||||
int venus_hfi_session_command(struct msm_vidc_inst *inst,
|
||||
u32 cmd, enum msm_vidc_port_type port, u32 payload_type,
|
||||
u32 cmd, enum msm_vidc_port_type port,
|
||||
u32 payload_type,
|
||||
void *payload, u32 payload_size);
|
||||
int venus_hfi_queue_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer, struct msm_vidc_buffer *metabuf);
|
||||
struct msm_vidc_buffer *buffer,
|
||||
struct msm_vidc_buffer *metabuf);
|
||||
int venus_hfi_queue_super_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer, struct msm_vidc_buffer *metabuf);
|
||||
struct msm_vidc_buffer *buffer,
|
||||
struct msm_vidc_buffer *metabuf);
|
||||
int venus_hfi_release_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer);
|
||||
int venus_hfi_start(struct msm_vidc_inst *inst, enum msm_vidc_port_type port);
|
||||
@@ -74,7 +78,8 @@ void venus_hfi_pm_work_handler(struct work_struct *work);
|
||||
irqreturn_t venus_hfi_isr(int irq, void *data);
|
||||
irqreturn_t venus_hfi_isr_handler(int irq, void *data);
|
||||
int __prepare_pc(struct msm_vidc_core *core);
|
||||
struct device_region_info *venus_hfi_get_device_region_info(
|
||||
struct msm_vidc_core *core, enum msm_vidc_device_region region);
|
||||
struct device_region_info
|
||||
*venus_hfi_get_device_region_info(struct msm_vidc_core *core,
|
||||
enum msm_vidc_device_region region);
|
||||
|
||||
#endif // _VENUS_HFI_H_
|
||||
|
@@ -22,5 +22,4 @@ int handle_system_error(struct msm_vidc_core *core,
|
||||
int handle_release_output_buffer(struct msm_vidc_inst *inst,
|
||||
struct hfi_buffer *buffer);
|
||||
|
||||
|
||||
#endif // __VENUS_HFI_RESPONSE_H__
|
||||
|
@@ -66,12 +66,12 @@ static void print_sfr_message(struct msm_vidc_core *core)
|
||||
|
||||
vsfr = (struct msm_vidc_sfr *)core->sfr.align_virtual_addr;
|
||||
if (vsfr) {
|
||||
if (vsfr->bufSize != core->sfr.mem_size) {
|
||||
if (vsfr->buf_size != core->sfr.mem_size) {
|
||||
d_vpr_e("Invalid SFR buf size %d actual %d\n",
|
||||
vsfr->bufSize, core->sfr.mem_size);
|
||||
vsfr->buf_size, core->sfr.mem_size);
|
||||
return;
|
||||
}
|
||||
vsfr_size = vsfr->bufSize - sizeof(u32);
|
||||
vsfr_size = vsfr->buf_size - sizeof(u32);
|
||||
p = memchr(vsfr->rg_data, '\0', vsfr_size);
|
||||
/* SFR isn't guaranteed to be NULL terminated */
|
||||
if (p == NULL)
|
||||
|
Reference in New Issue
Block a user