mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
msm: vidc: enhance eos buffer handling
Eos buffer is queued to firmware and its ref is maintained using eosbufs.list. Sometimes EOS request client sent even before port_reconfig. In that case requeing same buffer which is already with firmware at start_streaming. So during handle_ebd of 2nd eos buffer, it can't find the entry at eosbufs.list. So client closes the session. Always check, if buffer is already queued, then do not queue the same buffer again, during start_streaming after reconfig. Change-Id: If934d8ce357226dee78db15ccb7b3c57103d2f12 Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
parent
bd3fc9ca56
commit
1fc52e7df4
2 changed files with 6 additions and 0 deletions
|
|
@ -2363,6 +2363,7 @@ static bool is_eos_buffer(struct msm_vidc_inst *inst, u32 device_addr)
|
|||
list_for_each_entry_safe(temp, next, &inst->eosbufs.list, list) {
|
||||
if (temp->smem.device_addr == device_addr) {
|
||||
found = true;
|
||||
temp->is_queued = 0;
|
||||
list_del(&temp->list);
|
||||
msm_comm_smem_free(inst, &temp->smem);
|
||||
kfree(temp);
|
||||
|
|
@ -3953,6 +3954,9 @@ int msm_vidc_send_pending_eos_buffers(struct msm_vidc_inst *inst)
|
|||
|
||||
mutex_lock(&inst->eosbufs.lock);
|
||||
list_for_each_entry_safe(binfo, temp, &inst->eosbufs.list, list) {
|
||||
if (binfo->is_queued)
|
||||
continue;
|
||||
|
||||
data.alloc_len = binfo->smem.size;
|
||||
data.device_addr = binfo->smem.device_addr;
|
||||
data.input_tag = 0;
|
||||
|
|
@ -3969,6 +3973,7 @@ int msm_vidc_send_pending_eos_buffers(struct msm_vidc_inst *inst)
|
|||
|
||||
rc = call_hfi_op(hdev, session_etb, inst->session,
|
||||
&data);
|
||||
binfo->is_queued = 1;
|
||||
}
|
||||
mutex_unlock(&inst->eosbufs.lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ struct recon_buf {
|
|||
struct eos_buf {
|
||||
struct list_head list;
|
||||
struct msm_smem smem;
|
||||
u32 is_queued;
|
||||
};
|
||||
|
||||
struct internal_buf {
|
||||
|
|
|
|||
Loading…
Reference in a new issue