hfi_packet.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 get_hfi_buffer_type(enum msm_vidc_domain_type domain,
  17. enum msm_vidc_buffer_type buffer_type);
  18. u32 get_hfi_codec(struct msm_vidc_inst *inst);
  19. u32 get_hfi_colorformat(struct msm_vidc_inst *inst,
  20. enum msm_vidc_colorformat_type colorformat);
  21. int get_hfi_buffer(struct msm_vidc_inst *inst,
  22. struct msm_vidc_buffer *buffer, struct hfi_buffer *buf);
  23. int hfi_create_header(u8 *packet, u32 packet_size,
  24. u32 session_id, u32 header_id);
  25. int hfi_create_packet(u8 *packet, u32 packet_size,
  26. u32 pkt_type, u32 pkt_flags, u32 payload_type, u32 port,
  27. u32 packet_id, void *payload, u32 payload_size);
  28. int hfi_create_buffer(u8 *packet, u32 packet_size, u32 *offset,
  29. enum msm_vidc_domain_type domain, struct msm_vidc_buffer *data);
  30. int hfi_packet_sys_init(struct msm_vidc_core *core,
  31. u8 *pkt, u32 pkt_size);
  32. int hfi_packet_image_version(struct msm_vidc_core *core,
  33. u8 *pkt, u32 pkt_size);
  34. int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
  35. u8 *pkt, u32 pkt_size);
  36. int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
  37. u8 *pkt, u32 pkt_size, u32 debug_config);
  38. int hfi_packet_session_command(struct msm_vidc_inst *inst,
  39. u32 pkt_type, u32 flags, u32 port, u32 session_id,
  40. u32 payload_type, void *payload, u32 payload_size);
  41. int hfi_packet_sys_intraframe_powercollapse(struct msm_vidc_core* core,
  42. u8* pkt, u32 pkt_size, u32 enable);
  43. #endif // _HFI_PACKET_H_