Merge "video-driver: kept blank line after declarations"
Esse commit está contido em:

commit de
Gerrit - the friendly Code Review server

commit
b941cfd415
@@ -345,6 +345,7 @@ static int calculate_vpp_min_freq(struct api_calculation_input codec_input,
|
||||
if (codec_input.vsp_vpp_mode == CODEC_VSPVPP_MODE_2S) {
|
||||
/* FW overhead, convert FW cycles to impact to one pipe */
|
||||
u64 decoder_vpp_fw_overhead = 0;
|
||||
|
||||
decoder_vpp_fw_overhead =
|
||||
DIV_ROUND_UP((DECODER_VPP_FW_OVERHEAD_KALAMA * 10 *
|
||||
codec_input.frame_rate), 15);
|
||||
@@ -407,6 +408,7 @@ static int calculate_vpp_min_freq(struct api_calculation_input codec_input,
|
||||
} else { /* encoder */
|
||||
/* Decide LP/HQ */
|
||||
u8 hq_mode = 0;
|
||||
|
||||
if (codec_input.pipe_num > 1)
|
||||
if (codec_input.frame_width * codec_input.frame_height <=
|
||||
1920 * 1080)
|
||||
@@ -462,6 +464,7 @@ static int calculate_vpp_min_freq(struct api_calculation_input codec_input,
|
||||
|
||||
if (codec_input.pipe_num > 1) {
|
||||
u32 pipe_penalty_codec = 101;
|
||||
|
||||
vpp_hw_min_frequency = (vpp_hw_min_frequency *
|
||||
pipe_penalty_codec + 99) / 100;
|
||||
}
|
||||
@@ -545,4 +548,4 @@ int msm_vidc_calculate_frequency(struct api_calculation_input codec_input,
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
@@ -470,6 +470,7 @@ static int calculate_vpp_min_freq(struct api_calculation_input codec_input,
|
||||
if (codec_input.vsp_vpp_mode == CODEC_VSPVPP_MODE_2S) {
|
||||
/* FW overhead, convert FW cycles to impact to one pipe */
|
||||
u64 decoder_vpp_fw_overhead = 0;
|
||||
|
||||
decoder_vpp_fw_overhead =
|
||||
DIV_ROUND_UP((decoder_vpp_fw_overhead * 10 *
|
||||
codec_input.frame_rate), 15);
|
||||
@@ -588,6 +589,7 @@ static int calculate_vpp_min_freq(struct api_calculation_input codec_input,
|
||||
|
||||
if (codec_input.pipe_num > 1) {
|
||||
u32 pipe_penalty_codec = 101;
|
||||
|
||||
vpp_hw_min_frequency = (vpp_hw_min_frequency *
|
||||
pipe_penalty_codec + 99) / 100;
|
||||
}
|
||||
@@ -671,4 +673,4 @@ int msm_vidc_calculate_frequency(struct api_calculation_input codec_input,
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
@@ -1668,6 +1668,7 @@ int msm_vidc_update_input_rate(struct msm_vidc_inst *inst, u64 time_us)
|
||||
struct msm_vidc_core *core;
|
||||
u64 counter = 0;
|
||||
u64 input_timer_sum_us = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
input_timer = msm_vidc_pool_alloc(inst, MSM_MEM_POOL_BUF_TIMER);
|
||||
@@ -1705,6 +1706,7 @@ int msm_vidc_flush_input_timer(struct msm_vidc_inst *inst)
|
||||
{
|
||||
struct msm_vidc_input_timer *input_timer, *dummy_timer;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
i_vpr_l(inst, "%s: flush input_timer list\n", __func__);
|
||||
@@ -1793,6 +1795,7 @@ int msm_vidc_flush_ts(struct msm_vidc_inst *inst)
|
||||
{
|
||||
struct msm_vidc_timestamp *temp, *ts = NULL;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
list_for_each_entry_safe(ts, temp, &inst->timestamps.list, sort.list) {
|
||||
@@ -1816,6 +1819,7 @@ int msm_vidc_update_timestamp_rate(struct msm_vidc_inst *inst, u64 timestamp)
|
||||
u32 timestamp_rate = 0;
|
||||
u64 ts_ms = 0;
|
||||
u32 counter = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
ts = msm_vidc_pool_alloc(inst, MSM_MEM_POOL_TIMESTAMP);
|
||||
@@ -1872,6 +1876,7 @@ int msm_vidc_ts_reorder_insert_timestamp(struct msm_vidc_inst *inst, u64 timesta
|
||||
struct msm_vidc_timestamp *ts;
|
||||
struct msm_vidc_core *core;
|
||||
int rc = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
/* allocate ts from pool */
|
||||
@@ -1896,6 +1901,7 @@ int msm_vidc_ts_reorder_remove_timestamp(struct msm_vidc_inst *inst, u64 timesta
|
||||
{
|
||||
struct msm_vidc_timestamp *ts, *temp;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
/* remove matching node */
|
||||
@@ -1942,6 +1948,7 @@ int msm_vidc_ts_reorder_flush(struct msm_vidc_inst *inst)
|
||||
{
|
||||
struct msm_vidc_timestamp *temp, *ts = NULL;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
/* flush all entries */
|
||||
@@ -1998,6 +2005,7 @@ int msm_vidc_allocate_buffers(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf = NULL;
|
||||
struct msm_vidc_buffers *buffers;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
buffers = msm_vidc_get_buffers(inst, buf_type, __func__);
|
||||
@@ -2030,6 +2038,7 @@ int msm_vidc_free_buffers(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf, *dummy;
|
||||
struct msm_vidc_buffers *buffers;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
buffers = msm_vidc_get_buffers(inst, buf_type, __func__);
|
||||
@@ -2625,6 +2634,7 @@ int msm_vidc_destroy_internal_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_mem *mem, *mem_dummy;
|
||||
struct msm_vidc_buffer *buf, *dummy;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (!is_internal_buffer(buffer->type)) {
|
||||
@@ -2670,6 +2680,7 @@ int msm_vidc_get_internal_buffers(struct msm_vidc_inst *inst,
|
||||
u32 buf_count;
|
||||
struct msm_vidc_core *core;
|
||||
struct msm_vidc_buffers *buffers;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
buf_size = call_session_op(core, buffer_size,
|
||||
@@ -2710,7 +2721,9 @@ int msm_vidc_create_internal_buffer(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buffer;
|
||||
struct msm_vidc_mem *mem;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (!is_internal_buffer(buffer_type)) {
|
||||
i_vpr_e(inst, "%s: type %s is not internal\n",
|
||||
__func__, buf_name(buffer_type));
|
||||
@@ -2793,6 +2806,7 @@ int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
|
||||
int rc = 0;
|
||||
struct msm_vidc_buffers *buffers;
|
||||
struct msm_vidc_buffer *buffer, *dummy;
|
||||
|
||||
if (!is_internal_buffer(buffer_type)) {
|
||||
i_vpr_e(inst, "%s: %s is not internal\n", __func__, buf_name(buffer_type));
|
||||
return 0;
|
||||
@@ -2963,6 +2977,7 @@ int msm_vidc_v4l2_fh_init(struct msm_vidc_inst *inst)
|
||||
int rc = 0;
|
||||
int index;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
/* do not init, if already inited */
|
||||
@@ -3063,6 +3078,7 @@ int msm_vidc_vb2_queue_init(struct msm_vidc_inst *inst)
|
||||
{
|
||||
int rc = 0;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (inst->m2m_dev) {
|
||||
@@ -3169,6 +3185,7 @@ int msm_vidc_add_session(struct msm_vidc_inst *inst)
|
||||
struct msm_vidc_inst *i;
|
||||
struct msm_vidc_core *core;
|
||||
u32 count = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
@@ -3199,6 +3216,7 @@ int msm_vidc_remove_session(struct msm_vidc_inst *inst)
|
||||
struct msm_vidc_inst *i, *temp;
|
||||
struct msm_vidc_core *core;
|
||||
u32 count = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
@@ -3222,6 +3240,7 @@ int msm_vidc_remove_dangling_session(struct msm_vidc_inst *inst)
|
||||
struct msm_vidc_inst *i, *temp;
|
||||
struct msm_vidc_core *core;
|
||||
u32 count = 0, dcount = 0;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
@@ -3392,6 +3411,7 @@ int msm_vidc_session_close(struct msm_vidc_inst *inst)
|
||||
int rc = 0;
|
||||
struct msm_vidc_core *core;
|
||||
bool wait_for_response;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
wait_for_response = true;
|
||||
@@ -3448,6 +3468,7 @@ int msm_vidc_get_inst_capability(struct msm_vidc_inst *inst)
|
||||
int i;
|
||||
u32 codecs_count = 0;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
codecs_count = core->enc_codecs_count + core->dec_codecs_count;
|
||||
@@ -3854,6 +3875,7 @@ int msm_vidc_inst_timeout(struct msm_vidc_inst *inst)
|
||||
struct msm_vidc_core *core;
|
||||
struct msm_vidc_inst *instance;
|
||||
bool found;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
@@ -4218,6 +4240,7 @@ int msm_vidc_flush_buffers(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_buffer *buf, *dummy;
|
||||
enum msm_vidc_buffer_type buffer_type[2];
|
||||
int i;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (is_input_buffer(type)) {
|
||||
@@ -4264,6 +4287,7 @@ int msm_vidc_flush_read_only_buffers(struct msm_vidc_inst *inst,
|
||||
int rc = 0;
|
||||
struct msm_vidc_buffer *ro_buf, *dummy;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (!is_decode_session(inst) || !is_output_buffer(type))
|
||||
@@ -4562,6 +4586,7 @@ int msm_vidc_update_bitstream_buffer_size(struct msm_vidc_inst *inst)
|
||||
{
|
||||
struct msm_vidc_core *core;
|
||||
struct v4l2_format *fmt;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
if (is_decode_session(inst)) {
|
||||
@@ -4577,6 +4602,7 @@ int msm_vidc_update_meta_port_settings(struct msm_vidc_inst *inst)
|
||||
{
|
||||
struct msm_vidc_core *core;
|
||||
struct v4l2_format *fmt;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
fmt = &inst->fmts[INPUT_META_PORT];
|
||||
@@ -4606,6 +4632,7 @@ int msm_vidc_update_meta_port_settings(struct msm_vidc_inst *inst)
|
||||
int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port)
|
||||
{
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
switch (port) {
|
||||
@@ -4917,6 +4944,7 @@ int msm_vidc_check_core_mbpf(struct msm_vidc_inst *inst)
|
||||
u32 critical_mbpf = 0;
|
||||
struct msm_vidc_core *core;
|
||||
struct msm_vidc_inst *instance;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
@@ -5184,6 +5212,7 @@ static int msm_vidc_check_max_sessions(struct msm_vidc_inst *inst)
|
||||
u32 num_1080p_sessions = 0, num_4k_sessions = 0, num_8k_sessions = 0;
|
||||
struct msm_vidc_inst *i;
|
||||
struct msm_vidc_core *core;
|
||||
|
||||
core = inst->core;
|
||||
|
||||
core_lock(core, __func__);
|
||||
|
Referência em uma nova issue
Block a user