Revert "msm: vidc: Handle encoder input in true dynamic mode"

This reverts commit 1681bd4286bc ("msm: vidc: Handle encoder
input in true dynamic mode") Keep iova mappings of encoder
input buffers as we move towards a handle based mapping and
encoder input buffers once allocated are maintained through-
out the session.

CRs-Fixed: 1026885
Change-Id: Ib6df539c5e04ba4eefed59355fd13191f85492d8
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
This commit is contained in:
Vikash Garodia 2016-05-24 20:50:41 -07:00 committed by Gerrit - the friendly Code Review server
parent 1f1574bb18
commit d38e0f932b
2 changed files with 2 additions and 41 deletions

View file

@ -386,13 +386,6 @@ static inline bool is_dynamic_output_buffer_mode(struct v4l2_buffer *b,
}
static inline bool is_encoder_input_buffer(struct v4l2_buffer *b,
struct msm_vidc_inst *inst)
{
return b->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
inst->session_type == MSM_VIDC_ENCODER;
}
static inline void save_v4l2_buffer(struct v4l2_buffer *b,
struct buffer_info *binfo)
{
@ -943,8 +936,8 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
if (rc)
return rc;
if (is_dynamic_output_buffer_mode(b, inst) ||
is_encoder_input_buffer(b, inst)) {
if (is_dynamic_output_buffer_mode(b, inst)) {
buffer_info->dequeued = true;
dprintk(VIDC_DBG, "[DEQUEUED]: fd[0] = %d\n",

View file

@ -1704,36 +1704,6 @@ static struct vb2_buffer *get_vb_from_device_addr(struct buf_queue *bufq,
return vb;
}
static void handle_dynamic_input_buffer(struct msm_vidc_inst *inst,
ion_phys_addr_t device_addr)
{
struct buffer_info *binfo = NULL, *temp = NULL;
if (inst->session_type == MSM_VIDC_ENCODER) {
binfo = device_to_uvaddr(&inst->registeredbufs, device_addr);
if (!binfo) {
dprintk(VIDC_ERR,
"%s buffer not found in registered list\n",
__func__);
return;
}
dprintk(VIDC_DBG,
"EBD fd[0] = %d -> EBD_ref_released, addr: %pa\n",
binfo->fd[0], &device_addr);
mutex_lock(&inst->registeredbufs.lock);
list_for_each_entry(temp, &inst->registeredbufs.list,
list) {
if (temp == binfo) {
binfo->pending_deletion = true;
break;
}
}
mutex_unlock(&inst->registeredbufs.lock);
}
}
static void handle_ebd(enum hal_command_response cmd, void *data)
{
struct msm_vidc_cb_data_done *response = data;
@ -1754,8 +1724,6 @@ static void handle_ebd(enum hal_command_response cmd, void *data)
return;
}
handle_dynamic_input_buffer(inst, response->input_done.packet_buffer);
vb = get_vb_from_device_addr(&inst->bufq[OUTPUT_PORT],
response->input_done.packet_buffer);
if (vb) {