hfi_packet.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, 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. #include "hfi_definition.h"
  13. u32 get_hfi_port(struct msm_vidc_inst *inst,
  14. enum msm_vidc_buffer_type buffer_type);
  15. u32 get_hfi_buffer_type(enum msm_vidc_domain_type domain,
  16. enum msm_vidc_buffer_type buffer_type);
  17. u32 get_hfi_codec(struct msm_vidc_inst *inst);
  18. int get_hfi_buffer(struct msm_vidc_inst *inst,
  19. struct msm_vidc_buffer *buffer, struct hfi_buffer *buf);
  20. int hfi_create_header(u8 *pkt, u32 session_id,
  21. u32 header_id, u32 num_packets, u32 total_size);
  22. int hfi_create_packet(u8 *packet, u32 packet_size, u32 *offset,
  23. u32 pkt_type, u32 pkt_flags, u32 payload_type, u32 port,
  24. u32 packet_id, void *payload, u32 payload_size);
  25. int hfi_create_buffer(u8 *packet, u32 packet_size, u32 *offset,
  26. enum msm_vidc_domain_type domain, struct msm_vidc_buffer *data);
  27. int hfi_packet_sys_init(struct msm_vidc_core *core,
  28. u8 *pkt, u32 pkt_size);
  29. int hfi_packet_image_version(struct msm_vidc_core *core,
  30. u8 *pkt, u32 pkt_size);
  31. int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
  32. u8 *pkt, u32 pkt_size);
  33. int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
  34. u8 *pkt, u32 pkt_size, u32 debug_config);
  35. int hfi_packet_session_command(struct msm_vidc_inst *inst,
  36. u32 pkt_type, u32 flags, u32 port, u32 session_id,
  37. u32 payload_type, void *payload, u32 payload_size);
  38. int hfi_packet_session_property(struct msm_vidc_inst *inst,
  39. u32 pkt_type, u32 flags, u32 port,
  40. u32 payload_type, void *payload, u32 payload_size);
  41. #endif // _HFI_PACKET_H_