Merge f33380f182 on remote branch

Change-Id: I2fea743726b96556867189b281f72e860ad6dc55
This commit is contained in:
Linux Build Service Account 2022-03-16 06:28:01 -07:00
commit 14568cb248
2 changed files with 25 additions and 17 deletions

View file

@ -1,6 +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.
*/
#ifndef _CAM_CDM_H_
@ -68,6 +69,8 @@
#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

View file

@ -1,6 +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.
*/
#include <linux/delay.h>
@ -1263,26 +1264,30 @@ 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->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) {
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;
}
kfree(node);
node = NULL;
break;
}
kfree(node);
node = NULL;
}
} else {
CAM_INFO(CAM_CDM,