cam_ope_context.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _CAM_OPE_CONTEXT_H_
  6. #define _CAM_OPE_CONTEXT_H_
  7. #include "cam_context.h"
  8. #define OPE_CTX_MAX 32
  9. /**
  10. * struct cam_ope_context - ope context
  11. * @base: ope context object
  12. * @state_machine: state machine for OPE context
  13. * @req_base: common request structure
  14. * @state: ope context state
  15. * @ctxt_to_hw_map: context to FW handle mapping
  16. */
  17. struct cam_ope_context {
  18. struct cam_context *base;
  19. struct cam_ctx_ops *state_machine;
  20. struct cam_ctx_request req_base[CAM_CTX_REQ_MAX];
  21. uint32_t state;
  22. void *ctxt_to_hw_map;
  23. };
  24. /**
  25. * cam_ope_context_init() - OPE context init
  26. * @ctx: Pointer to context
  27. * @hw_intf: Pointer to OPE hardware interface
  28. * @ctx_id: ID for this context
  29. */
  30. int cam_ope_context_init(struct cam_ope_context *ctx,
  31. struct cam_hw_mgr_intf *hw_intf, uint32_t ctx_id);
  32. /**
  33. * cam_ope_context_deinit() - OPE context deinit
  34. * @ctx: Pointer to context
  35. */
  36. int cam_ope_context_deinit(struct cam_ope_context *ctx);
  37. #endif /* _CAM_OPE_CONTEXT_H_ */