Merge "Video: driver: Fix warnings for vendor checker"
Esse commit está contido em:

commit de
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;
|
||||
|
@@ -14,38 +14,46 @@
|
||||
#include "hfi_property.h"
|
||||
|
||||
u32 get_hfi_port(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port);
|
||||
enum msm_vidc_port_type port);
|
||||
u32 get_hfi_port_from_buffer_type(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
u32 hfi_buf_type_from_driver(enum msm_vidc_domain_type domain,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
u8 *pkt, u32 pkt_size);
|
||||
int hfi_packet_image_version(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size);
|
||||
u8 *pkt, u32 pkt_size);
|
||||
int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
|
||||
u8 *pkt, u32 pkt_size);
|
||||
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_
|
||||
|
@@ -22,22 +22,22 @@
|
||||
#define HFI_PROP_UBWC_BANK_SPREADING 0x03000009
|
||||
|
||||
enum hfi_debug_config {
|
||||
HFI_DEBUG_CONFIG_DEFAULT = 0x00000000,
|
||||
HFI_DEBUG_CONFIG_CLRDBGQ = 0x00000001,
|
||||
HFI_DEBUG_CONFIG_WFI = 0x00000002,
|
||||
HFI_DEBUG_CONFIG_ARM9WD = 0x00000004,
|
||||
HFI_DEBUG_CONFIG_DEFAULT = 0x00000000,
|
||||
HFI_DEBUG_CONFIG_CLRDBGQ = 0x00000001,
|
||||
HFI_DEBUG_CONFIG_WFI = 0x00000002,
|
||||
HFI_DEBUG_CONFIG_ARM9WD = 0x00000004,
|
||||
};
|
||||
|
||||
#define HFI_PROP_DEBUG_CONFIG 0x0300000a
|
||||
|
||||
enum hfi_debug_log_level {
|
||||
HFI_DEBUG_LOG_NONE = 0x00000000,
|
||||
HFI_DEBUG_LOG_ERROR = 0x00000001,
|
||||
HFI_DEBUG_LOG_FATAL = 0x00000002,
|
||||
HFI_DEBUG_LOG_PERF = 0x00000004,
|
||||
HFI_DEBUG_LOG_HIGH = 0x00000008,
|
||||
HFI_DEBUG_LOG_MEDIUM = 0x00000010,
|
||||
HFI_DEBUG_LOG_LOW = 0x00000020,
|
||||
HFI_DEBUG_LOG_NONE = 0x00000000,
|
||||
HFI_DEBUG_LOG_ERROR = 0x00000001,
|
||||
HFI_DEBUG_LOG_FATAL = 0x00000002,
|
||||
HFI_DEBUG_LOG_PERF = 0x00000004,
|
||||
HFI_DEBUG_LOG_HIGH = 0x00000008,
|
||||
HFI_DEBUG_LOG_MEDIUM = 0x00000010,
|
||||
HFI_DEBUG_LOG_LOW = 0x00000020,
|
||||
};
|
||||
|
||||
struct hfi_debug_header {
|
||||
@@ -51,26 +51,26 @@ struct hfi_debug_header {
|
||||
#define HFI_PROP_FENCE_CLIENT_DATA 0x0300000d
|
||||
|
||||
enum hfi_codec_type {
|
||||
HFI_CODEC_DECODE_AVC = 1,
|
||||
HFI_CODEC_ENCODE_AVC = 2,
|
||||
HFI_CODEC_DECODE_HEVC = 3,
|
||||
HFI_CODEC_ENCODE_HEVC = 4,
|
||||
HFI_CODEC_DECODE_VP9 = 5,
|
||||
HFI_CODEC_DECODE_MPEG2 = 6,
|
||||
HFI_CODEC_DECODE_AV1 = 7,
|
||||
HFI_CODEC_DECODE_AVC = 1,
|
||||
HFI_CODEC_ENCODE_AVC = 2,
|
||||
HFI_CODEC_DECODE_HEVC = 3,
|
||||
HFI_CODEC_ENCODE_HEVC = 4,
|
||||
HFI_CODEC_DECODE_VP9 = 5,
|
||||
HFI_CODEC_DECODE_MPEG2 = 6,
|
||||
HFI_CODEC_DECODE_AV1 = 7,
|
||||
};
|
||||
|
||||
#define HFI_PROP_CODEC 0x03000100
|
||||
|
||||
enum hfi_color_format {
|
||||
HFI_COLOR_FMT_OPAQUE = 0,
|
||||
HFI_COLOR_FMT_NV12 = 1,
|
||||
HFI_COLOR_FMT_NV12_UBWC = 2,
|
||||
HFI_COLOR_FMT_P010 = 3,
|
||||
HFI_COLOR_FMT_TP10_UBWC = 4,
|
||||
HFI_COLOR_FMT_RGBA8888 = 5,
|
||||
HFI_COLOR_FMT_RGBA8888_UBWC = 6,
|
||||
HFI_COLOR_FMT_NV21 = 7,
|
||||
HFI_COLOR_FMT_OPAQUE = 0,
|
||||
HFI_COLOR_FMT_NV12 = 1,
|
||||
HFI_COLOR_FMT_NV12_UBWC = 2,
|
||||
HFI_COLOR_FMT_P010 = 3,
|
||||
HFI_COLOR_FMT_TP10_UBWC = 4,
|
||||
HFI_COLOR_FMT_RGBA8888 = 5,
|
||||
HFI_COLOR_FMT_RGBA8888_UBWC = 6,
|
||||
HFI_COLOR_FMT_NV21 = 7,
|
||||
};
|
||||
|
||||
#define HFI_PROP_COLOR_FORMAT 0x03000101
|
||||
@@ -94,11 +94,11 @@ enum hfi_color_format {
|
||||
#define HFI_PROP_SESSION_PRIORITY 0x03000106
|
||||
|
||||
enum hfi_avc_profile_type {
|
||||
HFI_AVC_PROFILE_BASELINE = 0,
|
||||
HFI_AVC_PROFILE_CONSTRAINED_BASELINE = 1,
|
||||
HFI_AVC_PROFILE_MAIN = 2,
|
||||
HFI_AVC_PROFILE_HIGH = 4,
|
||||
HFI_AVC_PROFILE_CONSTRAINED_HIGH = 17
|
||||
HFI_AVC_PROFILE_BASELINE = 0,
|
||||
HFI_AVC_PROFILE_CONSTRAINED_BASELINE = 1,
|
||||
HFI_AVC_PROFILE_MAIN = 2,
|
||||
HFI_AVC_PROFILE_HIGH = 4,
|
||||
HFI_AVC_PROFILE_CONSTRAINED_HIGH = 17
|
||||
};
|
||||
|
||||
enum hfi_hevc_profile_type {
|
||||
@@ -109,128 +109,128 @@ enum hfi_hevc_profile_type {
|
||||
};
|
||||
|
||||
enum hfi_vp9_profile_type {
|
||||
HFI_VP9_PROFILE_0 = 0,
|
||||
HFI_VP9_PROFILE_1 = 1,
|
||||
HFI_VP9_PROFILE_2 = 2,
|
||||
HFI_VP9_PROFILE_3 = 3,
|
||||
HFI_VP9_PROFILE_0 = 0,
|
||||
HFI_VP9_PROFILE_1 = 1,
|
||||
HFI_VP9_PROFILE_2 = 2,
|
||||
HFI_VP9_PROFILE_3 = 3,
|
||||
};
|
||||
|
||||
enum hfi_mpeg2_profile_type {
|
||||
HFI_MP2_PROFILE_SIMPLE = 0,
|
||||
HFI_MP2_PROFILE_MAIN = 1,
|
||||
HFI_MP2_PROFILE_SIMPLE = 0,
|
||||
HFI_MP2_PROFILE_MAIN = 1,
|
||||
};
|
||||
|
||||
enum hfi_av1_profile_type {
|
||||
HFI_AV1_PROFILE_MAIN = 0,
|
||||
HFI_AV1_PROFILE_HIGH = 1,
|
||||
HFI_AV1_PROFILE_PROF = 2,
|
||||
HFI_AV1_PROFILE_MAIN = 0,
|
||||
HFI_AV1_PROFILE_HIGH = 1,
|
||||
HFI_AV1_PROFILE_PROF = 2,
|
||||
};
|
||||
|
||||
#define HFI_PROP_PROFILE 0x03000107
|
||||
|
||||
enum hfi_avc_level_type {
|
||||
HFI_AVC_LEVEL_1_0 = 0,
|
||||
HFI_AVC_LEVEL_1B = 1,
|
||||
HFI_AVC_LEVEL_1_1 = 2,
|
||||
HFI_AVC_LEVEL_1_2 = 3,
|
||||
HFI_AVC_LEVEL_1_3 = 4,
|
||||
HFI_AVC_LEVEL_2_0 = 5,
|
||||
HFI_AVC_LEVEL_2_1 = 6,
|
||||
HFI_AVC_LEVEL_2_2 = 7,
|
||||
HFI_AVC_LEVEL_3_0 = 8,
|
||||
HFI_AVC_LEVEL_3_1 = 9,
|
||||
HFI_AVC_LEVEL_3_2 = 10,
|
||||
HFI_AVC_LEVEL_4_0 = 11,
|
||||
HFI_AVC_LEVEL_4_1 = 12,
|
||||
HFI_AVC_LEVEL_4_2 = 13,
|
||||
HFI_AVC_LEVEL_5_0 = 14,
|
||||
HFI_AVC_LEVEL_5_1 = 15,
|
||||
HFI_AVC_LEVEL_5_2 = 16,
|
||||
HFI_AVC_LEVEL_6_0 = 17,
|
||||
HFI_AVC_LEVEL_6_1 = 18,
|
||||
HFI_AVC_LEVEL_6_2 = 19,
|
||||
HFI_AVC_LEVEL_1_0 = 0,
|
||||
HFI_AVC_LEVEL_1B = 1,
|
||||
HFI_AVC_LEVEL_1_1 = 2,
|
||||
HFI_AVC_LEVEL_1_2 = 3,
|
||||
HFI_AVC_LEVEL_1_3 = 4,
|
||||
HFI_AVC_LEVEL_2_0 = 5,
|
||||
HFI_AVC_LEVEL_2_1 = 6,
|
||||
HFI_AVC_LEVEL_2_2 = 7,
|
||||
HFI_AVC_LEVEL_3_0 = 8,
|
||||
HFI_AVC_LEVEL_3_1 = 9,
|
||||
HFI_AVC_LEVEL_3_2 = 10,
|
||||
HFI_AVC_LEVEL_4_0 = 11,
|
||||
HFI_AVC_LEVEL_4_1 = 12,
|
||||
HFI_AVC_LEVEL_4_2 = 13,
|
||||
HFI_AVC_LEVEL_5_0 = 14,
|
||||
HFI_AVC_LEVEL_5_1 = 15,
|
||||
HFI_AVC_LEVEL_5_2 = 16,
|
||||
HFI_AVC_LEVEL_6_0 = 17,
|
||||
HFI_AVC_LEVEL_6_1 = 18,
|
||||
HFI_AVC_LEVEL_6_2 = 19,
|
||||
};
|
||||
|
||||
enum hfi_hevc_level_type {
|
||||
HFI_H265_LEVEL_1 = 0,
|
||||
HFI_H265_LEVEL_2 = 1,
|
||||
HFI_H265_LEVEL_2_1 = 2,
|
||||
HFI_H265_LEVEL_3 = 3,
|
||||
HFI_H265_LEVEL_3_1 = 4,
|
||||
HFI_H265_LEVEL_4 = 5,
|
||||
HFI_H265_LEVEL_4_1 = 6,
|
||||
HFI_H265_LEVEL_5 = 7,
|
||||
HFI_H265_LEVEL_5_1 = 8,
|
||||
HFI_H265_LEVEL_5_2 = 9,
|
||||
HFI_H265_LEVEL_6 = 10,
|
||||
HFI_H265_LEVEL_6_1 = 11,
|
||||
HFI_H265_LEVEL_6_2 = 12,
|
||||
HFI_H265_LEVEL_1 = 0,
|
||||
HFI_H265_LEVEL_2 = 1,
|
||||
HFI_H265_LEVEL_2_1 = 2,
|
||||
HFI_H265_LEVEL_3 = 3,
|
||||
HFI_H265_LEVEL_3_1 = 4,
|
||||
HFI_H265_LEVEL_4 = 5,
|
||||
HFI_H265_LEVEL_4_1 = 6,
|
||||
HFI_H265_LEVEL_5 = 7,
|
||||
HFI_H265_LEVEL_5_1 = 8,
|
||||
HFI_H265_LEVEL_5_2 = 9,
|
||||
HFI_H265_LEVEL_6 = 10,
|
||||
HFI_H265_LEVEL_6_1 = 11,
|
||||
HFI_H265_LEVEL_6_2 = 12,
|
||||
};
|
||||
|
||||
enum hfi_vp9_level_type {
|
||||
HFI_VP9_LEVEL_1_0 = 0,
|
||||
HFI_VP9_LEVEL_1_1 = 1,
|
||||
HFI_VP9_LEVEL_2_0 = 2,
|
||||
HFI_VP9_LEVEL_2_1 = 3,
|
||||
HFI_VP9_LEVEL_3_0 = 4,
|
||||
HFI_VP9_LEVEL_3_1 = 5,
|
||||
HFI_VP9_LEVEL_4_0 = 6,
|
||||
HFI_VP9_LEVEL_4_1 = 7,
|
||||
HFI_VP9_LEVEL_5_0 = 8,
|
||||
HFI_VP9_LEVEL_5_1 = 9,
|
||||
HFI_VP9_LEVEL_6_0 = 10,
|
||||
HFI_VP9_LEVEL_6_1 = 11,
|
||||
HFI_VP9_LEVEL_1_0 = 0,
|
||||
HFI_VP9_LEVEL_1_1 = 1,
|
||||
HFI_VP9_LEVEL_2_0 = 2,
|
||||
HFI_VP9_LEVEL_2_1 = 3,
|
||||
HFI_VP9_LEVEL_3_0 = 4,
|
||||
HFI_VP9_LEVEL_3_1 = 5,
|
||||
HFI_VP9_LEVEL_4_0 = 6,
|
||||
HFI_VP9_LEVEL_4_1 = 7,
|
||||
HFI_VP9_LEVEL_5_0 = 8,
|
||||
HFI_VP9_LEVEL_5_1 = 9,
|
||||
HFI_VP9_LEVEL_6_0 = 10,
|
||||
HFI_VP9_LEVEL_6_1 = 11,
|
||||
};
|
||||
|
||||
enum hfi_mpeg2_level_type {
|
||||
HFI_MP2_LEVEL_LOW = 0,
|
||||
HFI_MP2_LEVEL_MAIN = 1,
|
||||
HFI_MP2_LEVEL_HIGH_1440 = 2,
|
||||
HFI_MP2_LEVEL_HIGH = 3,
|
||||
HFI_MP2_LEVEL_LOW = 0,
|
||||
HFI_MP2_LEVEL_MAIN = 1,
|
||||
HFI_MP2_LEVEL_HIGH_1440 = 2,
|
||||
HFI_MP2_LEVEL_HIGH = 3,
|
||||
};
|
||||
|
||||
enum hfi_av1_level_type {
|
||||
HFI_AV1_LEVEL_2_0 = 0,
|
||||
HFI_AV1_LEVEL_2_1 = 1,
|
||||
HFI_AV1_LEVEL_2_2 = 2,
|
||||
HFI_AV1_LEVEL_2_3 = 3,
|
||||
HFI_AV1_LEVEL_3_0 = 4,
|
||||
HFI_AV1_LEVEL_3_1 = 5,
|
||||
HFI_AV1_LEVEL_3_2 = 6,
|
||||
HFI_AV1_LEVEL_3_3 = 7,
|
||||
HFI_AV1_LEVEL_4_0 = 8,
|
||||
HFI_AV1_LEVEL_4_1 = 9,
|
||||
HFI_AV1_LEVEL_4_2 = 10,
|
||||
HFI_AV1_LEVEL_4_3 = 11,
|
||||
HFI_AV1_LEVEL_5_0 = 12,
|
||||
HFI_AV1_LEVEL_5_1 = 13,
|
||||
HFI_AV1_LEVEL_5_2 = 14,
|
||||
HFI_AV1_LEVEL_5_3 = 15,
|
||||
HFI_AV1_LEVEL_6_0 = 16,
|
||||
HFI_AV1_LEVEL_6_1 = 17,
|
||||
HFI_AV1_LEVEL_6_2 = 18,
|
||||
HFI_AV1_LEVEL_6_3 = 19,
|
||||
HFI_AV1_LEVEL_7_0 = 20,
|
||||
HFI_AV1_LEVEL_7_1 = 21,
|
||||
HFI_AV1_LEVEL_7_2 = 22,
|
||||
HFI_AV1_LEVEL_7_3 = 23,
|
||||
HFI_AV1_LEVEL_MAX = 31,
|
||||
HFI_AV1_LEVEL_2_0 = 0,
|
||||
HFI_AV1_LEVEL_2_1 = 1,
|
||||
HFI_AV1_LEVEL_2_2 = 2,
|
||||
HFI_AV1_LEVEL_2_3 = 3,
|
||||
HFI_AV1_LEVEL_3_0 = 4,
|
||||
HFI_AV1_LEVEL_3_1 = 5,
|
||||
HFI_AV1_LEVEL_3_2 = 6,
|
||||
HFI_AV1_LEVEL_3_3 = 7,
|
||||
HFI_AV1_LEVEL_4_0 = 8,
|
||||
HFI_AV1_LEVEL_4_1 = 9,
|
||||
HFI_AV1_LEVEL_4_2 = 10,
|
||||
HFI_AV1_LEVEL_4_3 = 11,
|
||||
HFI_AV1_LEVEL_5_0 = 12,
|
||||
HFI_AV1_LEVEL_5_1 = 13,
|
||||
HFI_AV1_LEVEL_5_2 = 14,
|
||||
HFI_AV1_LEVEL_5_3 = 15,
|
||||
HFI_AV1_LEVEL_6_0 = 16,
|
||||
HFI_AV1_LEVEL_6_1 = 17,
|
||||
HFI_AV1_LEVEL_6_2 = 18,
|
||||
HFI_AV1_LEVEL_6_3 = 19,
|
||||
HFI_AV1_LEVEL_7_0 = 20,
|
||||
HFI_AV1_LEVEL_7_1 = 21,
|
||||
HFI_AV1_LEVEL_7_2 = 22,
|
||||
HFI_AV1_LEVEL_7_3 = 23,
|
||||
HFI_AV1_LEVEL_MAX = 31,
|
||||
};
|
||||
|
||||
enum hfi_codec_level_type {
|
||||
HFI_LEVEL_NONE = 0xFFFFFFFF,
|
||||
HFI_LEVEL_NONE = 0xFFFFFFFF,
|
||||
};
|
||||
|
||||
#define HFI_PROP_LEVEL 0x03000108
|
||||
|
||||
enum hfi_hevc_tier_type {
|
||||
HFI_H265_TIER_MAIN = 0,
|
||||
HFI_H265_TIER_HIGH = 1,
|
||||
HFI_H265_TIER_MAIN = 0,
|
||||
HFI_H265_TIER_HIGH = 1,
|
||||
};
|
||||
|
||||
enum hfi_av1_tier_type {
|
||||
HFI_AV1_TIER_MAIN = 0,
|
||||
HFI_AV1_TIER_HIGH = 1,
|
||||
HFI_AV1_TIER_MAIN = 0,
|
||||
HFI_AV1_TIER_HIGH = 1,
|
||||
};
|
||||
|
||||
#define HFI_PROP_TIER 0x03000109
|
||||
@@ -276,20 +276,20 @@ enum hfi_av1_tier_type {
|
||||
#define HFI_PROP_PIC_ORDER_CNT_TYPE 0x03000128
|
||||
|
||||
enum hfi_deblock_mode {
|
||||
HFI_DEBLOCK_ALL_BOUNDARY = 0x0,
|
||||
HFI_DEBLOCK_DISABLE = 0x1,
|
||||
HFI_DEBLOCK_DISABLE_AT_SLICE_BOUNDARY = 0x2,
|
||||
HFI_DEBLOCK_ALL_BOUNDARY = 0x0,
|
||||
HFI_DEBLOCK_DISABLE = 0x1,
|
||||
HFI_DEBLOCK_DISABLE_AT_SLICE_BOUNDARY = 0x2,
|
||||
};
|
||||
|
||||
#define HFI_PROP_DEBLOCKING_MODE 0x03000129
|
||||
|
||||
enum hfi_rate_control {
|
||||
HFI_RC_VBR_CFR = 0x00000000,
|
||||
HFI_RC_CBR_CFR = 0x00000001,
|
||||
HFI_RC_CQ = 0x00000002,
|
||||
HFI_RC_OFF = 0x00000003,
|
||||
HFI_RC_CBR_VFR = 0x00000004,
|
||||
HFI_RC_LOSSLESS = 0x00000005,
|
||||
HFI_RC_VBR_CFR = 0x00000000,
|
||||
HFI_RC_CBR_CFR = 0x00000001,
|
||||
HFI_RC_CQ = 0x00000002,
|
||||
HFI_RC_OFF = 0x00000003,
|
||||
HFI_RC_CBR_VFR = 0x00000004,
|
||||
HFI_RC_LOSSLESS = 0x00000005,
|
||||
};
|
||||
|
||||
#define HFI_PROP_RATE_CONTROL 0x0300012a
|
||||
@@ -326,9 +326,9 @@ enum hfi_rate_control {
|
||||
#define HFI_PROP_LTR_MARK_USE_DETAILS 0x03000137
|
||||
|
||||
enum hfi_layer_encoding_type {
|
||||
HFI_HIER_P_SLIDING_WINDOW = 0x1,
|
||||
HFI_HIER_P_HYBRID_LTR = 0x2,
|
||||
HFI_HIER_B = 0x3,
|
||||
HFI_HIER_P_SLIDING_WINDOW = 0x1,
|
||||
HFI_HIER_P_HYBRID_LTR = 0x2,
|
||||
HFI_HIER_B = 0x3,
|
||||
};
|
||||
|
||||
#define HFI_PROP_LAYER_ENCODING_TYPE 0x03000138
|
||||
@@ -336,8 +336,8 @@ enum hfi_layer_encoding_type {
|
||||
#define HFI_PROP_LAYER_COUNT 0x03000139
|
||||
|
||||
enum hfi_chromaqp_offset_mode {
|
||||
HFI_ADAPTIVE_CHROMAQP_OFFSET = 0x0,
|
||||
HFI_FIXED_CHROMAQP_OFFSET = 0x1,
|
||||
HFI_ADAPTIVE_CHROMAQP_OFFSET = 0x0,
|
||||
HFI_FIXED_CHROMAQP_OFFSET = 0x1,
|
||||
};
|
||||
|
||||
#define HFI_BITMASK_CHROMA_CB_OFFSET 0x0000ffff
|
||||
@@ -365,8 +365,8 @@ enum hfi_chromaqp_offset_mode {
|
||||
#define HFI_PROP_HEIC_GRID_ENABLE 0x03000144
|
||||
|
||||
enum hfi_syncframe_request_mode {
|
||||
HFI_SYNC_FRAME_REQUEST_WITHOUT_SEQ_HDR = 0x00000001,
|
||||
HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR = 0x00000002,
|
||||
HFI_SYNC_FRAME_REQUEST_WITHOUT_SEQ_HDR = 0x00000001,
|
||||
HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR = 0x00000002,
|
||||
};
|
||||
|
||||
#define HFI_PROP_REQUEST_SYNC_FRAME 0x03000145
|
||||
@@ -376,17 +376,17 @@ enum hfi_syncframe_request_mode {
|
||||
#define HFI_PROP_MAX_B_FRAMES 0x03000147
|
||||
|
||||
enum hfi_quality_mode {
|
||||
HFI_MODE_MAX_QUALITY = 0x1,
|
||||
HFI_MODE_POWER_SAVE = 0x2,
|
||||
HFI_MODE_MAX_QUALITY = 0x1,
|
||||
HFI_MODE_POWER_SAVE = 0x2,
|
||||
};
|
||||
|
||||
#define HFI_PROP_QUALITY_MODE 0x03000148
|
||||
|
||||
enum hfi_seq_header_mode {
|
||||
HFI_SEQ_HEADER_SEPERATE_FRAME = 0x00000001,
|
||||
HFI_SEQ_HEADER_JOINED_WITH_1ST_FRAME = 0x00000002,
|
||||
HFI_SEQ_HEADER_PREFIX_WITH_SYNC_FRAME = 0x00000004,
|
||||
HFI_SEQ_HEADER_METADATA = 0x00000008,
|
||||
HFI_SEQ_HEADER_SEPERATE_FRAME = 0x00000001,
|
||||
HFI_SEQ_HEADER_JOINED_WITH_1ST_FRAME = 0x00000002,
|
||||
HFI_SEQ_HEADER_PREFIX_WITH_SYNC_FRAME = 0x00000004,
|
||||
HFI_SEQ_HEADER_METADATA = 0x00000008,
|
||||
};
|
||||
|
||||
#define HFI_PROP_SEQ_HEADER_MODE 0x03000149
|
||||
@@ -394,18 +394,18 @@ enum hfi_seq_header_mode {
|
||||
#define HFI_PROP_METADATA_SEQ_HEADER_NAL 0x0300014a
|
||||
|
||||
enum hfi_rotation {
|
||||
HFI_ROTATION_NONE = 0x00000000,
|
||||
HFI_ROTATION_90 = 0x00000001,
|
||||
HFI_ROTATION_180 = 0x00000002,
|
||||
HFI_ROTATION_270 = 0x00000003,
|
||||
HFI_ROTATION_NONE = 0x00000000,
|
||||
HFI_ROTATION_90 = 0x00000001,
|
||||
HFI_ROTATION_180 = 0x00000002,
|
||||
HFI_ROTATION_270 = 0x00000003,
|
||||
};
|
||||
|
||||
#define HFI_PROP_ROTATION 0x0300014b
|
||||
|
||||
enum hfi_flip {
|
||||
HFI_DISABLE_FLIP = 0x00000000,
|
||||
HFI_HORIZONTAL_FLIP = 0x00000001,
|
||||
HFI_VERTICAL_FLIP = 0x00000002,
|
||||
HFI_DISABLE_FLIP = 0x00000000,
|
||||
HFI_HORIZONTAL_FLIP = 0x00000001,
|
||||
HFI_VERTICAL_FLIP = 0x00000002,
|
||||
};
|
||||
|
||||
#define HFI_PROP_FLIP 0x0300014c
|
||||
@@ -413,9 +413,9 @@ enum hfi_flip {
|
||||
#define HFI_PROP_SCALAR 0x0300014d
|
||||
|
||||
enum hfi_blur_types {
|
||||
HFI_BLUR_NONE = 0x00000000,
|
||||
HFI_BLUR_EXTERNAL = 0x00000001,
|
||||
HFI_BLUR_ADAPTIVE = 0x00000002,
|
||||
HFI_BLUR_NONE = 0x00000000,
|
||||
HFI_BLUR_EXTERNAL = 0x00000001,
|
||||
HFI_BLUR_ADAPTIVE = 0x00000002,
|
||||
};
|
||||
|
||||
#define HFI_PROP_BLUR_TYPES 0x0300014e
|
||||
@@ -443,13 +443,13 @@ enum hfi_blur_types {
|
||||
#define HFI_PROP_SIGNAL_COLOR_INFO 0x03000155
|
||||
|
||||
enum hfi_interlace_info {
|
||||
HFI_INTERLACE_INFO_NONE = 0x00000000,
|
||||
HFI_FRAME_PROGRESSIVE = 0x00000001,
|
||||
HFI_FRAME_MBAFF = 0x00000002,
|
||||
HFI_FRAME_INTERLEAVE_TOPFIELD_FIRST = 0x00000004,
|
||||
HFI_FRAME_INTERLEAVE_BOTTOMFIELD_FIRST = 0x00000008,
|
||||
HFI_FRAME_INTERLACE_TOPFIELD_FIRST = 0x00000010,
|
||||
HFI_FRAME_INTERLACE_BOTTOMFIELD_FIRST = 0x00000020,
|
||||
HFI_INTERLACE_INFO_NONE = 0x00000000,
|
||||
HFI_FRAME_PROGRESSIVE = 0x00000001,
|
||||
HFI_FRAME_MBAFF = 0x00000002,
|
||||
HFI_FRAME_INTERLEAVE_TOPFIELD_FIRST = 0x00000004,
|
||||
HFI_FRAME_INTERLEAVE_BOTTOMFIELD_FIRST = 0x00000008,
|
||||
HFI_FRAME_INTERLACE_TOPFIELD_FIRST = 0x00000010,
|
||||
HFI_FRAME_INTERLACE_BOTTOMFIELD_FIRST = 0x00000020,
|
||||
};
|
||||
|
||||
#define HFI_PROP_INTERLACE_INFO 0x03000156
|
||||
@@ -479,13 +479,13 @@ enum hfi_interlace_info {
|
||||
#define HFI_PROP_HISTOGRAM_INFO 0x03000161
|
||||
|
||||
enum hfi_picture_type {
|
||||
HFI_PICTURE_IDR = 0x00000001,
|
||||
HFI_PICTURE_P = 0x00000002,
|
||||
HFI_PICTURE_B = 0x00000004,
|
||||
HFI_PICTURE_I = 0x00000008,
|
||||
HFI_PICTURE_CRA = 0x00000010,
|
||||
HFI_PICTURE_BLA = 0x00000020,
|
||||
HFI_PICTURE_NOSHOW = 0x00000040,
|
||||
HFI_PICTURE_IDR = 0x00000001,
|
||||
HFI_PICTURE_P = 0x00000002,
|
||||
HFI_PICTURE_B = 0x00000004,
|
||||
HFI_PICTURE_I = 0x00000008,
|
||||
HFI_PICTURE_CRA = 0x00000010,
|
||||
HFI_PICTURE_BLA = 0x00000020,
|
||||
HFI_PICTURE_NOSHOW = 0x00000040,
|
||||
};
|
||||
|
||||
#define HFI_PROP_PICTURE_TYPE 0x03000162
|
||||
@@ -541,8 +541,8 @@ enum hfi_picture_type {
|
||||
#define HFI_PROP_DPB_LIST 0x0300017A
|
||||
|
||||
enum hfi_nal_length_field_type {
|
||||
HFI_NAL_LENGTH_STARTCODES = 0,
|
||||
HFI_NAL_LENGTH_SIZE_4 = 4,
|
||||
HFI_NAL_LENGTH_STARTCODES = 0,
|
||||
HFI_NAL_LENGTH_SIZE_4 = 4,
|
||||
};
|
||||
|
||||
#define HFI_PROP_NAL_LENGTH_FIELD 0x0300017B
|
||||
@@ -570,8 +570,8 @@ enum hfi_nal_length_field_type {
|
||||
#define HFI_PROP_AV1_DRAP_CONFIG 0x03000189
|
||||
|
||||
enum hfi_saliency_type {
|
||||
HFI_SALIENCY_NONE,
|
||||
HFI_SALIENCY_TYPE0,
|
||||
HFI_SALIENCY_NONE,
|
||||
HFI_SALIENCY_TYPE0,
|
||||
};
|
||||
|
||||
#define HFI_PROP_ROI_AS_SALIENCY_INFO 0x0300018A
|
||||
@@ -598,15 +598,15 @@ enum hfi_saliency_type {
|
||||
|
||||
/* u32 */
|
||||
enum hfi_fence_type {
|
||||
HFI_SW_FENCE = 0x00000001,
|
||||
HFI_SYNX_V2_FENCE = 0x00000002,
|
||||
HFI_SW_FENCE = 0x00000001,
|
||||
HFI_SYNX_V2_FENCE = 0x00000002,
|
||||
};
|
||||
|
||||
#define HFI_PROP_FENCE_TYPE 0x0300019D
|
||||
|
||||
enum hfi_fence_direction_type {
|
||||
HFI_FENCE_TX_ENABLE = 0x00000001,
|
||||
HFI_FENCE_RX_ENABLE = 0x00000002,
|
||||
HFI_FENCE_TX_ENABLE = 0x00000001,
|
||||
HFI_FENCE_RX_ENABLE = 0x00000002,
|
||||
};
|
||||
|
||||
#define HFI_PROP_FENCE_DIRECTION 0x0300019E
|
||||
|
@@ -12,7 +12,7 @@
|
||||
/* Width and Height should be multiple of 16 */
|
||||
#define INTERLACE_WIDTH_MAX 1920
|
||||
#define INTERLACE_HEIGHT_MAX 1920
|
||||
#define INTERLACE_MB_PER_FRAME_MAX ((1920*1088)/256)
|
||||
#define INTERLACE_MB_PER_FRAME_MAX ((1920 * 1088) / 256)
|
||||
|
||||
#ifndef MSM_MEDIA_ALIGN
|
||||
#define MSM_MEDIA_ALIGN(__sz, __align) (((__align) & ((__align) - 1)) ?\
|
||||
@@ -32,7 +32,7 @@
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_y_stride_bytes(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int alignment, stride = 0;
|
||||
|
||||
@@ -49,7 +49,7 @@ static inline unsigned int video_y_stride_bytes(unsigned int colorformat,
|
||||
case MSM_VIDC_FMT_TP10C:
|
||||
alignment = 256;
|
||||
stride = MSM_MEDIA_ALIGN(width, 192);
|
||||
stride = MSM_MEDIA_ALIGN(stride * 4/3, alignment);
|
||||
stride = MSM_MEDIA_ALIGN(stride * 4 / 3, alignment);
|
||||
break;
|
||||
case MSM_VIDC_FMT_P010:
|
||||
alignment = 256;
|
||||
@@ -70,7 +70,7 @@ invalid_input:
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_y_stride_pix(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int alignment, stride = 0;
|
||||
|
||||
@@ -105,7 +105,7 @@ invalid_input:
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_uv_stride_bytes(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int alignment, stride = 0;
|
||||
|
||||
@@ -122,7 +122,7 @@ static inline unsigned int video_uv_stride_bytes(unsigned int colorformat,
|
||||
case MSM_VIDC_FMT_TP10C:
|
||||
alignment = 256;
|
||||
stride = MSM_MEDIA_ALIGN(width, 192);
|
||||
stride = MSM_MEDIA_ALIGN(stride * 4/3, alignment);
|
||||
stride = MSM_MEDIA_ALIGN(stride * 4 / 3, alignment);
|
||||
break;
|
||||
case MSM_VIDC_FMT_P010:
|
||||
alignment = 256;
|
||||
@@ -143,7 +143,7 @@ invalid_input:
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_uv_stride_pix(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int alignment, stride = 0;
|
||||
|
||||
@@ -177,7 +177,7 @@ invalid_input:
|
||||
* Interlaced: (height+1)>>1
|
||||
*/
|
||||
static inline unsigned int video_y_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
unsigned int height)
|
||||
{
|
||||
unsigned int alignment, sclines = 0;
|
||||
|
||||
@@ -210,7 +210,7 @@ invalid_input:
|
||||
* Interlaced: (height+1)>>1
|
||||
*/
|
||||
static inline unsigned int video_uv_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
unsigned int height)
|
||||
{
|
||||
unsigned int alignment, sclines = 0;
|
||||
|
||||
@@ -231,7 +231,7 @@ static inline unsigned int video_uv_scanlines(unsigned int colorformat,
|
||||
goto invalid_input;
|
||||
}
|
||||
|
||||
sclines = MSM_MEDIA_ALIGN((height+1)>>1, alignment);
|
||||
sclines = MSM_MEDIA_ALIGN((height + 1) >> 1, alignment);
|
||||
|
||||
invalid_input:
|
||||
return sclines;
|
||||
@@ -245,7 +245,7 @@ invalid_input:
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_y_meta_stride(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
int y_tile_width = 0, y_meta_stride = 0;
|
||||
|
||||
@@ -278,7 +278,7 @@ invalid_input:
|
||||
* Interlaced: (height+1)>>1
|
||||
*/
|
||||
static inline unsigned int video_y_meta_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
unsigned int height)
|
||||
{
|
||||
int y_tile_height = 0, y_meta_scanlines = 0;
|
||||
|
||||
@@ -311,7 +311,7 @@ invalid_input:
|
||||
* Interlaced: width
|
||||
*/
|
||||
static inline unsigned int video_uv_meta_stride(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
int uv_tile_width = 0, uv_meta_stride = 0;
|
||||
|
||||
@@ -329,7 +329,7 @@ static inline unsigned int video_uv_meta_stride(unsigned int colorformat,
|
||||
goto invalid_input;
|
||||
}
|
||||
|
||||
uv_meta_stride = MSM_MEDIA_ROUNDUP((width+1)>>1, uv_tile_width);
|
||||
uv_meta_stride = MSM_MEDIA_ROUNDUP((width + 1) >> 1, uv_tile_width);
|
||||
uv_meta_stride = MSM_MEDIA_ALIGN(uv_meta_stride, 64);
|
||||
|
||||
invalid_input:
|
||||
@@ -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;
|
||||
|
||||
@@ -362,15 +362,15 @@ static inline unsigned int video_uv_meta_scanlines(
|
||||
goto invalid_input;
|
||||
}
|
||||
|
||||
uv_meta_scanlines = MSM_MEDIA_ROUNDUP((height+1)>>1, uv_tile_height);
|
||||
uv_meta_scanlines = MSM_MEDIA_ROUNDUP((height + 1) >> 1, uv_tile_height);
|
||||
uv_meta_scanlines = MSM_MEDIA_ALIGN(uv_meta_scanlines, 16);
|
||||
|
||||
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;
|
||||
|
||||
@@ -393,7 +393,7 @@ invalid_input:
|
||||
}
|
||||
|
||||
static inline unsigned int video_rgb_stride_pix(unsigned int colorformat,
|
||||
unsigned int width)
|
||||
unsigned int width)
|
||||
{
|
||||
unsigned int bpp = 4;
|
||||
|
||||
@@ -401,7 +401,7 @@ static inline unsigned int video_rgb_stride_pix(unsigned int colorformat,
|
||||
}
|
||||
|
||||
static inline unsigned int video_rgb_scanlines(unsigned int colorformat,
|
||||
unsigned int height)
|
||||
unsigned int height)
|
||||
{
|
||||
unsigned int alignment = 0, scanlines = 0;
|
||||
|
||||
@@ -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 {
|
||||
@@ -526,21 +529,23 @@ static inline unsigned int video_buffer_size(unsigned int colorformat,
|
||||
pix_height <= INTERLACE_HEIGHT_MAX &&
|
||||
(pix_height * pix_width) / 256 <= INTERLACE_MB_PER_FRAME_MAX) {
|
||||
y_sclines =
|
||||
video_y_scanlines(colorformat, (pix_height+1)>>1);
|
||||
video_y_scanlines(colorformat, (pix_height + 1) >> 1);
|
||||
y_ubwc_plane =
|
||||
MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096);
|
||||
uv_sclines =
|
||||
video_uv_scanlines(colorformat, (pix_height+1)>>1);
|
||||
video_uv_scanlines(colorformat, (pix_height + 1) >> 1);
|
||||
uv_ubwc_plane =
|
||||
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);
|
||||
video_y_meta_scanlines(colorformat, (pix_height + 1) >> 1);
|
||||
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);
|
||||
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,24 +575,25 @@ 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;
|
||||
break;
|
||||
case MSM_VIDC_FMT_RGBA8888C:
|
||||
rgb_ubwc_plane = MSM_MEDIA_ALIGN(rgb_stride * rgb_scanlines,
|
||||
4096);
|
||||
4096);
|
||||
rgb_meta_stride = video_rgb_meta_stride(colorformat, pix_width);
|
||||
rgb_meta_scanlines = video_rgb_meta_scanlines(colorformat,
|
||||
pix_height);
|
||||
pix_height);
|
||||
rgb_meta_plane = MSM_MEDIA_ALIGN(rgb_meta_stride *
|
||||
rgb_meta_scanlines, 4096);
|
||||
rgb_meta_scanlines, 4096);
|
||||
size = rgb_ubwc_plane + rgb_meta_plane;
|
||||
break;
|
||||
case MSM_VIDC_FMT_RGBA8888:
|
||||
|
@@ -21,7 +21,7 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f);
|
||||
int msm_vdec_s_selection(struct msm_vidc_inst *inst, struct v4l2_selection *s);
|
||||
int msm_vdec_g_selection(struct msm_vidc_inst *inst, struct v4l2_selection *s);
|
||||
int msm_vdec_subscribe_event(struct msm_vidc_inst *inst,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_vdec_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f);
|
||||
int msm_vdec_inst_init(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_inst_deinit(struct msm_vidc_inst *inst);
|
||||
@@ -31,10 +31,10 @@ int msm_vdec_output_port_settings_change(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_stop_cmd(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_start_cmd(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_handle_release_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf);
|
||||
struct msm_vidc_buffer *buf);
|
||||
int msm_vdec_set_num_comv(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_subscribe_metadata(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port);
|
||||
enum msm_vidc_port_type port);
|
||||
int msm_vdec_get_input_internal_buffers(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_create_input_internal_buffers(struct msm_vidc_inst *inst);
|
||||
int msm_vdec_queue_input_internal_buffers(struct msm_vidc_inst *inst);
|
||||
|
@@ -24,11 +24,11 @@ int msm_venc_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f);
|
||||
int msm_venc_s_selection(struct msm_vidc_inst *inst, struct v4l2_selection *s);
|
||||
int msm_venc_g_selection(struct msm_vidc_inst *inst, struct v4l2_selection *s);
|
||||
int msm_venc_s_param(struct msm_vidc_inst *inst,
|
||||
struct v4l2_streamparm *s_parm);
|
||||
struct v4l2_streamparm *s_parm);
|
||||
int msm_venc_g_param(struct msm_vidc_inst *inst,
|
||||
struct v4l2_streamparm *s_parm);
|
||||
struct v4l2_streamparm *s_parm);
|
||||
int msm_venc_subscribe_event(struct msm_vidc_inst *inst,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_venc_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f);
|
||||
int msm_venc_inst_init(struct msm_vidc_inst *inst);
|
||||
int msm_venc_inst_deinit(struct msm_vidc_inst *inst);
|
||||
|
@@ -30,11 +30,11 @@ int msm_vidc_reqbufs(struct msm_vidc_inst *inst, struct v4l2_requestbuffers *b);
|
||||
int msm_vidc_querybuf(struct msm_vidc_inst *inst, struct v4l2_buffer *b);
|
||||
int msm_vidc_create_bufs(struct msm_vidc_inst *inst, struct v4l2_create_buffers *b);
|
||||
int msm_vidc_prepare_buf(struct msm_vidc_inst *inst, struct media_device *mdev,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_vidc_release_buffer(struct msm_vidc_inst *inst, int buffer_type,
|
||||
unsigned int buffer_index);
|
||||
unsigned int buffer_index);
|
||||
int msm_vidc_qbuf(struct msm_vidc_inst *inst, struct media_device *mdev,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_vidc_dqbuf(struct msm_vidc_inst *inst, struct v4l2_buffer *b);
|
||||
int msm_vidc_streamon(struct msm_vidc_inst *inst, enum v4l2_buf_type i);
|
||||
int msm_vidc_query_ctrl(struct msm_vidc_inst *inst, struct v4l2_queryctrl *ctrl);
|
||||
@@ -44,11 +44,11 @@ int msm_vidc_try_cmd(struct msm_vidc_inst *inst, union msm_v4l2_cmd *cmd);
|
||||
int msm_vidc_start_cmd(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_stop_cmd(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_poll(struct msm_vidc_inst *inst, struct file *filp,
|
||||
struct poll_table_struct *pt);
|
||||
struct poll_table_struct *pt);
|
||||
int msm_vidc_subscribe_event(struct msm_vidc_inst *inst,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_vidc_unsubscribe_event(struct msm_vidc_inst *inst,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_vidc_dqevent(struct msm_vidc_inst *inst, struct v4l2_event *event);
|
||||
int msm_vidc_g_crop(struct msm_vidc_inst *inst, struct v4l2_crop *a);
|
||||
int msm_vidc_enum_framesizes(struct msm_vidc_inst *inst, struct v4l2_frmsizeenum *fsize);
|
||||
|
@@ -23,7 +23,7 @@ u32 msm_vidc_output_min_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_input_extra_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_output_extra_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_internal_buffer_count(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
u32 msm_vidc_decoder_input_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_decoder_output_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_decoder_input_meta_size(struct msm_vidc_inst *inst);
|
||||
@@ -33,6 +33,6 @@ u32 msm_vidc_encoder_output_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_encoder_input_meta_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_encoder_output_meta_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_enc_delivery_mode_based_output_buf_size(struct msm_vidc_inst *inst,
|
||||
u32 frame_size);
|
||||
u32 frame_size);
|
||||
|
||||
#endif // __H_MSM_VIDC_BUFFER_H__
|
||||
|
@@ -20,7 +20,7 @@ int msm_vidc_adjust_v4l2_properties(struct msm_vidc_inst *inst);
|
||||
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 cap_id);
|
||||
enum msm_vidc_inst_capability_type
|
||||
msm_vidc_get_cap_id(struct msm_vidc_inst *inst, u32 id);
|
||||
#endif
|
||||
|
@@ -20,7 +20,7 @@ struct msm_vidc_core;
|
||||
|
||||
#define call_venus_op(d, op, ...) \
|
||||
(((d) && (d)->venus_ops && (d)->venus_ops->op) ? \
|
||||
((d)->venus_ops->op(__VA_ARGS__)):0)
|
||||
((d)->venus_ops->op(__VA_ARGS__)) : 0)
|
||||
|
||||
struct msm_vidc_venus_ops {
|
||||
int (*boot_firmware)(struct msm_vidc_core *core);
|
||||
@@ -76,8 +76,8 @@ struct msm_vidc_core {
|
||||
char fw_version[MAX_NAME_LENGTH];
|
||||
enum msm_vidc_core_state state;
|
||||
int (*state_handle)(struct msm_vidc_core *core,
|
||||
enum msm_vidc_core_event_type type,
|
||||
struct msm_vidc_event_data *data);
|
||||
enum msm_vidc_core_event_type type,
|
||||
struct msm_vidc_event_data *data);
|
||||
enum msm_vidc_core_sub_state sub_state;
|
||||
char sub_state_name[MAX_NAME_LENGTH];
|
||||
struct mutex lock;
|
||||
@@ -88,7 +88,7 @@ struct msm_vidc_core {
|
||||
u32 reg_count;
|
||||
u32 enc_codecs_count;
|
||||
u32 dec_codecs_count;
|
||||
struct msm_vidc_core_capability capabilities[CORE_CAP_MAX+1];
|
||||
struct msm_vidc_core_capability capabilities[CORE_CAP_MAX + 1];
|
||||
struct msm_vidc_inst_capability *inst_caps;
|
||||
struct msm_vidc_mem_addr sfr;
|
||||
struct msm_vidc_mem_addr iface_q_table;
|
||||
|
@@ -187,10 +187,10 @@ enum msm_vidc_bug_on_error {
|
||||
struct dentry *msm_vidc_debugfs_init_drv(void);
|
||||
struct dentry *msm_vidc_debugfs_init_core(struct msm_vidc_core *core);
|
||||
struct dentry *msm_vidc_debugfs_init_inst(struct msm_vidc_inst *inst,
|
||||
struct dentry *parent);
|
||||
struct dentry *parent);
|
||||
void msm_vidc_debugfs_deinit_inst(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_debugfs_event e);
|
||||
enum msm_vidc_debugfs_event e);
|
||||
int msm_vidc_check_ratelimit(void);
|
||||
void msm_vidc_show_stats(struct msm_vidc_inst *inst);
|
||||
|
||||
|
@@ -406,47 +406,48 @@ 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);
|
||||
struct vb2_buffer *vb2);
|
||||
enum msm_vidc_codec_type v4l2_codec_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 v4l2_codec, const char *func);
|
||||
u32 v4l2_codec, const char *func);
|
||||
u32 v4l2_codec_from_driver(struct msm_vidc_inst *inst, enum msm_vidc_codec_type codec,
|
||||
const char *func);
|
||||
const char *func);
|
||||
enum msm_vidc_colorformat_type v4l2_colorformat_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 colorformat, const char *func);
|
||||
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_primaries, const char *func);
|
||||
u32 v4l2_color_primaries_from_driver(struct msm_vidc_inst *inst,
|
||||
u32 vidc_color_primaries, const char *func);
|
||||
u32 vidc_color_primaries, const char *func);
|
||||
u32 v4l2_transfer_char_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 v4l2_transfer_char, const char *func);
|
||||
u32 v4l2_transfer_char, const char *func);
|
||||
u32 v4l2_transfer_char_from_driver(struct msm_vidc_inst *inst,
|
||||
u32 vidc_transfer_char, const char *func);
|
||||
u32 vidc_transfer_char, const char *func);
|
||||
u32 v4l2_matrix_coeff_to_driver(struct msm_vidc_inst *inst,
|
||||
u32 v4l2_matrix_coeff, const char *func);
|
||||
u32 v4l2_matrix_coeff, const char *func);
|
||||
u32 v4l2_matrix_coeff_from_driver(struct msm_vidc_inst *inst,
|
||||
u32 vidc_matrix_coeff, const char *func);
|
||||
u32 vidc_matrix_coeff, const char *func);
|
||||
int v4l2_type_to_driver_port(struct msm_vidc_inst *inst, u32 type,
|
||||
const char *func);
|
||||
const char *func);
|
||||
const char *allow_name(enum msm_vidc_allow allow);
|
||||
int msm_vidc_create_internal_buffer(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type, u32 index);
|
||||
enum msm_vidc_buffer_type buffer_type, u32 index);
|
||||
int msm_vidc_get_internal_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int msm_vidc_create_internal_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int msm_vidc_alloc_and_queue_session_internal_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int msm_vidc_release_internal_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf);
|
||||
struct msm_vidc_buffer *buf);
|
||||
int msm_vidc_remove_dangling_session(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_remove_session(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_add_session(struct msm_vidc_inst *inst);
|
||||
@@ -455,15 +456,17 @@ int msm_vidc_session_set_codec(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_set_secure_mode(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_set_default_header(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_streamoff(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port);
|
||||
enum msm_vidc_port_type port);
|
||||
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 clear_sub_states,
|
||||
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,12 +478,13 @@ 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);
|
||||
u64 trigger_ssr_val);
|
||||
void msm_vidc_ssr_handler(struct work_struct *work);
|
||||
int msm_vidc_trigger_stability(struct msm_vidc_core *core,
|
||||
u64 trigger_stability_val);
|
||||
u64 trigger_stability_val);
|
||||
void msm_vidc_stability_handler(struct work_struct *work);
|
||||
int cancel_stability_work_sync(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_fw_unload_handler(struct work_struct *work);
|
||||
@@ -492,48 +496,49 @@ 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,
|
||||
const char *func);
|
||||
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);
|
||||
struct vb2_buffer *vb2);
|
||||
int msm_vidc_allocate_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buf_type, u32 num_buffers);
|
||||
enum msm_vidc_buffer_type buf_type, u32 num_buffers);
|
||||
int msm_vidc_free_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buf_type);
|
||||
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);
|
||||
struct vb2_buffer *vb2);
|
||||
int msm_vidc_queue_deferred_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buf_type);
|
||||
enum msm_vidc_buffer_type buf_type);
|
||||
int msm_vidc_destroy_internal_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer);
|
||||
struct msm_vidc_buffer *buffer);
|
||||
void msm_vidc_destroy_buffers(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_flush_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type type);
|
||||
enum msm_vidc_buffer_type type);
|
||||
int msm_vidc_flush_read_only_buffers(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type type);
|
||||
enum msm_vidc_buffer_type type);
|
||||
struct msm_vidc_buffer *get_meta_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *vbuf);
|
||||
struct msm_vidc_buffer *vbuf);
|
||||
struct msm_vidc_inst *get_inst_ref(struct msm_vidc_core *core,
|
||||
struct msm_vidc_inst *instance);
|
||||
struct msm_vidc_inst *instance);
|
||||
struct msm_vidc_inst *get_inst(struct msm_vidc_core *core,
|
||||
u32 session_id);
|
||||
u32 session_id);
|
||||
void put_inst(struct msm_vidc_inst *inst);
|
||||
bool msm_vidc_allow_metadata_delivery(struct msm_vidc_inst *inst,
|
||||
u32 cap_id, u32 port);
|
||||
u32 cap_id, u32 port);
|
||||
bool msm_vidc_allow_metadata_subscription(struct msm_vidc_inst *inst,
|
||||
u32 cap_id, u32 port);
|
||||
u32 cap_id, u32 port);
|
||||
bool msm_vidc_allow_property(struct msm_vidc_inst *inst, u32 hfi_id);
|
||||
enum msm_vidc_allow msm_vidc_allow_input_psc(struct msm_vidc_inst *inst);
|
||||
bool msm_vidc_allow_drain_last_flag(struct msm_vidc_inst *inst);
|
||||
@@ -549,7 +554,7 @@ int msm_vidc_process_resume(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_process_streamon_input(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_process_streamon_output(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_process_stop_done(struct msm_vidc_inst *inst,
|
||||
enum signal_session_response signal_type);
|
||||
enum signal_session_response signal_type);
|
||||
int msm_vidc_process_drain_done(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_process_drain_last_flag(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_process_psc_last_flag(struct msm_vidc_inst *inst);
|
||||
@@ -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);
|
||||
@@ -589,22 +595,22 @@ int msm_vidc_ts_reorder_get_first_timestamp(struct msm_vidc_inst *inst, u64 *tim
|
||||
int msm_vidc_ts_reorder_flush(struct msm_vidc_inst *inst);
|
||||
const char *buf_name(enum msm_vidc_buffer_type type);
|
||||
bool res_is_greater_than(u32 width, u32 height,
|
||||
u32 ref_width, u32 ref_height);
|
||||
u32 ref_width, u32 ref_height);
|
||||
bool res_is_greater_than_or_equal_to(u32 width, u32 height,
|
||||
u32 ref_width, u32 ref_height);
|
||||
u32 ref_width, u32 ref_height);
|
||||
bool res_is_less_than(u32 width, u32 height,
|
||||
u32 ref_width, u32 ref_height);
|
||||
u32 ref_width, u32 ref_height);
|
||||
bool res_is_less_than_or_equal_to(u32 width, u32 height,
|
||||
u32 ref_width, u32 ref_height);
|
||||
u32 ref_width, u32 ref_height);
|
||||
bool is_hevc_10bit_decode_session(struct msm_vidc_inst *inst);
|
||||
int signal_session_msg_receipt(struct msm_vidc_inst *inst,
|
||||
enum signal_session_response cmd);
|
||||
enum signal_session_response cmd);
|
||||
int msm_vidc_get_properties(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_update_input_rate(struct msm_vidc_inst *inst, u64 time_us);
|
||||
int msm_vidc_add_buffer_stats(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf, u64 timestamp);
|
||||
struct msm_vidc_buffer *buf, u64 timestamp);
|
||||
int msm_vidc_remove_buffer_stats(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf, u64 timestamp);
|
||||
struct msm_vidc_buffer *buf, u64 timestamp);
|
||||
int msm_vidc_flush_buffer_stats(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_get_input_rate(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_get_frame_rate(struct msm_vidc_inst *inst);
|
||||
@@ -612,11 +618,12 @@ int msm_vidc_get_operating_rate(struct msm_vidc_inst *inst);
|
||||
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,
|
||||
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 vb2_buffer *vb2);
|
||||
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);
|
||||
|
||||
#endif // _MSM_VIDC_DRIVER_H_
|
||||
|
||||
|
@@ -21,11 +21,11 @@ struct msm_vidc_fence_ops {
|
||||
int (*fence_deregister)(struct msm_vidc_core *core);
|
||||
struct msm_vidc_fence *(*fence_create)(struct msm_vidc_inst *inst);
|
||||
int (*fence_create_fd)(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_fence *fence);
|
||||
struct msm_vidc_fence *fence);
|
||||
void (*fence_destroy)(struct msm_vidc_inst *inst,
|
||||
u64 fence_id);
|
||||
u64 fence_id);
|
||||
int (*fence_signal)(struct msm_vidc_inst *inst,
|
||||
u64 fence_id);
|
||||
u64 fence_id);
|
||||
void (*fence_recover)(struct msm_vidc_core *core);
|
||||
};
|
||||
|
||||
|
@@ -21,7 +21,7 @@ struct msm_vidc_inst;
|
||||
struct msm_vidc_session_ops {
|
||||
u64 (*calc_freq)(struct msm_vidc_inst *inst, u32 data_size);
|
||||
int (*calc_bw)(struct msm_vidc_inst *inst,
|
||||
struct vidc_bus_vote_data *vote_data);
|
||||
struct vidc_bus_vote_data *vote_data);
|
||||
int (*decide_work_route)(struct msm_vidc_inst *inst);
|
||||
int (*decide_work_mode)(struct msm_vidc_inst *inst);
|
||||
int (*decide_quality_mode)(struct msm_vidc_inst *inst);
|
||||
@@ -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;
|
||||
@@ -127,7 +128,7 @@ struct msm_vidc_inst {
|
||||
struct msm_vidc_debug debug;
|
||||
struct debug_buf_count debug_count;
|
||||
struct msm_vidc_statistics stats;
|
||||
struct msm_vidc_inst_cap capabilities[INST_CAP_MAX+1];
|
||||
struct msm_vidc_inst_cap capabilities[INST_CAP_MAX + 1];
|
||||
struct completion completions[MAX_SIGNAL];
|
||||
struct msm_vidc_fence_context fence_context;
|
||||
bool active;
|
||||
|
@@ -156,7 +156,7 @@ enum msm_vidc_metadata_bits {
|
||||
#define VIDC_IFACEQ_MIN_PKT_SIZE 8
|
||||
#define VIDC_IFACEQ_VAR_SMALL_PKT_SIZE 100
|
||||
#define VIDC_IFACEQ_VAR_LARGE_PKT_SIZE 512
|
||||
#define VIDC_IFACEQ_VAR_HUGE_PKT_SIZE (1024*4)
|
||||
#define VIDC_IFACEQ_VAR_HUGE_PKT_SIZE (1024 * 4)
|
||||
|
||||
#define NUM_MBS_PER_SEC(__height, __width, __fps) \
|
||||
(NUM_MBS_PER_FRAME(__height, __width) * __fps)
|
||||
@@ -672,15 +672,15 @@ struct msm_vidc_inst_cap {
|
||||
enum msm_vidc_inst_capability_flags flags;
|
||||
enum msm_vidc_inst_capability_type children[MAX_CAP_CHILDREN];
|
||||
int (*adjust)(void *inst,
|
||||
struct v4l2_ctrl *ctrl);
|
||||
struct v4l2_ctrl *ctrl);
|
||||
int (*set)(void *inst,
|
||||
enum msm_vidc_inst_capability_type cap_id);
|
||||
enum msm_vidc_inst_capability_type cap_id);
|
||||
};
|
||||
|
||||
struct msm_vidc_inst_capability {
|
||||
enum msm_vidc_domain_type domain;
|
||||
enum msm_vidc_codec_type codec;
|
||||
struct msm_vidc_inst_cap cap[INST_CAP_MAX+1];
|
||||
struct msm_vidc_inst_cap cap[INST_CAP_MAX + 1];
|
||||
};
|
||||
|
||||
struct msm_vidc_core_capability {
|
||||
@@ -1046,7 +1046,7 @@ struct msm_vidc_stability {
|
||||
};
|
||||
|
||||
struct msm_vidc_sfr {
|
||||
u32 bufSize;
|
||||
u32 buf_size;
|
||||
u8 rg_data[1];
|
||||
};
|
||||
|
||||
|
@@ -46,7 +46,7 @@ struct msm_memory_pool {
|
||||
};
|
||||
|
||||
void *msm_vidc_pool_alloc(struct msm_vidc_inst *inst,
|
||||
enum msm_memory_pool_type type);
|
||||
enum msm_memory_pool_type type);
|
||||
void msm_vidc_pool_free(struct msm_vidc_inst *inst, void *vidc_buf);
|
||||
int msm_vidc_pools_init(struct msm_vidc_inst *inst);
|
||||
void msm_vidc_pools_deinit(struct msm_vidc_inst *inst);
|
||||
@@ -57,33 +57,35 @@ void msm_vidc_pools_deinit(struct msm_vidc_inst *inst);
|
||||
|
||||
struct msm_vidc_memory_ops {
|
||||
struct dma_buf *(*dma_buf_get)(struct msm_vidc_inst *inst,
|
||||
int fd);
|
||||
int fd);
|
||||
void (*dma_buf_put)(struct msm_vidc_inst *inst,
|
||||
struct dma_buf *dmabuf);
|
||||
struct dma_buf *dmabuf);
|
||||
void (*dma_buf_put_completely)(struct msm_vidc_inst *inst,
|
||||
struct msm_memory_dmabuf *buf);
|
||||
struct msm_memory_dmabuf *buf);
|
||||
struct dma_buf_attachment *(*dma_buf_attach)(struct msm_vidc_core *core,
|
||||
struct dma_buf *dbuf, struct device *dev);
|
||||
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 dma_buf_attachment *attach);
|
||||
struct dma_buf_attachment *attach);
|
||||
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);
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*memory_unmap_free)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*mem_dma_map_page)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*mem_dma_unmap_page)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
struct msm_vidc_mem *mem);
|
||||
u32 (*buffer_region)(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
int (*iommu_map)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
struct msm_vidc_mem *mem);
|
||||
int (*iommu_unmap)(struct msm_vidc_core *core,
|
||||
struct msm_vidc_mem *mem);
|
||||
struct msm_vidc_mem *mem);
|
||||
};
|
||||
|
||||
const struct msm_vidc_memory_ops *get_mem_ops(void);
|
||||
|
@@ -80,14 +80,16 @@ 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,
|
||||
enum msm_vidc_core_sub_state sub_state);
|
||||
enum msm_vidc_core_sub_state sub_state);
|
||||
const char *core_state_name(enum msm_vidc_core_state state);
|
||||
const char *core_sub_state_name(enum msm_vidc_core_sub_state sub_state);
|
||||
|
||||
@@ -95,16 +97,19 @@ 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 clear_sub_state,
|
||||
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);
|
||||
bool is_sub_state(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_sub_state sub_state);
|
||||
enum msm_vidc_sub_state sub_state);
|
||||
|
||||
#endif // _MSM_VIDC_STATE_H_
|
||||
|
@@ -16,61 +16,61 @@
|
||||
int msm_v4l2_open(struct file *filp);
|
||||
int msm_v4l2_close(struct file *filp);
|
||||
int msm_v4l2_querycap(struct file *filp, void *fh,
|
||||
struct v4l2_capability *cap);
|
||||
struct v4l2_capability *cap);
|
||||
int msm_v4l2_enum_fmt(struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
struct v4l2_fmtdesc *f);
|
||||
int msm_v4l2_try_fmt(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
struct v4l2_format *f);
|
||||
int msm_v4l2_s_fmt(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
struct v4l2_format *f);
|
||||
int msm_v4l2_g_fmt(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
struct v4l2_format *f);
|
||||
int msm_v4l2_s_selection(struct file *file, void *fh,
|
||||
struct v4l2_selection *s);
|
||||
struct v4l2_selection *s);
|
||||
int msm_v4l2_g_selection(struct file *file, void *fh,
|
||||
struct v4l2_selection *s);
|
||||
struct v4l2_selection *s);
|
||||
int msm_v4l2_s_parm(struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
struct v4l2_streamparm *a);
|
||||
int msm_v4l2_g_parm(struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
struct v4l2_streamparm *a);
|
||||
int msm_v4l2_reqbufs(struct file *file, void *fh,
|
||||
struct v4l2_requestbuffers *b);
|
||||
struct v4l2_requestbuffers *b);
|
||||
int msm_v4l2_querybuf(struct file *file, void *fh,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_v4l2_create_bufs(struct file *filp, void *fh,
|
||||
struct v4l2_create_buffers *b);
|
||||
struct v4l2_create_buffers *b);
|
||||
int msm_v4l2_prepare_buf(struct file *filp, void *fh,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_v4l2_qbuf(struct file *file, void *fh,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_v4l2_dqbuf(struct file *file, void *fh,
|
||||
struct v4l2_buffer *b);
|
||||
struct v4l2_buffer *b);
|
||||
int msm_v4l2_streamon(struct file *file, void *fh,
|
||||
enum v4l2_buf_type i);
|
||||
enum v4l2_buf_type i);
|
||||
int msm_v4l2_streamoff(struct file *file, void *fh,
|
||||
enum v4l2_buf_type i);
|
||||
enum v4l2_buf_type i);
|
||||
int msm_v4l2_subscribe_event(struct v4l2_fh *fh,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_v4l2_unsubscribe_event(struct v4l2_fh *fh,
|
||||
const struct v4l2_event_subscription *sub);
|
||||
const struct v4l2_event_subscription *sub);
|
||||
int msm_v4l2_try_decoder_cmd(struct file *file, void *fh,
|
||||
struct v4l2_decoder_cmd *enc);
|
||||
struct v4l2_decoder_cmd *enc);
|
||||
int msm_v4l2_decoder_cmd(struct file *file, void *fh,
|
||||
struct v4l2_decoder_cmd *dec);
|
||||
struct v4l2_decoder_cmd *dec);
|
||||
int msm_v4l2_try_encoder_cmd(struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *enc);
|
||||
struct v4l2_encoder_cmd *enc);
|
||||
int msm_v4l2_encoder_cmd(struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *enc);
|
||||
struct v4l2_encoder_cmd *enc);
|
||||
int msm_v4l2_enum_framesizes(struct file *file, void *fh,
|
||||
struct v4l2_frmsizeenum *fsize);
|
||||
struct v4l2_frmsizeenum *fsize);
|
||||
int msm_v4l2_enum_frameintervals(struct file *file, void *fh,
|
||||
struct v4l2_frmivalenum *fival);
|
||||
struct v4l2_frmivalenum *fival);
|
||||
int msm_v4l2_queryctrl(struct file *file, void *fh,
|
||||
struct v4l2_queryctrl *ctrl);
|
||||
struct v4l2_queryctrl *ctrl);
|
||||
int msm_v4l2_querymenu(struct file *file, void *fh,
|
||||
struct v4l2_querymenu *qmenu);
|
||||
struct v4l2_querymenu *qmenu);
|
||||
unsigned int msm_v4l2_poll(struct file *filp,
|
||||
struct poll_table_struct *pt);
|
||||
struct poll_table_struct *pt);
|
||||
int msm_v4l2_request_validate(struct media_request *req);
|
||||
void msm_v4l2_request_queue(struct media_request *req);
|
||||
void msm_v4l2_m2m_device_run(void *priv);
|
||||
|
@@ -12,20 +12,22 @@
|
||||
#include "msm_vidc_inst.h"
|
||||
|
||||
struct vb2_queue *msm_vidc_get_vb2q(struct msm_vidc_inst *inst,
|
||||
u32 type, const char *func);
|
||||
u32 type, const char *func);
|
||||
|
||||
/* vb2_mem_ops */
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||
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);
|
||||
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);
|
||||
#else
|
||||
void *msm_vb2_alloc(struct vb2_buffer *vb, struct device *dev,
|
||||
unsigned long size);
|
||||
unsigned long size);
|
||||
void *msm_vb2_attach_dmabuf(struct vb2_buffer *vb, struct device *dev,
|
||||
struct dma_buf *dbuf, unsigned long size);
|
||||
struct dma_buf *dbuf, unsigned long size);
|
||||
#endif
|
||||
|
||||
void msm_vb2_put(void *buf_priv);
|
||||
@@ -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);
|
||||
|
@@ -258,13 +258,13 @@ struct msm_vidc_resources_ops {
|
||||
|
||||
int (*reset_bridge)(struct msm_vidc_core *core);
|
||||
int (*reset_control_acquire)(struct msm_vidc_core *core,
|
||||
const char *name);
|
||||
const char *name);
|
||||
int (*reset_control_release)(struct msm_vidc_core *core,
|
||||
const char *name);
|
||||
const char *name);
|
||||
int (*reset_control_assert)(struct msm_vidc_core *core,
|
||||
const char *name);
|
||||
const char *name);
|
||||
int (*reset_control_deassert)(struct msm_vidc_core *core,
|
||||
const char *name);
|
||||
const char *name);
|
||||
|
||||
int (*gdsc_init)(struct msm_vidc_core *core);
|
||||
int (*gdsc_on)(struct msm_vidc_core *core, const char *name);
|
||||
@@ -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);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include "msm_vidc_inst.h"
|
||||
#include "msm_vidc_core.h"
|
||||
|
||||
#define VIDC_MAX_PC_SKIP_COUNT 10
|
||||
#define VIDC_MAX_PC_SKIP_COUNT 10
|
||||
|
||||
struct vidc_buffer_addr_info {
|
||||
enum msm_vidc_buffer_type buffer_type;
|
||||
@@ -34,26 +34,30 @@ struct hfi_pending_packet {
|
||||
};
|
||||
|
||||
int __strict_check(struct msm_vidc_core *core,
|
||||
const char *function);
|
||||
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 pkt_type, u32 flags, u32 port,
|
||||
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,
|
||||
void *payload, u32 payload_size);
|
||||
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);
|
||||
struct msm_vidc_buffer *buffer);
|
||||
int venus_hfi_start(struct msm_vidc_inst *inst, enum msm_vidc_port_type port);
|
||||
int venus_hfi_stop(struct msm_vidc_inst *inst, enum msm_vidc_port_type port);
|
||||
int venus_hfi_session_close(struct msm_vidc_inst *inst);
|
||||
int venus_hfi_session_open(struct msm_vidc_inst *inst);
|
||||
int venus_hfi_session_pause(struct msm_vidc_inst *inst, enum msm_vidc_port_type port);
|
||||
int venus_hfi_session_resume(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port, u32 payload);
|
||||
enum msm_vidc_port_type port, u32 payload);
|
||||
int venus_hfi_session_drain(struct msm_vidc_inst *inst, enum msm_vidc_port_type port);
|
||||
int venus_hfi_session_set_codec(struct msm_vidc_inst *inst);
|
||||
int venus_hfi_session_set_secure_mode(struct msm_vidc_inst *inst);
|
||||
@@ -62,19 +66,20 @@ int venus_hfi_core_deinit(struct msm_vidc_core *core, bool force);
|
||||
int venus_hfi_noc_error_info(struct msm_vidc_core *core);
|
||||
int venus_hfi_suspend(struct msm_vidc_core *core);
|
||||
int venus_hfi_trigger_ssr(struct msm_vidc_core *core, u32 type,
|
||||
u32 client_id, u32 addr);
|
||||
u32 client_id, u32 addr);
|
||||
int venus_hfi_trigger_stability(struct msm_vidc_inst *inst, u32 type,
|
||||
u32 client_id, u32 val);
|
||||
u32 client_id, u32 val);
|
||||
int venus_hfi_reserve_hardware(struct msm_vidc_inst *inst, u32 duration);
|
||||
int venus_hfi_scale_clocks(struct msm_vidc_inst *inst, u64 freq);
|
||||
int venus_hfi_scale_buses(struct msm_vidc_inst *inst, u64 bw_ddr, u64 bw_llcc);
|
||||
int venus_hfi_set_ir_period(struct msm_vidc_inst *inst, u32 ir_type,
|
||||
enum msm_vidc_inst_capability_type cap_id);
|
||||
enum msm_vidc_inst_capability_type cap_id);
|
||||
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_
|
||||
|
@@ -10,17 +10,16 @@
|
||||
#include "hfi_packet.h"
|
||||
|
||||
int handle_response(struct msm_vidc_core *core,
|
||||
void *response);
|
||||
void *response);
|
||||
int validate_packet(u8 *response_pkt, u8 *core_resp_pkt,
|
||||
u32 core_resp_pkt_size, const char *func);
|
||||
u32 core_resp_pkt_size, const char *func);
|
||||
bool is_valid_port(struct msm_vidc_inst *inst, u32 port,
|
||||
const char *func);
|
||||
const char *func);
|
||||
bool is_valid_hfi_buffer_type(struct msm_vidc_inst *inst,
|
||||
u32 buffer_type, const char *func);
|
||||
u32 buffer_type, const char *func);
|
||||
int handle_system_error(struct msm_vidc_core *core,
|
||||
struct hfi_packet *pkt);
|
||||
struct hfi_packet *pkt);
|
||||
int handle_release_output_buffer(struct msm_vidc_inst *inst,
|
||||
struct hfi_buffer *buffer);
|
||||
|
||||
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)
|
||||
|
Referência em uma nova issue
Block a user