diff options
author | Ofir Bitton <obitton@habana.ai> | 2021-12-07 10:20:46 +0100 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-12-26 07:59:08 +0100 |
commit | 7c623ef732bdba440b1f0e74a99265cb7587df7e (patch) | |
tree | 0e96315292be6c8e99a6e9647e02be418216ec9f /drivers/misc | |
parent | habanalabs: wait again for multi-CS if no CS completed (diff) | |
download | linux-7c623ef732bdba440b1f0e74a99265cb7587df7e.tar.xz linux-7c623ef732bdba440b1f0e74a99265cb7587df7e.zip |
habanalabs: return correct clock throttling period
Current clock throttling period returned from driver was wrong due
to wrong time comparison.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/habanalabs_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/habanalabs_ioctl.c b/drivers/misc/habanalabs/common/habanalabs_ioctl.c index 9210114beefe..f571641c19ae 100644 --- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c +++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c @@ -335,9 +335,9 @@ static int clk_throttle_info(struct hl_fpriv *hpriv, struct hl_info_args *args) ktime_to_us(hdev->clk_throttling.timestamp[i].start); if (ktime_compare(hdev->clk_throttling.timestamp[i].end, zero_time)) - end_time = ktime_get(); - else end_time = hdev->clk_throttling.timestamp[i].end; + else + end_time = ktime_get(); clk_throttle.clk_throttling_duration_ns[i] = ktime_to_ns(ktime_sub(end_time, |