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 <grajagop@codeaurora.org>
This commit is contained in:
Govindaraj Rajagopal 2020-10-19 15:18:35 +05:30
parent 3e834c7a00
commit 8a3082af38

View File

@ -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);