platform: DCE: fix notify event IPC buffer region

Current code does not include IPC buffer region for Notification
channel. This patch adds Notification IPC buffer size into total
allocated buffer for IPC.
This CL also increases Async IPC buffer frames from 1 to 4

Bug 3500242

Change-Id: I4ae07fdf9cf7c20fb70626698233f74a8b9fc8de
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661833
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mahesh Kumar
2022-01-31 18:40:45 +05:30
committed by Laxman Dewangan
parent 2f69b0b61c
commit de5c7b0b06
2 changed files with 11 additions and 9 deletions

View File

@@ -155,13 +155,15 @@ int dce_ipc_allocate_region(struct tegra_dce *d)
dev = dev_from_dce(d);
region = &d->d_ipc.region;
tot_q_sz = ((DCE_ADMIN_CMD_MAX_NFRAMES
* tegra_ivc_align(DCE_ADMIN_CMD_MAX_FSIZE)
* 2) + (DCE_DISPRM_CMD_MAX_NFRAMES
* tegra_ivc_align(DCE_DISPRM_CMD_MAX_FSIZE)
* 2) + (DCE_ADMIN_CMD_MAX_NFRAMES
* tegra_ivc_align(DCE_ADMIN_CMD_CHAN_FSIZE)
* 2));
tot_q_sz = ((DCE_ADMIN_CMD_MAX_NFRAMES *
tegra_ivc_align(DCE_ADMIN_CMD_MAX_FSIZE) * 2) +
(DCE_DISPRM_CMD_MAX_NFRAMES *
tegra_ivc_align(DCE_DISPRM_CMD_MAX_FSIZE) * 2) +
(DCE_ADMIN_CMD_MAX_NFRAMES *
tegra_ivc_align(DCE_ADMIN_CMD_CHAN_FSIZE) * 2) +
(DCE_DISPRM_EVENT_NOTIFY_CMD_MAX_NFRAMES *
tegra_ivc_align(DCE_DISPRM_EVENT_NOTIFY_CMD_MAX_FSIZE) * 2)
);
tot_ivc_q_sz = tegra_ivc_total_queue_size(tot_q_sz);
region->size = dce_get_nxt_pow_of_2(&tot_ivc_q_sz, 32);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -32,7 +32,7 @@
*/
#define DCE_DISPRM_CMD_MAX_NFRAMES 1U
#define DCE_DISPRM_CMD_MAX_FSIZE 4096U
#define DCE_DISPRM_EVENT_NOTIFY_CMD_MAX_NFRAMES 1U
#define DCE_DISPRM_EVENT_NOTIFY_CMD_MAX_NFRAMES 4U
#define DCE_DISPRM_EVENT_NOTIFY_CMD_MAX_FSIZE 4096U
#define DCE_ADMIN_CMD_MAX_FSIZE 1024U