mali_kbase_hw.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. *
  3. * (C) COPYRIGHT 2012-2015 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. * @file
  17. * Run-time work-arounds helpers
  18. */
  19. #ifndef _KBASE_HW_H_
  20. #define _KBASE_HW_H_
  21. #include "mali_kbase_defs.h"
  22. /**
  23. * @brief Tell whether a work-around should be enabled
  24. */
  25. #define kbase_hw_has_issue(kbdev, issue)\
  26. test_bit(issue, &(kbdev)->hw_issues_mask[0])
  27. /**
  28. * @brief Tell whether a feature is supported
  29. */
  30. #define kbase_hw_has_feature(kbdev, feature)\
  31. test_bit(feature, &(kbdev)->hw_features_mask[0])
  32. /**
  33. * @brief Set the HW issues mask depending on the GPU ID
  34. */
  35. int kbase_hw_set_issues_mask(struct kbase_device *kbdev);
  36. /**
  37. * @brief Set the features mask depending on the GPU ID
  38. */
  39. void kbase_hw_set_features_mask(struct kbase_device *kbdev);
  40. #endif // ifndef _KBASE_HW_H_