Rev 1120 | Rev 1125 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1120 | Rev 1123 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * Authors: Dave Airlie |
24 | * Authors: Dave Airlie |
25 | * Alex Deucher |
25 | * Alex Deucher |
26 | * Jerome Glisse |
26 | * Jerome Glisse |
27 | */ |
27 | */ |
28 | //#include |
28 | //#include |
- | 29 | ||
29 | //#include |
30 | #include |
30 | //#include |
31 | //#include |
31 | #include "radeon_drm.h" |
32 | #include "radeon_drm.h" |
32 | #include "radeon_reg.h" |
33 | #include "radeon_reg.h" |
33 | #include "radeon.h" |
34 | #include "radeon.h" |
34 | #include "radeon_asic.h" |
35 | #include "radeon_asic.h" |
35 | #include "atom.h" |
36 | #include "atom.h" |
Line 36... | Line 37... | ||
36 | 37 | ||
Line -... | Line 38... | ||
- | 38 | #include |
|
37 | #include |
39 | |
- | 40 | int radeon_modeset = -1; |
|
38 | 41 | int radeon_dynclks = -1; |
|
- | 42 | int radeon_r4xx_atom = 0; |
|
39 | int radeon_dynclks = -1; |
43 | int radeon_agpmode = 0; |
- | 44 | int radeon_vram_limit = 0; |
|
- | 45 | int radeon_gart_size = 512; /* default gart size */ |
|
Line 40... | Line 46... | ||
40 | int radeon_agpmode = -1; |
46 | int radeon_benchmarking = 0; |
41 | int radeon_gart_size = 512; /* default gart size */ |
47 | int radeon_connector_table = 0; |
42 | 48 | ||
Line 894... | Line 900... | ||
894 | resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resource) |
900 | resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resource) |
895 | { |
901 | { |
896 | return pci_resource_len(dev->pdev, resource); |
902 | return pci_resource_len(dev->pdev, resource); |
897 | }>=>>>>>>>>> |
903 | } |
Line -... | Line 904... | ||
- | 904 | ||
- | 905 | ||
- | 906 | uint32_t __div64_32(uint64_t *n, uint32_t base) |
|
- | 907 | { |
|
- | 908 | uint64_t rem = *n; |
|
- | 909 | uint64_t b = base; |
|
- | 910 | uint64_t res, d = 1; |
|
- | 911 | uint32_t high = rem >> 32; |
|
- | 912 | ||
- | 913 | /* Reduce the thing a bit first */ |
|
- | 914 | res = 0; |
|
- | 915 | if (high >= base) { |
|
- | 916 | high /= base; |
|
- | 917 | res = (uint64_t) high << 32; |
|
- | 918 | rem -= (uint64_t) (high*base) << 32; |
|
- | 919 | } |
|
- | 920 | ||
- | 921 | while ((int64_t)b > 0 && b < rem) { |
|
- | 922 | b = b+b; |
|
- | 923 | d = d+d; |
|
- | 924 | } |
|
- | 925 | ||
- | 926 | do { |
|
- | 927 | if (rem >= b) { |
|
- | 928 | rem -= b; |
|
- | 929 | res += d; |
|
- | 930 | } |
|
- | 931 | b >>= 1; |
|
- | 932 | d >>= 1; |
|
- | 933 | } while (d); |
|
- | 934 | ||
- | 935 | *n = res; |
|
- | 936 | return rem; |
|
- | 937 | }>><>><>>=>>>>>>>>> |