etnaviv_dump.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2015 Etnaviv Project
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published by
  6. * the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along with
  14. * this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. * Etnaviv devcoredump file definitions
  17. */
  18. #ifndef ETNAVIV_DUMP_H
  19. #define ETNAVIV_DUMP_H
  20. #include <linux/types.h>
  21. enum {
  22. ETDUMP_MAGIC = 0x414e5445,
  23. ETDUMP_BUF_REG = 0,
  24. ETDUMP_BUF_MMU,
  25. ETDUMP_BUF_RING,
  26. ETDUMP_BUF_CMD,
  27. ETDUMP_BUF_BOMAP,
  28. ETDUMP_BUF_BO,
  29. ETDUMP_BUF_END,
  30. };
  31. struct etnaviv_dump_object_header {
  32. __le32 magic;
  33. __le32 type;
  34. __le32 file_offset;
  35. __le32 file_size;
  36. __le64 iova;
  37. __le32 data[2];
  38. };
  39. /* Registers object, an array of these */
  40. struct etnaviv_dump_registers {
  41. __le32 reg;
  42. __le32 value;
  43. };
  44. #ifdef __KERNEL__
  45. struct etnaviv_gpu;
  46. void etnaviv_core_dump(struct etnaviv_gpu *gpu);
  47. #endif
  48. #endif