Lines Matching defs:priv

239 	struct drm_file *priv;
251 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
252 if (!priv)
255 filp->private_data = priv;
256 priv->filp = filp;
257 priv->uid = current_euid();
258 priv->pid = task_pid_nr(current);
259 priv->minor = idr_find(&drm_minors_idr, minor_id);
260 priv->ioctl_count = 0;
262 priv->authenticated = capable(CAP_SYS_ADMIN);
263 priv->lock_count = 0;
265 INIT_LIST_HEAD(&priv->lhead);
266 INIT_LIST_HEAD(&priv->fbs);
267 INIT_LIST_HEAD(&priv->event_list);
268 init_waitqueue_head(&priv->event_wait);
269 priv->event_space = 4096; /* set aside 4k for event buffer */
272 drm_gem_open(dev, priv);
275 drm_prime_init_file_private(&priv->prime);
278 ret = dev->driver->open(dev, priv);
286 if (!priv->minor->master) {
288 priv->minor->master = drm_master_create(priv->minor);
289 if (!priv->minor->master) {
295 priv->is_master = 1;
296 /* take another reference for the copy in the local file priv */
297 priv->master = drm_master_get(priv->minor->master);
299 priv->authenticated = 1;
303 ret = dev->driver->master_create(dev, priv->master);
307 drm_master_put(&priv->minor->master);
308 drm_master_put(&priv->master);
315 ret = dev->driver->master_set(dev, priv, true);
318 drm_master_put(&priv->minor->master);
319 drm_master_put(&priv->master);
327 priv->master = drm_master_get(priv->minor->master);
332 list_add(&priv->lhead, &dev->filelist);
356 kfree(priv);
364 struct drm_file *priv = filp->private_data;
365 struct drm_device *dev = priv->minor->dev;
368 (long)old_encode_dev(priv->minor->device));
569 /* drop the reference held my the file priv */