Lines Matching +full:device +full:- +full:unique
44 * \param dev DRM device.
56 struct drm_device *dev = master->minor->dev; in drm_find_file()
59 if (!drm_ht_find_item(&master->magiclist, (unsigned long)magic, &hash)) { in drm_find_file()
61 retval = pt->priv; in drm_find_file()
70 * \param dev DRM device.
82 struct drm_device *dev = master->minor->dev; in drm_add_magic()
87 return -ENOMEM; in drm_add_magic()
88 entry->priv = priv; in drm_add_magic()
89 entry->hash_item.key = (unsigned long)magic; in drm_add_magic()
91 drm_ht_insert_item(&master->magiclist, &entry->hash_item); in drm_add_magic()
92 list_add_tail(&entry->head, &master->magicfree); in drm_add_magic()
101 * \param dev DRM device.
111 struct drm_device *dev = master->minor->dev; in drm_remove_magic()
116 if (drm_ht_find_item(&master->magiclist, (unsigned long)magic, &hash)) { in drm_remove_magic()
118 return -EINVAL; in drm_remove_magic()
121 drm_ht_remove_item(&master->magiclist, hash); in drm_remove_magic()
122 list_del(&pt->head); in drm_remove_magic()
131 * Get a unique magic number (ioctl).
133 * \param inode device inode.
140 * searches an unique non-zero magic number and add it associating it with \p
150 /* Find unique magic */ in drm_getmagic()
151 if (file_priv->magic) { in drm_getmagic()
152 auth->magic = file_priv->magic; in drm_getmagic()
158 auth->magic = sequence++; in drm_getmagic()
160 } while (drm_find_file(file_priv->master, auth->magic)); in drm_getmagic()
161 file_priv->magic = auth->magic; in drm_getmagic()
162 drm_add_magic(file_priv->master, file_priv, auth->magic); in drm_getmagic()
165 DRM_DEBUG("%u\n", auth->magic); in drm_getmagic()
173 * \param inode device inode.
189 DRM_DEBUG("%u\n", auth->magic); in drm_authmagic()
190 if ((file = drm_find_file(file_priv->master, auth->magic))) { in drm_authmagic()
191 file->authenticated = 1; in drm_authmagic()
192 drm_remove_magic(file_priv->master, auth->magic); in drm_authmagic()
195 return -EINVAL; in drm_authmagic()