Lines Matching refs:hwc
48 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_event_init() local
55 hwc->conf = event->attr.config; in amdgpu_perf_event_init()
63 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_start() local
68 if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED))) in amdgpu_perf_start()
71 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in amdgpu_perf_start()
72 hwc->state = 0; in amdgpu_perf_start()
77 pe->adev->df_funcs->pmc_start(pe->adev, hwc->conf, 1); in amdgpu_perf_start()
79 pe->adev->df_funcs->pmc_start(pe->adev, hwc->conf, 0); in amdgpu_perf_start()
92 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_read() local
100 prev = local64_read(&hwc->prev_count); in amdgpu_perf_read()
104 pe->adev->df_funcs->pmc_get_count(pe->adev, hwc->conf, in amdgpu_perf_read()
111 } while (local64_cmpxchg(&hwc->prev_count, prev, count) != prev); in amdgpu_perf_read()
119 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_stop() local
124 if (hwc->state & PERF_HES_UPTODATE) in amdgpu_perf_stop()
129 pe->adev->df_funcs->pmc_stop(pe->adev, hwc->conf, 0); in amdgpu_perf_stop()
135 WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); in amdgpu_perf_stop()
136 hwc->state |= PERF_HES_STOPPED; in amdgpu_perf_stop()
138 if (hwc->state & PERF_HES_UPTODATE) in amdgpu_perf_stop()
142 hwc->state |= PERF_HES_UPTODATE; in amdgpu_perf_stop()
148 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_add() local
159 retval = pe->adev->df_funcs->pmc_start(pe->adev, hwc->conf, 1); in amdgpu_perf_add()
178 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_del() local
187 pe->adev->df_funcs->pmc_stop(pe->adev, hwc->conf, 1); in amdgpu_perf_del()