Lines Matching refs:mm_stats

629 	if (us <= 0 || !adev->mm_stats.log2_max_MBps)  in us_to_bytes()
635 return us << adev->mm_stats.log2_max_MBps; in us_to_bytes()
640 if (!adev->mm_stats.log2_max_MBps) in bytes_to_us()
643 return bytes >> adev->mm_stats.log2_max_MBps; in bytes_to_us()
674 if (!adev->mm_stats.log2_max_MBps) { in amdgpu_cs_get_threshold_for_moves()
684 spin_lock(&adev->mm_stats.lock); in amdgpu_cs_get_threshold_for_moves()
688 increment_us = time_us - adev->mm_stats.last_update_us; in amdgpu_cs_get_threshold_for_moves()
689 adev->mm_stats.last_update_us = time_us; in amdgpu_cs_get_threshold_for_moves()
690 adev->mm_stats.accum_us = min(adev->mm_stats.accum_us + increment_us, in amdgpu_cs_get_threshold_for_moves()
716 adev->mm_stats.accum_us = max(min_us, adev->mm_stats.accum_us); in amdgpu_cs_get_threshold_for_moves()
722 *max_bytes = us_to_bytes(adev, adev->mm_stats.accum_us); in amdgpu_cs_get_threshold_for_moves()
732 adev->mm_stats.accum_us_vis = min(adev->mm_stats.accum_us_vis + in amdgpu_cs_get_threshold_for_moves()
736 adev->mm_stats.accum_us_vis = in amdgpu_cs_get_threshold_for_moves()
738 adev->mm_stats.accum_us_vis); in amdgpu_cs_get_threshold_for_moves()
741 *max_vis_bytes = us_to_bytes(adev, adev->mm_stats.accum_us_vis); in amdgpu_cs_get_threshold_for_moves()
746 spin_unlock(&adev->mm_stats.lock); in amdgpu_cs_get_threshold_for_moves()
756 spin_lock(&adev->mm_stats.lock); in amdgpu_cs_report_moved_bytes()
757 adev->mm_stats.accum_us -= bytes_to_us(adev, num_bytes); in amdgpu_cs_report_moved_bytes()
758 adev->mm_stats.accum_us_vis -= bytes_to_us(adev, num_vis_bytes); in amdgpu_cs_report_moved_bytes()
759 spin_unlock(&adev->mm_stats.lock); in amdgpu_cs_report_moved_bytes()