platform: tegra: dce: fix async events handling

- when there are multiple async events back to back from DCE with very
short time gap between 2 events(for example, in case of DP MST,
2 heads could be sending flip event notification back to back at
almost same time), there is a possibility of 2nd async event getting
processed very late when shared mailbox register is set to zero as part
of processing 1st async event and before processing of 2nd async event.
- current change fixes it by processing all pending IVC frames for IPC
channel when processing an async event.
- change few error logs to info logs as these are not actually errors.

Bug 3582863
Bug 3429668

Change-Id: I29b1813bed50c4583e37f02bf656802081ccf9d3
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2698560
(cherry picked from commit dd1abfa6eaab6e4f599d8c97bdccc7cbb67e1341)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2700438
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Santosh Reddy Galma
2022-04-17 10:18:52 +00:00
committed by Laxman Dewangan
parent 716c1f3cdb
commit 631f4aafe9
2 changed files with 11 additions and 8 deletions

View File

@@ -332,14 +332,17 @@ static void dce_client_process_event_ipc(struct tegra_dce *d,
}
msg_length = DCE_CLIENT_MAX_IPC_MSG_SIZE;
ret = dce_ipc_read_message(d, cl->int_type, msg_data, msg_length);
if (ret) {
dce_err(d, "Error in reading DCE msg for ch_type [%d]",
cl->int_type);
goto done;
}
do {
ret = dce_ipc_read_message(d, cl->int_type, msg_data, msg_length);
if (ret) {
dce_info(d, "Error in reading DCE msg for ch_type [%d]",
cl->int_type);
goto done;
}
cl->callback_fn(cl->handle, cl->type, msg_length, msg_data, cl->data);
} while (dce_ipc_is_data_available(d, cl->int_type));
cl->callback_fn(cl->handle, cl->type, msg_length, msg_data, cl->data);
done:
if (msg_data)
dce_kfree(d, msg_data);

View File

@@ -675,7 +675,7 @@ int dce_ipc_read_message(struct tegra_dce *d, u32 ch_type,
ret = _dce_ipc_get_next_read_buff(ch);
if (ret) {
dce_err(ch->d, "Error getting next free buf to read");
dce_info(ch->d, "Error getting next free buf to read");
goto out;
}