
Add new camera driver Camera Reformat Engine (CRE). CRs-Fixed: 2893978 Change-Id: Ia39b222493393bf7bb72525c86f0060ca0dc77c2 Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
68 lines
1.5 KiB
C
68 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _CAM_CRE_CONTEXT_H_
|
|
#define _CAM_CRE_CONTEXT_H_
|
|
|
|
#include <media/cam_cre.h>
|
|
|
|
#include "cam_context.h"
|
|
#include "cam_cre_hw_mgr_intf.h"
|
|
|
|
#define CAM_CRE_HW_EVENT_MAX 20
|
|
|
|
/**
|
|
* struct cam_cre_context - CRE context
|
|
* @base: Base cre cam context object
|
|
* @req_base: Common request structure
|
|
*/
|
|
struct cam_cre_context {
|
|
struct cam_context *base;
|
|
struct cam_ctx_request req_base[CAM_CTX_REQ_MAX];
|
|
};
|
|
|
|
/* cam cre context irq handling function type */
|
|
typedef int (*cam_cre_hw_event_cb_func)(
|
|
struct cam_cre_context *ctx_cre,
|
|
void *evt_data);
|
|
|
|
/**
|
|
* struct cam_cre_ctx_irq_ops - Function table for handling IRQ callbacks
|
|
*
|
|
* @irq_ops: Array of handle function pointers.
|
|
*
|
|
*/
|
|
struct cam_cre_ctx_irq_ops {
|
|
cam_cre_hw_event_cb_func irq_ops[CAM_CRE_HW_EVENT_MAX];
|
|
};
|
|
|
|
/**
|
|
* cam_cre_context_init()
|
|
*
|
|
* @brief: Initialization function for the CRE context
|
|
*
|
|
* @ctx: CRE context obj to be initialized
|
|
* @ctx_base: Context base from cam_context
|
|
* @hw_intf: CRE hw manager interface
|
|
* @ctx_id: ID for this context
|
|
*
|
|
*/
|
|
int cam_cre_context_init(struct cam_cre_context *ctx,
|
|
struct cam_context *ctx_base,
|
|
struct cam_hw_mgr_intf *hw_intf,
|
|
uint32_t ctx_id);
|
|
|
|
/**
|
|
* cam_cre_context_deinit()
|
|
*
|
|
* @brief: Deinitialize function for the CRE context
|
|
*
|
|
* @ctx: CRE context obj to be deinitialized
|
|
*
|
|
*/
|
|
int cam_cre_context_deinit(struct cam_cre_context *ctx);
|
|
|
|
#endif /* __CAM_CRE_CONTEXT_H__ */
|