Lines Matching defs:file_priv
285 static void drm_events_release(struct drm_file *file_priv)
287 struct drm_device *dev = file_priv->minor->dev;
296 if (v->base.file_priv == file_priv) {
303 list_for_each_entry_safe(e, et, struct drm_pending_event, &file_priv->event_list, link)
320 drm_release(struct drm_file *file_priv)
322 struct drm_device *dev = file_priv->minor->dev;
330 dev->driver->preclose(dev, file_priv);
336 /* Release any auth tokens that might point to this file_priv,
338 if (file_priv->magic)
339 (void) drm_remove_magic(file_priv->master, file_priv->magic);
342 if (file_priv->minor->master)
343 drm_master_release(dev, file_priv);
346 drm_core_reclaim_buffers(dev, file_priv);
348 drm_events_release(file_priv);
351 drm_fb_release(file_priv);
354 drm_gem_release(dev, file_priv);
361 if (pos->tag == file_priv &&
379 if (file_priv->is_master) {
380 struct drm_master *master = file_priv->master;
383 if ((temp->master == file_priv->master) &&
384 (temp != file_priv))
395 master->lock.file_priv = NULL;
398 if (file_priv->minor->master == file_priv->master) {
401 dev->driver->master_drop(dev, file_priv, true);
402 drm_master_put(&file_priv->minor->master);
407 drm_master_put(&file_priv->master);
408 file_priv->is_master = 0;
409 list_del(&file_priv->lhead);
413 dev->driver->postclose(dev, file_priv);
414 kfree(file_priv, sizeof (*file_priv));
438 drm_dequeue_event(struct drm_file *file_priv,
441 struct drm_device *dev = file_priv->minor->dev;
449 if (list_empty(&file_priv->event_list))
451 e = list_first_entry(&file_priv->event_list,
456 file_priv->event_space += e->event->length;
466 ssize_t drm_read(struct drm_file *file_priv, struct uio *uiop)
472 DRM_WAIT(ret, &file_priv->event_wait,
473 !list_empty(&file_priv->event_list));
475 DRM_ERROR("returns %d event_list is %d", ret, list_empty(&file_priv->event_list));
480 while (drm_dequeue_event(file_priv, total, uiop->uio_iov->iov_len, &e)) {
493 short drm_poll(struct drm_file *file_priv, short events)
497 if (!list_empty(&file_priv->event_list)) {