mali_kbase_hwaccess_time.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. *
  3. * (C) COPYRIGHT 2014 ARM Limited. All rights reserved.
  4. *
  5. * This program is free software and is provided to you under the terms of the
  6. * GNU General Public License version 2 as published by the Free Software
  7. * Foundation, and any use by you of this program is subject to the terms
  8. * of such GNU licence.
  9. *
  10. * A copy of the licence is included with the program, and can also be obtained
  11. * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  12. * Boston, MA 02110-1301, USA.
  13. *
  14. */
  15. /**
  16. *
  17. */
  18. #ifndef _KBASE_BACKEND_TIME_H_
  19. #define _KBASE_BACKEND_TIME_H_
  20. /**
  21. * kbase_backend_get_gpu_time() - Get current GPU time
  22. * @kbdev: Device pointer
  23. * @cycle_counter: Pointer to u64 to store cycle counter in
  24. * @system_time: Pointer to u64 to store system time in
  25. * @ts: Pointer to struct timespec to store current monotonic
  26. * time in
  27. */
  28. void kbase_backend_get_gpu_time(struct kbase_device *kbdev, u64 *cycle_counter,
  29. u64 *system_time, struct timespec *ts);
  30. /**
  31. * kbase_wait_write_flush() - Wait for GPU write flush
  32. * @kctx: Context pointer
  33. *
  34. * Wait 1000 GPU clock cycles. This delay is known to give the GPU time to flush
  35. * its write buffer.
  36. *
  37. * If GPU resets occur then the counters are reset to zero, the delay may not be
  38. * as expected.
  39. *
  40. * This function is only in use for BASE_HW_ISSUE_6367
  41. */
  42. void kbase_wait_write_flush(struct kbase_context *kctx);
  43. #endif // ifndef _KBASE_BACKEND_TIME_H_