msm: camera: common: Add hw mgr intf query cap v2

Add switch case to handle query cap v2 ioctl, and add query cap
v2 hw mgr intf function pointer to handle query cap v2.

CRs-Fixed: 3364267
Change-Id: I1f992982f8d06755c977839ee61ee450306d65a5
Signed-off-by: Petar Ivanov <quic_pivanov@quicinc.com>
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:
Petar Ivanov
2022-10-26 01:53:14 -07:00
committed by Camera Software Integration
vanhempi b549791b22
commit d82dbbff8a
10 muutettua tiedostoa jossa 100 lisäystä ja 24 poistoa

Näytä tiedosto

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2019-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/slab.h>
@@ -26,8 +26,7 @@
static struct cam_custom_hw_mgr g_custom_hw_mgr;
static int cam_custom_mgr_get_hw_caps(void *hw_mgr_priv,
void *hw_caps_args)
static int cam_custom_mgr_get_hw_caps(void *hw_mgr_priv, void *hw_caps_args)
{
int rc = 0;
struct cam_custom_hw_mgr *hw_mgr = hw_mgr_priv;
@@ -36,6 +35,13 @@ static int cam_custom_mgr_get_hw_caps(void *hw_mgr_priv,
struct cam_hw_info *cam_custom_hw;
struct cam_hw_soc_info *soc_info_hw;
if (sizeof(struct cam_custom_query_cap_cmd) != query->size) {
CAM_ERR(CAM_CUSTOM,
"Input query cap size:%u does not match expected query cap size: %u",
query->size, sizeof(struct cam_custom_query_cap_cmd));
return -EFAULT;
}
cam_custom_hw = (struct cam_hw_info *)
g_custom_hw_mgr.custom_hw[0]->hw_priv;
if (cam_custom_hw)