hfi_packet.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020-2021,, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _HFI_PACKET_H_
  6. #define _HFI_PACKET_H_
  7. #include "msm_vidc_internal.h"
  8. #include "msm_vidc_inst.h"
  9. #include "msm_vidc_core.h"
  10. #include "hfi_command.h"
  11. #include "hfi_property.h"
  12. u32 get_hfi_port(struct msm_vidc_inst *inst,
  13. enum msm_vidc_port_type port);
  14. u32 get_hfi_port_from_buffer_type(struct msm_vidc_inst *inst,
  15. enum msm_vidc_buffer_type buffer_type);
  16. u32 hfi_buf_type_from_driver(enum msm_vidc_domain_type domain,
  17. enum msm_vidc_buffer_type buffer_type);
  18. u32 hfi_buf_type_to_driver(enum msm_vidc_domain_type domain,
  19. enum hfi_buffer_type buffer_type, enum hfi_packet_port_type port_type);
  20. u32 get_hfi_codec(struct msm_vidc_inst *inst);
  21. u32 get_hfi_colorformat(struct msm_vidc_inst *inst,
  22. enum msm_vidc_colorformat_type colorformat);
  23. int get_hfi_buffer(struct msm_vidc_inst *inst,
  24. struct msm_vidc_buffer *buffer, struct hfi_buffer *buf);
  25. int hfi_create_header(u8 *packet, u32 packet_size,
  26. u32 session_id, u32 header_id);
  27. int hfi_create_packet(u8 *packet, u32 packet_size,
  28. u32 pkt_type, u32 pkt_flags, u32 payload_type, u32 port,
  29. u32 packet_id, void *payload, u32 payload_size);
  30. int hfi_create_buffer(u8 *packet, u32 packet_size, u32 *offset,
  31. enum msm_vidc_domain_type domain, struct msm_vidc_buffer *data);
  32. int hfi_packet_sys_init(struct msm_vidc_core *core,
  33. u8 *pkt, u32 pkt_size);
  34. int hfi_packet_image_version(struct msm_vidc_core *core,
  35. u8 *pkt, u32 pkt_size);
  36. int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
  37. u8 *pkt, u32 pkt_size);
  38. int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
  39. u8 *pkt, u32 pkt_size, u32 debug_config);
  40. int hfi_packet_session_command(struct msm_vidc_inst *inst,
  41. u32 pkt_type, u32 flags, u32 port, u32 session_id,
  42. u32 payload_type, void *payload, u32 payload_size);
  43. int hfi_packet_sys_intraframe_powercollapse(struct msm_vidc_core* core,
  44. u8* pkt, u32 pkt_size, u32 enable);
  45. #endif // _HFI_PACKET_H_