39 #include <linux/pci.h>
40 #include <linux/export.h>
54 struct drm_file *file_priv)
57 struct drm_master *master = file_priv->master;
70 struct drm_master *master)
75 kfree(master->unique);
76 master->unique =
NULL;
77 master->unique_len = 0;
78 master->unique_size = 0;
96 struct drm_file *file_priv)
99 struct drm_master *master = file_priv->master;
102 if (master->unique_len || master->unique)
108 if (!dev->driver->bus->set_unique)
111 ret = dev->driver->bus->set_unique(dev, master, u);
118 drm_unset_busid(dev, master);
122 static int drm_set_busid(
struct drm_device *
dev,
struct drm_file *file_priv)
124 struct drm_master *master = file_priv->master;
127 if (master->unique !=
NULL)
128 drm_unset_busid(dev, master);
130 ret = dev->driver->bus->set_busid(dev, master);
135 drm_unset_busid(dev, master);
153 struct drm_file *file_priv)
156 struct drm_map_list *r_list =
NULL;
174 if (!r_list || !r_list->map) {
179 map->
offset = r_list->map->offset;
180 map->
size = r_list->map->size;
181 map->
type = r_list->map->type;
182 map->
flags = r_list->map->flags;
183 map->
handle = (
void *)(
unsigned long) r_list->user_token;
184 map->
mtrr = r_list->map->mtrr;
204 struct drm_file *file_priv)
217 client->
auth = pt->authenticated;
220 client->
magic = pt->magic;
221 client->
iocs = pt->ioctl_count;
243 struct drm_file *file_priv)
248 memset(stats, 0,
sizeof(*stats));
250 for (i = 0; i < dev->counters; i++) {
252 stats->
data[
i].value =
253 (file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
256 stats->
data[
i].type = dev->types[
i];
259 stats->
count = dev->counters;
274 if (dev->driver->dumb_create)
281 req->
value = dev->mode_config.preferred_depth;
284 req->
value = dev->mode_config.prefer_shadow;
320 dev->if_version =
max(if_version, dev->if_version);
326 retcode = drm_set_busid(dev, file_priv);
335 dev->driver->minor) {
340 if (dev->driver->set_version)
341 dev->driver->set_version(dev, sv);
355 struct drm_file *file_priv)