msm: camera: icp: UAPI update for v980
Add OFE stream type(rt/nrt/semi-rt) to be used for hw acquire, add ofe setting/update opcode for preparing hw update, add ICP/OFE dev type for query cap v2 usage, and a new macro to define the max number of device types supported by ICP instance. Remove usages of deprecated max macros - CAM_ICP_RES_TYPE_MAX and CAM_ICP_DEV_TYPE_MAX in the driver. CRs-Fixed: 3336554 Change-Id: Icf27958571f6e31896539d0cd692e0e7a67c5cd8 Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
e9524ed007
commit
92e98c0713
@@ -666,7 +666,7 @@ int hfi_get_hw_caps(void *query_buf)
|
|||||||
query_cmd->num_ipe = 2;
|
query_cmd->num_ipe = 2;
|
||||||
query_cmd->num_bps = 1;
|
query_cmd->num_bps = 1;
|
||||||
|
|
||||||
for (i = 0; i < CAM_ICP_DEV_TYPE_MAX; i++) {
|
for (i = 0; i < CAM_ICP_MAX_NUM_OF_DEV_TYPES; i++) {
|
||||||
query_cmd->dev_ver[i].dev_type = i;
|
query_cmd->dev_ver[i].dev_type = i;
|
||||||
query_cmd->dev_ver[i].hw_ver.major = 0x34 + i;
|
query_cmd->dev_ver[i].hw_ver.major = 0x34 + i;
|
||||||
query_cmd->dev_ver[i].hw_ver.minor = 0x34 + i;
|
query_cmd->dev_ver[i].hw_ver.minor = 0x34 + i;
|
||||||
|
@@ -6402,7 +6402,8 @@ static int cam_icp_get_acquire_info(struct cam_icp_hw_mgr *hw_mgr,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icp_dev_acquire_info.dev_type >= CAM_ICP_RES_TYPE_MAX) {
|
if (icp_dev_acquire_info.dev_type < CAM_ICP_RES_TYPE_BPS ||
|
||||||
|
icp_dev_acquire_info.dev_type > CAM_ICP_RES_TYPE_BPS_SEMI_RT) {
|
||||||
CAM_ERR(CAM_ICP, "Invalid device type: %d",
|
CAM_ERR(CAM_ICP, "Invalid device type: %d",
|
||||||
icp_dev_acquire_info.dev_type);
|
icp_dev_acquire_info.dev_type);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __UAPI_CAM_ICP_H__
|
#ifndef __UAPI_CAM_ICP_H__
|
||||||
@@ -15,8 +16,18 @@
|
|||||||
#define CAM_ICP_DEV_TYPE_BPS 3
|
#define CAM_ICP_DEV_TYPE_BPS 3
|
||||||
#define CAM_ICP_DEV_TYPE_IPE_CDM 4
|
#define CAM_ICP_DEV_TYPE_IPE_CDM 4
|
||||||
#define CAM_ICP_DEV_TYPE_BPS_CDM 5
|
#define CAM_ICP_DEV_TYPE_BPS_CDM 5
|
||||||
|
/**
|
||||||
|
* This macro is deprecated; a device type max is not necessary.
|
||||||
|
* The new macro CAM_ICP_MAX_NUM_OF_DEV_TYPES will dictate
|
||||||
|
* max number of different types of devices supported by a single
|
||||||
|
* instance of the ICP device.
|
||||||
|
*/
|
||||||
#define CAM_ICP_DEV_TYPE_MAX 5
|
#define CAM_ICP_DEV_TYPE_MAX 5
|
||||||
|
|
||||||
|
/* ICP and OFE types added to indicate capability to userspace */
|
||||||
|
#define CAM_ICP_DEV_TYPE_ICP 6
|
||||||
|
#define CAM_ICP_DEV_TYPE_OFE 7
|
||||||
|
|
||||||
/* definitions needed for icp aquire device */
|
/* definitions needed for icp aquire device */
|
||||||
#define CAM_ICP_RES_TYPE_BPS 1
|
#define CAM_ICP_RES_TYPE_BPS 1
|
||||||
#define CAM_ICP_RES_TYPE_IPE_RT 2
|
#define CAM_ICP_RES_TYPE_IPE_RT 2
|
||||||
@@ -24,13 +35,21 @@
|
|||||||
#define CAM_ICP_RES_TYPE_IPE_SEMI_RT 4
|
#define CAM_ICP_RES_TYPE_IPE_SEMI_RT 4
|
||||||
#define CAM_ICP_RES_TYPE_BPS_RT 5
|
#define CAM_ICP_RES_TYPE_BPS_RT 5
|
||||||
#define CAM_ICP_RES_TYPE_BPS_SEMI_RT 6
|
#define CAM_ICP_RES_TYPE_BPS_SEMI_RT 6
|
||||||
|
|
||||||
|
/* This macro is deprecated and no longer needed */
|
||||||
#define CAM_ICP_RES_TYPE_MAX 7
|
#define CAM_ICP_RES_TYPE_MAX 7
|
||||||
|
|
||||||
|
#define CAM_ICP_RES_TYPE_OFE_RT 7
|
||||||
|
#define CAM_ICP_RES_TYPE_OFE 8
|
||||||
|
#define CAM_ICP_RES_TYPE_OFE_SEMI_RT 9
|
||||||
|
|
||||||
/* packet opcode types */
|
/* packet opcode types */
|
||||||
#define CAM_ICP_OPCODE_IPE_UPDATE 0
|
#define CAM_ICP_OPCODE_IPE_UPDATE 0
|
||||||
#define CAM_ICP_OPCODE_BPS_UPDATE 1
|
#define CAM_ICP_OPCODE_BPS_UPDATE 1
|
||||||
#define CAM_ICP_OPCODE_IPE_SETTINGS 2
|
#define CAM_ICP_OPCODE_IPE_SETTINGS 2
|
||||||
#define CAM_ICP_OPCODE_BPS_SETTINGS 3
|
#define CAM_ICP_OPCODE_BPS_SETTINGS 3
|
||||||
|
#define CAM_ICP_OPCODE_OFE_UPDATE 4
|
||||||
|
#define CAM_ICP_OPCODE_OFE_SETTINGS 5
|
||||||
|
|
||||||
|
|
||||||
/* IPE input port resource type */
|
/* IPE input port resource type */
|
||||||
@@ -81,6 +100,9 @@
|
|||||||
#define CAM_ICP_CMD_GENERIC_BLOB_CLK_V2 0x5
|
#define CAM_ICP_CMD_GENERIC_BLOB_CLK_V2 0x5
|
||||||
#define CAM_ICP_CMD_GENERIC_BLOB_PRESIL_HANGDUMP 0x6
|
#define CAM_ICP_CMD_GENERIC_BLOB_PRESIL_HANGDUMP 0x6
|
||||||
|
|
||||||
|
/* Max number of device types supported per ICP instance */
|
||||||
|
#define CAM_ICP_MAX_NUM_OF_DEV_TYPES 0x5
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct cam_icp_clk_bw_request_v2
|
* struct cam_icp_clk_bw_request_v2
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user