mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 14:43:27 -04:00
msm: camera: cdm: Making WQ to have inflight works to be one
For requests with multiple BL tags,in a corner case, cdm work notifies out of order requests to client as difference in bl_tags is greater than boundary check. This commit avoids out of order request processing by making number of inflight work to be 1 and increasing the priority of workqueue. And therefore removed all checks that are not required. CRs-Fixed: 3453131 Change-Id: I6db3e9379b2474347cff1618ea6ad705ca3561fb Signed-off-by: zhuo <quic_zhuo@quicinc.com> Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
This commit is contained in:
parent
9b3f91ecab
commit
68373c0331
2 changed files with 21 additions and 27 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _CAM_CDM_H_
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#define CAM_MAX_SW_CDM_VERSION_SUPPORTED 1
|
||||
#define CAM_SW_CDM_INDEX 0
|
||||
#define CAM_CDM_INFLIGHT_WORKS 5
|
||||
#define CAM_CDM_INFLIGHT_WORKS 1
|
||||
#define CAM_CDM_HW_RESET_TIMEOUT 300
|
||||
|
||||
/*
|
||||
|
|
@ -69,8 +69,6 @@
|
|||
#define CAM_CDM_BL_FIFO_LENGTH_MAX_DEFAULT 0x40
|
||||
#define CAM_CDM_BL_FIFO_LENGTH_CFG_SHIFT 0x10
|
||||
#define CAM_CDM_BL_FIFO_FLUSH_SHIFT 0x3
|
||||
#define CAM_CDM_BL_FIFO_BOUNDARY_CHECK \
|
||||
(CAM_CDM_BL_FIFO_LENGTH_MAX_DEFAULT / 2)
|
||||
|
||||
#define CAM_CDM_BL_FIFO_REQ_SIZE_MAX 0x00
|
||||
#define CAM_CDM_BL_FIFO_REQ_SIZE_MAX_DIV2 0x01
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
|
@ -1264,30 +1264,26 @@ static void cam_hw_cdm_work(struct work_struct *work)
|
|||
list_for_each_entry_safe(node, tnode,
|
||||
&core->bl_fifo[fifo_idx].bl_request_list,
|
||||
entry) {
|
||||
if ((node->bl_tag <= payload->irq_data) ||
|
||||
((node->bl_tag - payload->irq_data) >
|
||||
CAM_CDM_BL_FIFO_BOUNDARY_CHECK)) {
|
||||
if (node->request_type ==
|
||||
CAM_HW_CDM_BL_CB_CLIENT) {
|
||||
cam_cdm_notify_clients(cdm_hw,
|
||||
CAM_CDM_CB_STATUS_BL_SUCCESS,
|
||||
(void *)node);
|
||||
} else if (node->request_type ==
|
||||
CAM_HW_CDM_BL_CB_INTERNAL) {
|
||||
CAM_ERR(CAM_CDM,
|
||||
"Invalid node=%pK %d",
|
||||
node,
|
||||
node->request_type);
|
||||
}
|
||||
list_del_init(&node->entry);
|
||||
if (node->bl_tag == payload->irq_data) {
|
||||
kfree(node);
|
||||
node = NULL;
|
||||
break;
|
||||
}
|
||||
if (node->request_type ==
|
||||
CAM_HW_CDM_BL_CB_CLIENT) {
|
||||
cam_cdm_notify_clients(cdm_hw,
|
||||
CAM_CDM_CB_STATUS_BL_SUCCESS,
|
||||
(void *)node);
|
||||
} else if (node->request_type ==
|
||||
CAM_HW_CDM_BL_CB_INTERNAL) {
|
||||
CAM_ERR(CAM_CDM,
|
||||
"Invalid node=%pK %d",
|
||||
node,
|
||||
node->request_type);
|
||||
}
|
||||
list_del_init(&node->entry);
|
||||
if (node->bl_tag == payload->irq_data) {
|
||||
kfree(node);
|
||||
node = NULL;
|
||||
break;
|
||||
}
|
||||
kfree(node);
|
||||
node = NULL;
|
||||
}
|
||||
} else {
|
||||
CAM_INFO(CAM_CDM,
|
||||
|
|
@ -2232,7 +2228,7 @@ static int cam_hw_cdm_component_bind(struct device *dev,
|
|||
sizeof(cdm_core->name));
|
||||
snprintf(work_q_name + len, sizeof(work_q_name) - len, "%d", i);
|
||||
cdm_core->bl_fifo[i].work_queue = alloc_workqueue(work_q_name,
|
||||
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS,
|
||||
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS | WQ_HIGHPRI,
|
||||
CAM_CDM_INFLIGHT_WORKS);
|
||||
if (!cdm_core->bl_fifo[i].work_queue) {
|
||||
CAM_ERR(CAM_CDM,
|
||||
|
|
|
|||
Loading…
Reference in a new issue