msm: camera: icp: Update HFI cmdq/msgq size
Increase cmdq/msgq size to 8K. Update HFI read API to reflect the bump in size. CRs-Fixed: 3190507 Change-Id: I70f5ded8e6155534cf2fa0fe94d3fdd1a378b5f7 Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
a130199cd3
commit
f00b977871
@@ -1,6 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CAM_HFI_REG_H_
|
#ifndef _CAM_HFI_REG_H_
|
||||||
@@ -37,16 +38,11 @@
|
|||||||
#define ICP_QHDR_PRI_TYPE_MASK 0x0000FF00
|
#define ICP_QHDR_PRI_TYPE_MASK 0x0000FF00
|
||||||
#define ICP_QHDR_Q_ID_MASK 0x000000FF
|
#define ICP_QHDR_Q_ID_MASK 0x000000FF
|
||||||
|
|
||||||
#define ICP_CMD_Q_SIZE_IN_BYTES 4096
|
#define ICP_CMD_Q_SIZE_IN_BYTES 8192
|
||||||
#define ICP_MSG_Q_SIZE_IN_BYTES 4096
|
#define ICP_MSG_Q_SIZE_IN_BYTES 8192
|
||||||
#define ICP_DBG_Q_SIZE_IN_BYTES 102400
|
#define ICP_DBG_Q_SIZE_IN_BYTES 102400
|
||||||
#define ICP_MSG_SFR_SIZE_IN_BYTES 4096
|
#define ICP_MSG_SFR_SIZE_IN_BYTES 4096
|
||||||
|
|
||||||
#define ICP_SHARED_MEM_IN_BYTES (1024 * 1024)
|
|
||||||
#define ICP_UNCACHED_HEAP_SIZE_IN_BYTES (2 * 1024 * 1024)
|
|
||||||
#define ICP_HFI_MAX_PKT_SIZE_IN_WORDS 25600
|
|
||||||
#define ICP_HFI_MAX_PKT_SIZE_MSGQ_IN_WORDS 1024
|
|
||||||
|
|
||||||
#define ICP_HFI_QTBL_HOSTID1 0x01000000
|
#define ICP_HFI_QTBL_HOSTID1 0x01000000
|
||||||
#define ICP_HFI_QTBL_STATUS_ENABLED 0x00000001
|
#define ICP_HFI_QTBL_STATUS_ENABLED 0x00000001
|
||||||
#define ICP_HFI_NUMBER_OF_QS 3
|
#define ICP_HFI_NUMBER_OF_QS 3
|
||||||
|
@@ -275,7 +275,7 @@ int hfi_read_message(uint32_t *pmsg, uint8_t q_id,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (q_id > Q_DBG) {
|
if (!((q_id == Q_MSG) || (q_id == Q_DBG))) {
|
||||||
CAM_ERR(CAM_HFI, "Invalid q :%u", q_id);
|
CAM_ERR(CAM_HFI, "Invalid q :%u", q_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -305,13 +305,11 @@ int hfi_read_message(uint32_t *pmsg, uint8_t q_id,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (q_id == Q_MSG) {
|
size_upper_bound = q->qhdr_q_size;
|
||||||
|
if (q_id == Q_MSG)
|
||||||
read_q = (uint32_t *)g_hfi->map.msg_q.kva;
|
read_q = (uint32_t *)g_hfi->map.msg_q.kva;
|
||||||
size_upper_bound = ICP_HFI_MAX_PKT_SIZE_MSGQ_IN_WORDS;
|
else
|
||||||
} else {
|
|
||||||
read_q = (uint32_t *)g_hfi->map.dbg_q.kva;
|
read_q = (uint32_t *)g_hfi->map.dbg_q.kva;
|
||||||
size_upper_bound = ICP_HFI_MAX_PKT_SIZE_IN_WORDS;
|
|
||||||
}
|
|
||||||
|
|
||||||
read_ptr = (uint32_t *)(read_q + q->qhdr_read_idx);
|
read_ptr = (uint32_t *)(read_q + q->qhdr_read_idx);
|
||||||
write_ptr = (uint32_t *)(read_q + q->qhdr_write_idx);
|
write_ptr = (uint32_t *)(read_q + q->qhdr_write_idx);
|
||||||
@@ -320,12 +318,7 @@ int hfi_read_message(uint32_t *pmsg, uint8_t q_id,
|
|||||||
size_in_words = write_ptr - read_ptr;
|
size_in_words = write_ptr - read_ptr;
|
||||||
else {
|
else {
|
||||||
word_diff = read_ptr - write_ptr;
|
word_diff = read_ptr - write_ptr;
|
||||||
if (q_id == Q_MSG)
|
size_in_words = q->qhdr_q_size - word_diff;
|
||||||
size_in_words = (ICP_MSG_Q_SIZE_IN_BYTES >>
|
|
||||||
BYTE_WORD_SHIFT) - word_diff;
|
|
||||||
else
|
|
||||||
size_in_words = (ICP_DBG_Q_SIZE_IN_BYTES >>
|
|
||||||
BYTE_WORD_SHIFT) - word_diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((size_in_words == 0) ||
|
if ((size_in_words == 0) ||
|
||||||
|
Reference in New Issue
Block a user