hfi_packet.h 2.0 KB

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