Rev 2005 | Rev 3120 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2005 | Rev 2997 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | * |
23 | * |
24 | * Authors: Dave Airlie |
24 | * Authors: Dave Airlie |
25 | * Alex Deucher |
25 | * Alex Deucher |
26 | * Jerome Glisse |
26 | * Jerome Glisse |
27 | */ |
27 | */ |
28 | #include "drmP.h" |
28 | #include |
29 | #include "radeon.h" |
29 | #include "radeon.h" |
30 | #include "radeon_asic.h" |
30 | #include "radeon_asic.h" |
31 | #include "atom.h" |
31 | #include "atom.h" |
32 | #include "r520d.h" |
32 | #include "r520d.h" |
Line 33... | Line 33... | ||
33 | 33 | ||
Line 34... | Line 34... | ||
34 | /* This files gather functions specifics to: r520,rv530,rv560,rv570,r580 */ |
34 | /* This files gather functions specifics to: r520,rv530,rv560,rv570,r580 */ |
35 | 35 | ||
36 | static int r520_mc_wait_for_idle(struct radeon_device *rdev) |
36 | int r520_mc_wait_for_idle(struct radeon_device *rdev) |
37 | { |
37 | { |
Line 38... | Line 38... | ||
38 | unsigned i; |
38 | unsigned i; |
Line 117... | Line 117... | ||
117 | } |
117 | } |
118 | if (tmp & R520_MC_CHANNEL_SIZE) |
118 | if (tmp & R520_MC_CHANNEL_SIZE) |
119 | rdev->mc.vram_width *= 2; |
119 | rdev->mc.vram_width *= 2; |
120 | } |
120 | } |
Line 121... | Line 121... | ||
121 | 121 | ||
122 | void r520_mc_init(struct radeon_device *rdev) |
122 | static void r520_mc_init(struct radeon_device *rdev) |
Line 123... | Line 123... | ||
123 | { |
123 | { |
124 | 124 | ||
125 | r520_vram_get_type(rdev); |
125 | r520_vram_get_type(rdev); |
Line 129... | Line 129... | ||
129 | if (!(rdev->flags & RADEON_IS_AGP)) |
129 | if (!(rdev->flags & RADEON_IS_AGP)) |
130 | radeon_gtt_location(rdev, &rdev->mc); |
130 | radeon_gtt_location(rdev, &rdev->mc); |
131 | radeon_update_bandwidth_info(rdev); |
131 | radeon_update_bandwidth_info(rdev); |
132 | } |
132 | } |
Line 133... | Line 133... | ||
133 | 133 | ||
134 | void r520_mc_program(struct radeon_device *rdev) |
134 | static void r520_mc_program(struct radeon_device *rdev) |
135 | { |
135 | { |
Line 136... | Line 136... | ||
136 | struct rv515_mc_save save; |
136 | struct rv515_mc_save save; |
137 | 137 | ||
Line 194... | Line 194... | ||
194 | r = r100_cp_init(rdev, 1024 * 1024); |
194 | r = r100_cp_init(rdev, 1024 * 1024); |
195 | if (r) { |
195 | if (r) { |
196 | dev_err(rdev->dev, "failed initializing CP (%d).\n", r); |
196 | dev_err(rdev->dev, "failed initializing CP (%d).\n", r); |
197 | return r; |
197 | return r; |
198 | } |
198 | } |
- | 199 | ||
199 | r = r100_ib_init(rdev); |
200 | r = radeon_ib_pool_init(rdev); |
200 | if (r) { |
201 | if (r) { |
201 | dev_err(rdev->dev, "failed initializing IB (%d).\n", r); |
202 | dev_err(rdev->dev, "IB initialization failed (%d).\n", r); |
202 | return r; |
203 | return r; |
203 | } |
204 | } |
- | 205 | ||
204 | return 0; |
206 | return 0; |
205 | } |
207 | } |
Line 270... | Line 272... | ||
270 | return r; |
272 | return r; |
271 | r = rv370_pcie_gart_init(rdev); |
273 | r = rv370_pcie_gart_init(rdev); |
272 | if (r) |
274 | if (r) |
273 | return r; |
275 | return r; |
274 | rv515_set_safe_registers(rdev); |
276 | rv515_set_safe_registers(rdev); |
- | 277 | ||
275 | rdev->accel_working = true; |
278 | rdev->accel_working = true; |
276 | r = r520_startup(rdev); |
279 | r = r520_startup(rdev); |
277 | if (r) { |
280 | if (r) { |
278 | /* Somethings want wront with the accel init stop accel */ |
281 | /* Somethings want wront with the accel init stop accel */ |
279 | dev_err(rdev->dev, "Disabling GPU acceleration\n"); |
282 | dev_err(rdev->dev, "Disabling GPU acceleration\n"); |