Rev 1403 | Rev 1413 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1403 | Rev 1404 | ||
---|---|---|---|
Line 221... | Line 221... | ||
221 | entry = cpu_to_le32(entry); |
221 | entry = cpu_to_le32(entry); |
222 | rdev->gart.table.ram.ptr[i] = entry; |
222 | rdev->gart.table.ram.ptr[i] = entry; |
223 | return 0; |
223 | return 0; |
224 | } |
224 | } |
Line -... | Line 225... | ||
- | 225 | ||
- | 226 | int rs400_mc_wait_for_idle(struct radeon_device *rdev) |
|
- | 227 | { |
|
- | 228 | unsigned i; |
|
- | 229 | uint32_t tmp; |
|
- | 230 | ||
- | 231 | for (i = 0; i < rdev->usec_timeout; i++) { |
|
- | 232 | /* read MC_STATUS */ |
|
- | 233 | tmp = RREG32(0x0150); |
|
- | 234 | if (tmp & (1 << 2)) { |
|
- | 235 | return 0; |
|
- | 236 | } |
|
- | 237 | DRM_UDELAY(1); |
|
- | 238 | } |
|
- | 239 | return -1; |
|
- | 240 | } |
|
225 | 241 | ||
226 | void rs400_gpu_init(struct radeon_device *rdev) |
242 | void rs400_gpu_init(struct radeon_device *rdev) |
227 | { |
243 | { |
228 | /* FIXME: HDP same place on rs400 ? */ |
244 | /* FIXME: HDP same place on rs400 ? */ |
229 | r100_hdp_reset(rdev); |
245 | r100_hdp_reset(rdev); |
230 | /* FIXME: is this correct ? */ |
246 | /* FIXME: is this correct ? */ |
231 | r420_pipes_init(rdev); |
247 | r420_pipes_init(rdev); |
232 | if (r300_mc_wait_for_idle(rdev)) { |
248 | if (rs400_mc_wait_for_idle(rdev)) { |
233 | printk(KERN_WARNING "Failed to wait MC idle while " |
249 | printk(KERN_WARNING "rs400: Failed to wait MC idle while " |
234 | "programming pipes. Bad things might happen.\n"); |
250 | "programming pipes. Bad things might happen. %08x\n", RREG32(0x150)); |
235 | } |
251 | } |
Line 236... | Line 252... | ||
236 | } |
252 | } |
237 | 253 | ||
Line 368... | Line 384... | ||
368 | 384 | ||
369 | /* Stops all mc clients */ |
385 | /* Stops all mc clients */ |
Line 370... | Line 386... | ||
370 | r100_mc_stop(rdev, &save); |
386 | r100_mc_stop(rdev, &save); |
371 | 387 | ||
372 | /* Wait for mc idle */ |
388 | /* Wait for mc idle */ |
373 | if (r300_mc_wait_for_idle(rdev)) |
389 | if (rs400_mc_wait_for_idle(rdev)) |
374 | dev_warn(rdev->dev, "Wait MC idle timeout before updating MC.\n"); |
390 | dev_warn(rdev->dev, "rs400: Wait MC idle timeout before updating MC.\n"); |
375 | WREG32(R_000148_MC_FB_LOCATION, |
391 | WREG32(R_000148_MC_FB_LOCATION, |
Line 376... | Line 392... | ||
376 | S_000148_MC_FB_START(rdev->mc.vram_start >> 16) | |
392 | S_000148_MC_FB_START(rdev->mc.vram_start >> 16) | |