hfi_packet.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. struct hfi_header {
  11. u32 size;
  12. u32 session_id;
  13. u32 header_id;
  14. u32 reserved[4];
  15. u32 num_packets;
  16. };
  17. struct hfi_packet {
  18. u32 size;
  19. u32 type;
  20. u32 flags;
  21. u32 payload_info;
  22. u32 port;
  23. u32 packet_id;
  24. u32 reserved[2];
  25. };
  26. struct hfi_buffer {
  27. u32 type;
  28. u32 index;
  29. u64 base_address;
  30. u32 addr_offset;
  31. u32 buffer_size;
  32. u32 data_offset;
  33. u32 data_size;
  34. u32 flags;
  35. u64 timestamp;
  36. u32 reserved[5];
  37. };
  38. int hfi_packet_sys_init(struct msm_vidc_core *core,
  39. void *packet, u32 packet_size);
  40. int hfi_packet_image_version(struct msm_vidc_core *core,
  41. void *packet, u32 packet_size);
  42. int hfi_packet_sys_debug_config(struct msm_vidc_core *core,
  43. void *packet, u32 packet_size, u32 mode);
  44. int hfi_packet_sys_pc_prep(struct msm_vidc_core *core,
  45. void *packet, u32 packet_size);
  46. #endif // _HFI_PACKET_H_