Lines Matching refs:v3d_priv
85 struct v3d_perfmon *v3d_perfmon_find(struct v3d_file_priv *v3d_priv, int id) in v3d_perfmon_find() argument
89 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_find()
90 perfmon = idr_find(&v3d_priv->perfmon.idr, id); in v3d_perfmon_find()
92 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_find()
97 void v3d_perfmon_open_file(struct v3d_file_priv *v3d_priv) in v3d_perfmon_open_file() argument
99 mutex_init(&v3d_priv->perfmon.lock); in v3d_perfmon_open_file()
100 idr_init_base(&v3d_priv->perfmon.idr, 1); in v3d_perfmon_open_file()
112 void v3d_perfmon_close_file(struct v3d_file_priv *v3d_priv) in v3d_perfmon_close_file() argument
114 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_close_file()
115 idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, NULL); in v3d_perfmon_close_file()
116 idr_destroy(&v3d_priv->perfmon.idr); in v3d_perfmon_close_file()
117 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_close_file()
118 mutex_destroy(&v3d_priv->perfmon.lock); in v3d_perfmon_close_file()
124 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_create_ioctl() local
154 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_create_ioctl()
155 ret = idr_alloc(&v3d_priv->perfmon.idr, perfmon, V3D_PERFMONID_MIN, in v3d_perfmon_create_ioctl()
157 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_create_ioctl()
173 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_destroy_ioctl() local
177 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_destroy_ioctl()
178 perfmon = idr_remove(&v3d_priv->perfmon.idr, req->id); in v3d_perfmon_destroy_ioctl()
179 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_destroy_ioctl()
193 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_get_values_ioctl() local
201 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_get_values_ioctl()
202 perfmon = idr_find(&v3d_priv->perfmon.idr, req->id); in v3d_perfmon_get_values_ioctl()
204 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_get_values_ioctl()