Rev 3260 | Rev 4560 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3260 | Rev 4104 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | 33 | ||
Line 34... | Line 34... | ||
34 | #include |
34 | #include |
35 | 35 | ||
- | 36 | #include |
|
Line 36... | Line 37... | ||
36 | #include |
37 | #include |
37 | #include |
38 | #include |
38 | 39 | ||
39 | struct va_format { |
40 | struct va_format { |
Line 40... | Line 41... | ||
40 | const char *fmt; |
41 | const char *fmt; |
41 | va_list *va; |
42 | va_list *va; |
Line -... | Line 43... | ||
- | 43 | }; |
|
- | 44 | ||
- | 45 | unsigned int drm_debug = 0; /* 1 to enable debug output */ |
|
42 | }; |
46 | EXPORT_SYMBOL(drm_debug); |
43 | 47 | ||
Line 44... | Line 48... | ||
44 | unsigned int drm_debug = 0; /* 1 to enable debug output */ |
48 | unsigned int drm_rnodes = 0; /* 1 to enable experimental render nodes API */ |
45 | EXPORT_SYMBOL(drm_debug); |
49 | EXPORT_SYMBOL(drm_rnodes); |
Line -... | Line 50... | ||
- | 50 | ||
46 | 51 | unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */ |
|
47 | unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */ |
52 | EXPORT_SYMBOL(drm_vblank_offdelay); |
48 | EXPORT_SYMBOL(drm_vblank_offdelay); |
53 | |
49 | 54 | unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */ |
|
50 | unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */ |
55 | EXPORT_SYMBOL(drm_timestamp_precision); |
Line 84... | Line 89... | ||
84 | // va_end(args); |
89 | // va_end(args); |
85 | // } |
90 | // } |
86 | } |
91 | } |
87 | EXPORT_SYMBOL(drm_ut_debug_printk); |
92 | EXPORT_SYMBOL(drm_ut_debug_printk); |
Line -... | Line 93... | ||
- | 93 | ||
- | 94 | int drm_fill_in_dev(struct drm_device *dev, |
|
- | 95 | const struct pci_device_id *ent, |
|
- | 96 | struct drm_driver *driver) |
|
- | 97 | { |
|
- | 98 | int retcode; |
|
- | 99 | ||
- | 100 | INIT_LIST_HEAD(&dev->filelist); |
|
- | 101 | INIT_LIST_HEAD(&dev->ctxlist); |
|
- | 102 | INIT_LIST_HEAD(&dev->vmalist); |
|
- | 103 | INIT_LIST_HEAD(&dev->maplist); |
|
- | 104 | INIT_LIST_HEAD(&dev->vblank_event_list); |
|
- | 105 | ||
- | 106 | spin_lock_init(&dev->count_lock); |
|
- | 107 | spin_lock_init(&dev->event_lock); |
|
- | 108 | mutex_init(&dev->struct_mutex); |
|
- | 109 | mutex_init(&dev->ctxlist_mutex); |
|
- | 110 | ||
- | 111 | // if (drm_ht_create(&dev->map_hash, 12)) { |
|
- | 112 | // return -ENOMEM; |
|
- | 113 | // } |
|
- | 114 | ||
- | 115 | dev->driver = driver; |
|
- | 116 | ||
- | 117 | if (driver->driver_features & DRIVER_GEM) { |
|
- | 118 | retcode = drm_gem_init(dev); |
|
- | 119 | if (retcode) { |
|
- | 120 | DRM_ERROR("Cannot initialize graphics execution " |
|
- | 121 | "manager (GEM)\n"); |
|
- | 122 | goto error_out_unreg; |
|
- | 123 | } |
|
- | 124 | } |
|
- | 125 | ||
- | 126 | return 0; |
|
- | 127 | ||
- | 128 | error_out_unreg: |
|
- | 129 | // drm_lastclose(dev); |
|
- | 130 | return retcode; |
|
- | 131 | } |
|
88 | 132 | EXPORT_SYMBOL(drm_fill_in_dev); |
|
89 | /** |
133 | /** |
90 | * Compute size order. Returns the exponent of the smaller power of two which |
134 | * Compute size order. Returns the exponent of the smaller power of two which |
91 | * is greater or equal to given number. |
135 | * is greater or equal to given number. |
92 | * |
136 | * |