blob: 882f7acf459f0309f2f87dab089aafe1dc1e81e9 [file] [log] [blame]
Junzhe Zoucc79a572017-08-22 16:18:57 -07001/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef _CAM_LRME_CONTEXT_H_
14#define _CAM_LRME_CONTEXT_H_
15
16#include "cam_context.h"
17#include "cam_context_utils.h"
18#include "cam_hw_mgr_intf.h"
19#include "cam_req_mgr_interface.h"
20#include "cam_sync_api.h"
21
22#define CAM_LRME_CTX_INDEX_SHIFT 32
23
24/**
25 * struct cam_lrme_context
26 *
27 * @base : Base context pointer for this LRME context
28 * @req_base : List of base request for this LRME context
29 */
30struct cam_lrme_context {
31 struct cam_context *base;
32 struct cam_ctx_request req_base[CAM_CTX_REQ_MAX];
33 uint64_t index;
34};
35
36int cam_lrme_context_init(struct cam_lrme_context *lrme_ctx,
37 struct cam_context *base_ctx, struct cam_hw_mgr_intf *hw_intf,
38 uint64_t index);
39int cam_lrme_context_deinit(struct cam_lrme_context *lrme_ctx);
40
41#endif /* _CAM_LRME_CONTEXT_H_ */