Rev 5367 | Rev 6661 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5367 | Rev 6104 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | #include |
3 | #include |
4 | #include "radeon_reg.h" |
4 | #include "radeon_reg.h" |
5 | #include "radeon.h" |
5 | #include "radeon.h" |
6 | #include "bitmap.h" |
6 | #include "bitmap.h" |
Line -... | Line 7... | ||
- | 7 | ||
- | 8 | #define DRV_NAME "atikms v4.4" |
|
7 | 9 | ||
Line 8... | Line 10... | ||
8 | void __init dmi_scan_machine(void); |
10 | void __init dmi_scan_machine(void); |
9 | 11 | ||
10 | #define KMS_DEV_CLOSE 0 |
12 | #define KMS_DEV_CLOSE 0 |
Line 11... | Line -... | ||
11 | #define KMS_DEV_INIT 1 |
- | |
12 | #define KMS_DEV_READY 2 |
- | |
13 | - | ||
14 | struct pci_device { |
- | |
15 | uint16_t domain; |
- | |
16 | uint8_t bus; |
- | |
17 | uint8_t dev; |
- | |
18 | uint8_t func; |
- | |
19 | uint16_t vendor_id; |
- | |
20 | uint16_t device_id; |
- | |
21 | uint16_t subvendor_id; |
- | |
22 | uint16_t subdevice_id; |
- | |
23 | uint32_t device_class; |
- | |
24 | uint8_t revision; |
13 | #define KMS_DEV_INIT 1 |
25 | }; |
14 | #define KMS_DEV_READY 2 |
- | 15 | ||
Line 26... | Line 16... | ||
26 | 16 | struct drm_device *main_device; |
|
Line 27... | Line 17... | ||
27 | struct drm_device *main_device; |
17 | struct drm_file *drm_file_handlers[256]; |
Line 54... | Line 44... | ||
54 | 44 | ||
Line 55... | Line 45... | ||
55 | printf("%s\n",__FUNCTION__); |
45 | printf("%s\n",__FUNCTION__); |
56 | 46 | ||
57 | while(driver_wq_state == KMS_DEV_INIT) |
47 | while(driver_wq_state == KMS_DEV_INIT) |
58 | { |
48 | { |
- | 49 | jiffies_64 = GetClockNs() / 10000000; |
|
59 | jiffies = GetTimerTicks(); |
50 | jiffies = (unsigned long)jiffies_64; |
60 | jiffies_64 = jiffies; |
51 | |
Line 61... | Line 52... | ||
61 | delay(1); |
52 | delay(1); |
62 | }; |
53 | }; |
Line 132... | Line 123... | ||
132 | }; |
123 | }; |
Line 133... | Line 124... | ||
133 | 124 | ||
134 | if( GetService("DISPLAY") != 0 ) |
125 | if( GetService("DISPLAY") != 0 ) |
Line 135... | Line 126... | ||
135 | return 0; |
126 | return 0; |
Line 136... | Line 127... | ||
136 | 127 | ||
137 | printf("Radeon v3.19-rc3 cmdline %s\n", cmdline); |
128 | printf("%s cmdline %s\n",DRV_NAME, cmdline); |
Line 138... | Line 129... | ||
138 | 129 | ||
139 | if( cmdline && *cmdline ) |
130 | if( cmdline && *cmdline ) |
140 | parse_cmdline(cmdline, &usermode, log, &radeon_modeset); |
131 | parse_cmdline(cmdline, &usermode, log, &radeon_modeset); |
141 | 132 | ||
142 | if( *log && !dbg_open(log)) |
133 | if( *log && !dbg_open(log)) |
- | 134 | { |
|
- | 135 | printf("Can't open %s\nExit\n", log); |
|
- | 136 | return 0; |
|
- | 137 | } |
|
Line 143... | Line 138... | ||
143 | { |
138 | else |
Line 144... | Line 139... | ||
144 | printf("Can't open %s\nExit\n", log); |
139 | { |
145 | return 0; |
140 | dbgprintf("\nLOG: %s build %s %s\n",DRV_NAME,__DATE__, __TIME__); |
146 | } |
141 | } |
147 | 142 | ||
148 | cpu_detect1(); |
143 | cpu_detect1(); |
149 | 144 | ||
Line -... | Line 145... | ||
- | 145 | err = enum_pci_devices(); |
|
- | 146 | if( unlikely(err != 0) ) |
|
- | 147 | { |
|
- | 148 | dbgprintf("Device enumeration failed\n"); |
|
- | 149 | return 0; |
|
- | 150 | } |
|
- | 151 | ||
- | 152 | err = kmap_init(); |
|
- | 153 | if( unlikely(err != 0) ) |
|
- | 154 | { |
|
150 | err = enum_pci_devices(); |
155 | dbgprintf("kmap initialization failed\n"); |
151 | if( unlikely(err != 0) ) |
156 | return 0; |
Line 152... | Line 157... | ||
152 | { |
157 | } |
153 | dbgprintf("Device enumeration failed\n"); |
158 | |
Line 309... | Line 314... | ||
309 | 314 | ||
310 | s64 div64_s64(s64 dividend, s64 divisor) |
315 | s64 div64_s64(s64 dividend, s64 divisor) |
311 | { |
316 | { |
Line 312... | Line 317... | ||
312 | s64 quot, t; |
317 | s64 quot, t; |
313 | 318 | ||
Line 314... | Line 319... | ||
314 | quot = div64_u64(abs64(dividend), abs64(divisor)); |
319 | quot = div64_u64(abs(dividend), abs(divisor)); |
315 | t = (dividend ^ divisor) >> 63; |
320 | t = (dividend ^ divisor) >> 63; |