Files
android_kernel_samsung_sm86…/drivers/cam_icp/cam_icp_context.h
Sokchetra Eung a8b332e9d0 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>
2022-12-06 11:37:08 -08:00

47 line
1.3 KiB
C

/* 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.
*/
#ifndef _CAM_ICP_CONTEXT_H_
#define _CAM_ICP_CONTEXT_H_
#include "cam_context.h"
/**
* struct cam_icp_context - icp context
* @base: icp context object
* @state_machine: state machine for ICP context
* @req_base: common request structure
* @state: icp context state
* @ctxt_to_hw_map: context to FW handle mapping
*/
struct cam_icp_context {
struct cam_context *base;
struct cam_ctx_ops *state_machine;
struct cam_ctx_request req_base[CAM_CTX_ICP_REQ_MAX];
uint32_t state;
void *ctxt_to_hw_map;
};
/**
* cam_icp_context_init() - ICP context init
* @ctx: Pointer to context
* @hw_intf: Pointer to ICP hardware interface
* @ctx_id: ID for this context
* @img_iommu_hdl: IOMMU HDL for image buffers
* @icp_dev_name: name of the icp subdevice
*/
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);
/**
* cam_icp_context_deinit() - ICP context deinit
* @ctx: Pointer to context
*/
int cam_icp_context_deinit(struct cam_icp_context *ctx);
#endif /* _CAM_ICP_CONTEXT_H_ */