Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68373c03 authored by zhuo's avatar zhuo Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarzhuo <quic_zhuo@quicinc.com>
Signed-off-by: default avatarShivakumar Malke <quic_smalke@quicinc.com>
parent 9b3f91ec
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
/* 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
+19 −23
Original line number Diff line number Diff line
// 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,9 +1264,6 @@ 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,
@@ -1288,7 +1285,6 @@ static void cam_hw_cdm_work(struct work_struct *work)
				kfree(node);
				node = NULL;
			}
			}
		} else {
			CAM_INFO(CAM_CDM,
				"Skip GenIRQ, tag 0x%x fifo %d",
@@ -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,