etnaviv_dump.h 670 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2015 Etnaviv Project
  4. */
  5. #ifndef ETNAVIV_DUMP_H
  6. #define ETNAVIV_DUMP_H
  7. #include <linux/types.h>
  8. enum {
  9. ETDUMP_MAGIC = 0x414e5445,
  10. ETDUMP_BUF_REG = 0,
  11. ETDUMP_BUF_MMU,
  12. ETDUMP_BUF_RING,
  13. ETDUMP_BUF_CMD,
  14. ETDUMP_BUF_BOMAP,
  15. ETDUMP_BUF_BO,
  16. ETDUMP_BUF_END,
  17. };
  18. struct etnaviv_dump_object_header {
  19. __le32 magic;
  20. __le32 type;
  21. __le32 file_offset;
  22. __le32 file_size;
  23. __le64 iova;
  24. __le32 data[2];
  25. };
  26. /* Registers object, an array of these */
  27. struct etnaviv_dump_registers {
  28. __le32 reg;
  29. __le32 value;
  30. };
  31. #ifdef __KERNEL__
  32. struct etnaviv_gpu;
  33. void etnaviv_core_dump(struct etnaviv_gpu *gpu);
  34. #endif
  35. #endif