mali_kbase_pm_always_on.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. *
  3. * (C) COPYRIGHT 2010-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. * "Always on" power management policy
  17. */
  18. #include <mali_kbase.h>
  19. #include <mali_kbase_pm.h>
  20. static u64 always_on_get_core_mask(struct kbase_device *kbdev)
  21. {
  22. return kbdev->gpu_props.props.raw_props.shader_present;
  23. }
  24. static bool always_on_get_core_active(struct kbase_device *kbdev)
  25. {
  26. return true;
  27. }
  28. static void always_on_init(struct kbase_device *kbdev)
  29. {
  30. CSTD_UNUSED(kbdev);
  31. }
  32. static void always_on_term(struct kbase_device *kbdev)
  33. {
  34. CSTD_UNUSED(kbdev);
  35. }
  36. /*
  37. * The struct kbase_pm_policy structure for the demand power policy.
  38. *
  39. * This is the static structure that defines the demand power policy's callback
  40. * and name.
  41. */
  42. const struct kbase_pm_policy kbase_pm_always_on_policy_ops = {
  43. "always_on", /* name */
  44. always_on_init, /* init */
  45. always_on_term, /* term */
  46. always_on_get_core_mask, /* get_core_mask */
  47. always_on_get_core_active, /* get_core_active */
  48. 0u, /* flags */
  49. KBASE_PM_POLICY_ID_ALWAYS_ON, /* id */
  50. };