489,6 → 489,7 |
/* Enable IRQ */ |
// rdev->irq.sw_int = true; |
// rs600_irq_set(rdev); |
rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); |
/* 1M ring buffer */ |
// r = r100_cp_init(rdev, 1024 * 1024); |
// if (r) { |
543,10 → 544,8 |
RREG32(R_0007C0_CP_STAT)); |
} |
/* check if cards are posted or not */ |
if (!radeon_card_posted(rdev) && rdev->bios) { |
DRM_INFO("GPU not posted. posting now...\n"); |
atom_asic_init(rdev->mode_info.atom_context); |
} |
if (radeon_boot_test_post_card(rdev) == false) |
return -EINVAL; |
/* Initialize clocks */ |
radeon_get_clock_info(rdev->ddev); |
/* Initialize power management */ |
567,7 → 566,7 |
// if (r) |
// return r; |
/* Memory manager */ |
r = radeon_object_init(rdev); |
r = radeon_bo_init(rdev); |
if (r) |
return r; |
r = rv370_pcie_gart_init(rdev); |
856,8 → 855,9 |
|
b.full = rfixed_const(mode->crtc_hdisplay); |
c.full = rfixed_const(256); |
a.full = rfixed_mul(wm->num_line_pair, b); |
request_fifo_depth.full = rfixed_div(a, c); |
a.full = rfixed_div(b, c); |
request_fifo_depth.full = rfixed_mul(a, wm->num_line_pair); |
request_fifo_depth.full = rfixed_ceil(request_fifo_depth); |
if (a.full < rfixed_const(4)) { |
wm->lb_request_fifo_depth = 4; |
} else { |
959,15 → 959,17 |
a.full = rfixed_const(16); |
wm->priority_mark_max.full = rfixed_const(crtc->base.mode.crtc_hdisplay); |
wm->priority_mark_max.full = rfixed_div(wm->priority_mark_max, a); |
wm->priority_mark_max.full = rfixed_ceil(wm->priority_mark_max); |
|
/* Determine estimated width */ |
estimated_width.full = tolerable_latency.full - wm->worst_case_latency.full; |
estimated_width.full = rfixed_div(estimated_width, consumption_time); |
if (rfixed_trunc(estimated_width) > crtc->base.mode.crtc_hdisplay) { |
wm->priority_mark.full = rfixed_const(10); |
wm->priority_mark.full = wm->priority_mark_max.full; |
} else { |
a.full = rfixed_const(16); |
wm->priority_mark.full = rfixed_div(estimated_width, a); |
wm->priority_mark.full = rfixed_ceil(wm->priority_mark); |
wm->priority_mark.full = wm->priority_mark_max.full - wm->priority_mark.full; |
} |
} |