msm: camera: icp: Support multiple ICP subdevices
Add infrastructure to allow multiple ICP subdevices to co-exist with each subdevice exposed to UMD individually. All operations including ioctl on each subdevice are discrete from another's. Add a new private field in node structure to point to which subdev the node belongs to. Add a new ICP1 device type and expose the type associated with ICP1 to userspace for identifying the second ICP. Each subdevice's unique name is derived from "cam-icp". The name is then appended with a cell-index if it exists. If there are multiple nodes in DTSI to be probed, each node must contain cell-index to differentiate them. For each subdevice, it is expected to have a unique node in DTSI with unique compatible string to probe the sd during boottime. CRs-Fixed: 3336505 Change-Id: I615f9489d5f22b0ec37f98be3fec4c67b06a52d0 Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

父節點
4b7644f75c
當前提交
a8b332e9d0
@@ -23,8 +23,6 @@
|
||||
#include "cam_req_mgr_dev.h"
|
||||
#include "cam_icp_hw_mgr_intf.h"
|
||||
|
||||
static const char icp_dev_name[] = "cam-icp";
|
||||
|
||||
static int cam_icp_context_dump_active_request(void *data, void *args)
|
||||
{
|
||||
struct cam_context *ctx = (struct cam_context *)data;
|
||||
@@ -506,13 +504,16 @@ static struct cam_ctx_ops
|
||||
},
|
||||
};
|
||||
|
||||
int cam_icp_context_init(struct cam_icp_context *ctx,
|
||||
struct cam_hw_mgr_intf *hw_intf, uint32_t ctx_id, int img_iommu_hdl)
|
||||
int cam_icp_context_init(struct cam_icp_context *ctx, struct cam_hw_mgr_intf *hw_intf,
|
||||
uint32_t ctx_id, int img_iommu_hdl, const char *icp_dev_name)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if ((!ctx) || (!ctx->base) || (!hw_intf)) {
|
||||
CAM_ERR(CAM_ICP, "Invalid params: %pK %pK", ctx, hw_intf);
|
||||
if ((!ctx) || (!ctx->base) || (!hw_intf) || (!icp_dev_name)) {
|
||||
CAM_ERR(CAM_ICP,
|
||||
"Invalid params: ctx: %s hw intf: %s dev name: %s",
|
||||
CAM_IS_NULL_TO_STR(ctx), CAM_IS_NULL_TO_STR(hw_intf),
|
||||
CAM_IS_NULL_TO_STR(icp_dev_name));
|
||||
rc = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user