From 8a3082af38f7ce1479637f2e18c72b3a3874f665 Mon Sep 17 00:00:00 2001 From: Govindaraj Rajagopal Date: Mon, 19 Oct 2020 15:18:35 +0530 Subject: [PATCH] msm: vidc: raise interrupt for encode batching usecase HFR recording usecases, batch mode is enabled by default. Currently no interrupt is raised to firmware for ETB write on command queue. So firmware was not reading the queue, though there are lot of pending messages in the command queue, So complete encoder pipeline is getting stalled after encoding couple of frames. To avoid above problem, raising interrupt to firmware every time(Only for last ETB in the batch). Change-Id: If584a8175bfa54402087d1888dd032d08e1f3c15 Signed-off-by: Govindaraj Rajagopal --- msm/vidc/hfi_common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msm/vidc/hfi_common.c b/msm/vidc/hfi_common.c index ac95cff157a9..d08e240cfce3 100644 --- a/msm/vidc/hfi_common.c +++ b/msm/vidc/hfi_common.c @@ -2294,6 +2294,7 @@ static int venus_hfi_session_process_batch(void *sess, int rc = 0, c = 0; struct hal_session *session = sess; struct venus_hfi_device *device = &venus_hfi_dev; + bool is_last_frame = false; mutex_lock(&device->lock); @@ -2303,7 +2304,8 @@ static int venus_hfi_session_process_batch(void *sess, } for (c = 0; c < num_ftbs; ++c) { - rc = __session_ftb(session, &ftbs[c], true); + is_last_frame = (c + 1 == num_ftbs); + rc = __session_ftb(session, &ftbs[c], !is_last_frame); if (rc) { s_vpr_e(session->sid, "Failed to queue batched ftb: %d\n", rc); @@ -2312,7 +2314,8 @@ static int venus_hfi_session_process_batch(void *sess, } for (c = 0; c < num_etbs; ++c) { - rc = __session_etb(session, &etbs[c], true); + is_last_frame = (c + 1 == num_etbs); + rc = __session_etb(session, &etbs[c], !is_last_frame); if (rc) { s_vpr_e(session->sid, "Failed to queue batched etb: %d\n", rc);