msm_cvp_clocks.c 553 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
  4. */
  5. #include "msm_cvp_common.h"
  6. #include "cvp_hfi_api.h"
  7. #include "msm_cvp_debug.h"
  8. #include "msm_cvp_clocks.h"
  9. int msm_cvp_set_clocks(struct msm_cvp_core *core)
  10. {
  11. struct cvp_hfi_device *hdev;
  12. int rc;
  13. if (!core || !core->device) {
  14. dprintk(CVP_ERR, "%s Invalid args: %pK\n", __func__, core);
  15. return -EINVAL;
  16. }
  17. hdev = core->device;
  18. rc = call_hfi_op(hdev, scale_clocks,
  19. hdev->hfi_device_data, core->curr_freq);
  20. return rc;
  21. }