Lines Matching refs:priv
172 struct drm_file *priv;
184 priv = kmalloc(sizeof(*priv), GFP_KERNEL);
185 if (!priv)
188 (void) memset(priv, 0, sizeof(*priv));
189 (void) idr_replace(&minor->clone_idr, priv, clone_id); /* OSOL_drm */
190 priv->uid = crgetsuid(credp);
191 priv->pid = ddi_get_pid();
192 priv->minor = minor;
193 priv->ioctl_count = 0;
195 priv->authenticated = DRM_SUSER(credp);
196 priv->lock_count = 0;
198 INIT_LIST_HEAD(&priv->lhead);
199 INIT_LIST_HEAD(&priv->fbs);
200 mutex_init(&priv->fbs_lock, NULL, MUTEX_DRIVER, NULL);
201 INIT_LIST_HEAD(&priv->event_list);
202 DRM_INIT_WAITQUEUE(&priv->event_wait, DRM_INTR_PRI(dev));
203 priv->event_space = 4096; /* set aside 4k for event buffer */
206 drm_gem_open(dev, priv);
209 ret = dev->driver->open(dev, priv);
217 if (!priv->minor->master) {
219 priv->minor->master = drm_master_create(priv->minor);
220 if (!priv->minor->master) {
226 priv->is_master = 1;
227 /* take another reference for the copy in the local file priv */
228 priv->master = drm_master_get(priv->minor->master);
230 priv->authenticated = 1;
234 ret = dev->driver->master_create(dev, priv->master);
238 drm_master_put(&priv->minor->master);
239 drm_master_put(&priv->master);
246 ret = dev->driver->master_set(dev, priv, true);
249 drm_master_put(&priv->minor->master);
250 drm_master_put(&priv->master);
258 priv->master = drm_master_get(priv->minor->master);
263 list_add(&priv->lhead, &dev->filelist, (caddr_t)priv);
268 kfree(priv, sizeof (*priv));
406 /* drop the reference held my the file priv */