mali_kbase_pm_ca_fixed.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. *
  3. * (C) COPYRIGHT 2013-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. * A power policy implementing fixed core availability
  17. */
  18. #include <mali_kbase.h>
  19. #include <mali_kbase_pm.h>
  20. static void fixed_init(struct kbase_device *kbdev)
  21. {
  22. kbdev->pm.backend.ca_in_transition = false;
  23. }
  24. static void fixed_term(struct kbase_device *kbdev)
  25. {
  26. CSTD_UNUSED(kbdev);
  27. }
  28. static u64 fixed_get_core_mask(struct kbase_device *kbdev)
  29. {
  30. return kbdev->gpu_props.props.raw_props.shader_present;
  31. }
  32. static void fixed_update_core_status(struct kbase_device *kbdev,
  33. u64 cores_ready,
  34. u64 cores_transitioning)
  35. {
  36. CSTD_UNUSED(kbdev);
  37. CSTD_UNUSED(cores_ready);
  38. CSTD_UNUSED(cores_transitioning);
  39. }
  40. /*
  41. * The struct kbase_pm_policy structure for the fixed power policy.
  42. *
  43. * This is the static structure that defines the fixed power policy's callback
  44. * and name.
  45. */
  46. const struct kbase_pm_ca_policy kbase_pm_ca_fixed_policy_ops = {
  47. "fixed", /* name */
  48. fixed_init, /* init */
  49. fixed_term, /* term */
  50. fixed_get_core_mask, /* get_core_mask */
  51. fixed_update_core_status, /* update_core_status */
  52. 0u, /* flags */
  53. KBASE_PM_CA_POLICY_ID_FIXED, /* id */
  54. };