hva-hw.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) STMicroelectronics SA 2015
  3. * Authors: Yannick Fertre <yannick.fertre@st.com>
  4. * Hugues Fruchet <hugues.fruchet@st.com>
  5. * License terms: GNU General Public License (GPL), version 2
  6. */
  7. #ifndef HVA_HW_H
  8. #define HVA_HW_H
  9. #include "hva-mem.h"
  10. /* HVA Versions */
  11. #define HVA_VERSION_UNKNOWN 0x000
  12. #define HVA_VERSION_V400 0x400
  13. /* HVA command types */
  14. enum hva_hw_cmd_type {
  15. /* RESERVED = 0x00 */
  16. /* RESERVED = 0x01 */
  17. H264_ENC = 0x02,
  18. /* RESERVED = 0x03 */
  19. /* RESERVED = 0x04 */
  20. /* RESERVED = 0x05 */
  21. /* RESERVED = 0x06 */
  22. /* RESERVED = 0x07 */
  23. REMOVE_CLIENT = 0x08,
  24. FREEZE_CLIENT = 0x09,
  25. START_CLIENT = 0x0A,
  26. FREEZE_ALL = 0x0B,
  27. START_ALL = 0x0C,
  28. REMOVE_ALL = 0x0D
  29. };
  30. int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva);
  31. void hva_hw_remove(struct hva_dev *hva);
  32. int hva_hw_runtime_suspend(struct device *dev);
  33. int hva_hw_runtime_resume(struct device *dev);
  34. int hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd,
  35. struct hva_buffer *task);
  36. #ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS
  37. void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s);
  38. #endif
  39. #endif /* HVA_HW_H */