cam_icp_context.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2021, 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. * @img_iommu_hdl: IOMMU HDL for image buffers
  29. *
  30. */
  31. int cam_icp_context_init(struct cam_icp_context *ctx,
  32. struct cam_hw_mgr_intf *hw_intf, uint32_t ctx_id, int img_iommu_hdl);
  33. /**
  34. * cam_icp_context_deinit() - ICP context deinit
  35. * @ctx: Pointer to context
  36. */
  37. int cam_icp_context_deinit(struct cam_icp_context *ctx);
  38. #endif /* _CAM_ICP_CONTEXT_H_ */