Lines Matching refs:master
155 static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) in drm_pci_set_busid() argument
159 master->unique_len = 40; in drm_pci_set_busid()
160 master->unique_size = master->unique_len; in drm_pci_set_busid()
161 master->unique = kmalloc(master->unique_size, GFP_KERNEL); in drm_pci_set_busid()
162 if (master->unique == NULL) in drm_pci_set_busid()
166 len = snprintf(master->unique, master->unique_len, in drm_pci_set_busid()
173 if (len >= master->unique_len) { in drm_pci_set_busid()
178 master->unique_len = len; in drm_pci_set_busid()
182 master->unique_len + 2, GFP_KERNEL); in drm_pci_set_busid()
190 master->unique); in drm_pci_set_busid()
198 struct drm_master *master, in drm_pci_set_unique() argument
204 master->unique_len = u->unique_len; in drm_pci_set_unique()
205 master->unique_size = u->unique_len + 1; in drm_pci_set_unique()
206 master->unique = kmalloc(master->unique_size, GFP_KERNEL); in drm_pci_set_unique()
207 if (!master->unique) { in drm_pci_set_unique()
212 if (copy_from_user(master->unique, u->unique, master->unique_len)) { in drm_pci_set_unique()
217 master->unique[master->unique_len] = '\0'; in drm_pci_set_unique()
221 strlen(master->unique) + 2, GFP_KERNEL); in drm_pci_set_unique()
228 master->unique); in drm_pci_set_unique()
233 ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func); in drm_pci_set_unique()