cam_lrme_context.h 901 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_LRME_CONTEXT_H_
  6. #define _CAM_LRME_CONTEXT_H_
  7. #include "cam_context.h"
  8. #include "cam_context_utils.h"
  9. #include "cam_hw_mgr_intf.h"
  10. #include "cam_req_mgr_interface.h"
  11. #define CAM_LRME_CTX_INDEX_SHIFT 16
  12. /**
  13. * struct cam_lrme_context
  14. *
  15. * @base : Base context pointer for this LRME context
  16. * @req_base : List of base request for this LRME context
  17. */
  18. struct cam_lrme_context {
  19. struct cam_context *base;
  20. struct cam_ctx_request req_base[CAM_CTX_REQ_MAX];
  21. uint64_t index;
  22. };
  23. int cam_lrme_context_init(struct cam_lrme_context *lrme_ctx,
  24. struct cam_context *base_ctx, struct cam_hw_mgr_intf *hw_intf,
  25. uint32_t index, int img_iommu_hdl);
  26. int cam_lrme_context_deinit(struct cam_lrme_context *lrme_ctx);
  27. #endif /* _CAM_LRME_CONTEXT_H_ */