Lines Matching refs:v3d_priv

82 struct v3d_perfmon *v3d_perfmon_find(struct v3d_file_priv *v3d_priv, int id)  in v3d_perfmon_find()  argument
86 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_find()
87 perfmon = idr_find(&v3d_priv->perfmon.idr, id); in v3d_perfmon_find()
89 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_find()
94 void v3d_perfmon_open_file(struct v3d_file_priv *v3d_priv) in v3d_perfmon_open_file() argument
96 mutex_init(&v3d_priv->perfmon.lock); in v3d_perfmon_open_file()
97 idr_init(&v3d_priv->perfmon.idr); in v3d_perfmon_open_file()
109 void v3d_perfmon_close_file(struct v3d_file_priv *v3d_priv) in v3d_perfmon_close_file() argument
111 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_close_file()
112 idr_for_each(&v3d_priv->perfmon.idr, v3d_perfmon_idr_del, NULL); in v3d_perfmon_close_file()
113 idr_destroy(&v3d_priv->perfmon.idr); in v3d_perfmon_close_file()
114 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_close_file()
120 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_create_ioctl() local
150 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_create_ioctl()
151 ret = idr_alloc(&v3d_priv->perfmon.idr, perfmon, V3D_PERFMONID_MIN, in v3d_perfmon_create_ioctl()
153 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_create_ioctl()
168 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_destroy_ioctl() local
172 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_destroy_ioctl()
173 perfmon = idr_remove(&v3d_priv->perfmon.idr, req->id); in v3d_perfmon_destroy_ioctl()
174 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_destroy_ioctl()
188 struct v3d_file_priv *v3d_priv = file_priv->driver_priv; in v3d_perfmon_get_values_ioctl() local
196 mutex_lock(&v3d_priv->perfmon.lock); in v3d_perfmon_get_values_ioctl()
197 perfmon = idr_find(&v3d_priv->perfmon.idr, req->id); in v3d_perfmon_get_values_ioctl()
199 mutex_unlock(&v3d_priv->perfmon.lock); in v3d_perfmon_get_values_ioctl()