hfi_packet.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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,
  21. enum hfi_packet_port_type port_type);
  22. u32 get_hfi_codec(struct msm_vidc_inst *inst);
  23. u32 get_hfi_colorformat(struct msm_vidc_inst *inst,
  24. enum msm_vidc_colorformat_type colorformat);
  25. int get_hfi_buffer(struct msm_vidc_inst *inst,
  26. struct msm_vidc_buffer *buffer,
  27. struct hfi_buffer *buf);
  28. int hfi_create_header(u8 *packet, u32 packet_size,
  29. u32 session_id, u32 header_id);
  30. int hfi_create_packet(u8 *packet, u32 packet_size,
  31. u32 pkt_type, u32 pkt_flags,
  32. u32 payload_type, u32 port,
  33. u32 packet_id, void *payload,
  34. u32 payload_size);
  35. int hfi_create_buffer(u8 *packet, u32 packet_size, u32 *offset,
  36. enum msm_vidc_domain_type domain,
  37. struct msm_vidc_buffer *data);
  38. int hfi_packet_sys_init(struct msm_vidc_core *core,
  39. u8 *pkt, u32 pkt_size);
  40. int hfi_packet_image_version(struct msm_vidc_core *core,
  41. u8 *pkt, u32 pkt_size);
  42. int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
  43. u8 *pkt, u32 pkt_size);
  44. int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
  45. u8 *pkt, u32 pkt_size,
  46. u32 debug_config);
  47. int hfi_packet_session_command(struct msm_vidc_inst *inst,
  48. u32 pkt_type, u32 flags,
  49. u32 port, u32 session_id,
  50. u32 payload_type, void *payload,
  51. u32 payload_size);
  52. int hfi_packet_sys_intraframe_powercollapse(struct msm_vidc_core *core,
  53. u8 *pkt, u32 pkt_size,
  54. u32 enable);
  55. #endif // _HFI_PACKET_H_