cam_icp_context.h 1.1 KB

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