Lines Matching full:v3d

198 void v3d_perfmon_init(struct v3d_dev *v3d)  in v3d_perfmon_init()  argument
203 if (v3d->ver >= 71) { in v3d_perfmon_init()
206 } else if (v3d->ver >= 42) { in v3d_perfmon_init()
211 v3d->perfmon_info.max_counters = max; in v3d_perfmon_init()
212 v3d->perfmon_info.counters = counters; in v3d_perfmon_init()
229 void v3d_perfmon_start(struct v3d_dev *v3d, struct v3d_perfmon *perfmon) in v3d_perfmon_start() argument
235 if (WARN_ON_ONCE(!perfmon || v3d->active_perfmon)) in v3d_perfmon_start()
244 v3d->ver); in v3d_perfmon_start()
248 V3D_PCTR_S1, v3d->ver); in v3d_perfmon_start()
251 V3D_PCTR_S2, v3d->ver); in v3d_perfmon_start()
254 V3D_PCTR_S3, v3d->ver); in v3d_perfmon_start()
262 v3d->active_perfmon = perfmon; in v3d_perfmon_start()
265 void v3d_perfmon_stop(struct v3d_dev *v3d, struct v3d_perfmon *perfmon, in v3d_perfmon_stop() argument
270 if (!perfmon || !v3d->active_perfmon) in v3d_perfmon_stop()
274 if (perfmon != v3d->active_perfmon) { in v3d_perfmon_stop()
285 v3d->active_perfmon = NULL; in v3d_perfmon_stop()
310 struct v3d_dev *v3d = (struct v3d_dev *)data; in v3d_perfmon_idr_del() local
313 if (perfmon == v3d->active_perfmon) in v3d_perfmon_idr_del()
314 v3d_perfmon_stop(v3d, perfmon, false); in v3d_perfmon_idr_del()
317 cmpxchg(&v3d->global_perfmon, perfmon, NULL); in v3d_perfmon_idr_del()
326 struct v3d_dev *v3d = v3d_priv->v3d; in v3d_perfmon_close_file() local
329 idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, v3d); in v3d_perfmon_close_file()
340 struct v3d_dev *v3d = v3d_priv->v3d; in v3d_perfmon_create_ioctl() local
352 if (req->counters[i] >= v3d->perfmon_info.max_counters) in v3d_perfmon_create_ioctl()
390 struct v3d_dev *v3d = v3d_priv->v3d; in v3d_perfmon_destroy_ioctl() local
401 if (perfmon == v3d->active_perfmon) in v3d_perfmon_destroy_ioctl()
402 v3d_perfmon_stop(v3d, perfmon, false); in v3d_perfmon_destroy_ioctl()
405 cmpxchg(&v3d->global_perfmon, perfmon, NULL); in v3d_perfmon_destroy_ioctl()
415 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_perfmon_get_values_ioctl() local
428 v3d_perfmon_stop(v3d, perfmon, true); in v3d_perfmon_get_values_ioctl()
443 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_perfmon_get_counter_ioctl() local
451 if (!v3d->perfmon_info.max_counters) in v3d_perfmon_get_counter_ioctl()
455 if (req->counter >= v3d->perfmon_info.max_counters) in v3d_perfmon_get_counter_ioctl()
458 counter = &v3d->perfmon_info.counters[req->counter]; in v3d_perfmon_get_counter_ioctl()
472 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_perfmon_set_global_ioctl() local
484 if (!v3d->global_perfmon) in v3d_perfmon_set_global_ioctl()
487 xchg(&v3d->global_perfmon, NULL); in v3d_perfmon_set_global_ioctl()
492 if (cmpxchg(&v3d->global_perfmon, NULL, perfmon)) in v3d_perfmon_set_global_ioctl()