mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: vidc: prevent vcd_stop to wait for long
Video decoder release calls vid_dec_close_client which calls vcd_stop. If vcd_stop notification fails, then there is a long wait. This patch is limiting the same Change-Id: Ibdf33e3882826429bf8c49a5888b8c9908e2e62d Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
This commit is contained in:
parent
53010ac515
commit
5e597b465b
1 changed files with 11 additions and 2 deletions
|
@ -2595,6 +2595,7 @@ static u32 vid_dec_close_client(struct video_client_ctx *client_ctx)
|
|||
{
|
||||
struct vid_dec_msg *vdec_msg;
|
||||
u32 vcd_status;
|
||||
int rc;
|
||||
|
||||
DBG("msm_vidc_dec: Inside %s()", __func__);
|
||||
if (!client_ctx || (!client_ctx->vcd_handle)) {
|
||||
|
@ -2608,8 +2609,16 @@ static u32 vid_dec_close_client(struct video_client_ctx *client_ctx)
|
|||
client_ctx->stop_sync_cb = true;
|
||||
vcd_status = vcd_stop(client_ctx->vcd_handle);
|
||||
DBG("\n Stuck at the stop call");
|
||||
if (!vcd_status)
|
||||
wait_for_completion(&client_ctx->event);
|
||||
if (!vcd_status) {
|
||||
rc = wait_for_completion_timeout(&client_ctx->event,
|
||||
msecs_to_jiffies(500));
|
||||
if (!rc)
|
||||
ERR("%s:ERROR vcd_stop time out rc = %d\n",
|
||||
__func__, rc);
|
||||
if (client_ctx->event_status)
|
||||
ERR("%s:ERROR vcd_stop event_status failure\n",
|
||||
__func__);
|
||||
}
|
||||
DBG("\n Came out of wait event");
|
||||
}
|
||||
mutex_lock(&client_ctx->msg_queue_lock);
|
||||
|
|
Loading…
Reference in a new issue