55 "programming pipes. Bad things might happen.\n");
73 &frev, &crev, &data_offset)) {
81 rdev->
pm.igp_sideport_mclk.full = dfixed_div(rdev->
pm.igp_sideport_mclk, tmp);
84 else if (rdev->
clock.default_mclk) {
86 rdev->
pm.igp_system_mclk.full = dfixed_div(rdev->
pm.igp_system_mclk, tmp);
95 rdev->
pm.igp_sideport_mclk.full = dfixed_div(rdev->
pm.igp_sideport_mclk, tmp);
98 else if (rdev->
clock.default_mclk)
102 rdev->
pm.igp_system_mclk.full = dfixed_div(rdev->
pm.igp_system_mclk, tmp);
104 rdev->
pm.igp_ht_link_clk.full = dfixed_div(rdev->
pm.igp_ht_link_clk, tmp);
113 DRM_ERROR(
"No integrated system info for your GPU, using safe default\n");
122 DRM_ERROR(
"No integrated system info for your GPU, using safe default\n");
127 rdev->
pm.k8_bandwidth.full =
dfixed_mul(rdev->
pm.igp_system_mclk, tmp);
133 rdev->
pm.igp_ht_link_width);
134 rdev->
pm.ht_bandwidth.full = dfixed_div(rdev->
pm.ht_bandwidth, tmp);
135 if (tmp.
full < rdev->
pm.max_bandwidth.full) {
137 rdev->
pm.max_bandwidth.full = tmp.
full;
143 rdev->
pm.sideport_bandwidth.full =
dfixed_mul(rdev->
pm.igp_sideport_mclk, tmp);
145 rdev->
pm.sideport_bandwidth.full = dfixed_div(rdev->
pm.sideport_bandwidth, tmp);
153 rdev->
mc.vram_is_ddr =
true;
154 rdev->
mc.vram_width = 128;
156 rdev->
mc.mc_vram_size = rdev->
mc.real_vram_size;
159 rdev->
mc.visible_vram_size = rdev->
mc.aper_size;
165 rdev->
mc.gtt_base_align = rdev->
mc.gtt_size - 1;
193 if (mode1 && mode2) {
227 static void rs690_crtc_bandwidth_compute(
struct radeon_device *rdev,
233 fixed20_12 pclk, request_fifo_depth, tolerable_latency, estimated_width;
234 fixed20_12 consumption_time, line_time, chunk_time, read_delay_latency;
236 if (!crtc->
base.enabled) {
249 a.
full = dfixed_div(b, c);
251 request_fifo_depth.
full = dfixed_ceil(request_fifo_depth);
266 a.
full = dfixed_div(a, b);
267 pclk.
full = dfixed_div(b, a);
274 b.
full = dfixed_div(b, c);
275 consumption_time.
full = dfixed_div(pclk, b);
302 rdev->
pm.max_bandwidth = rdev->
pm.core_bandwidth;
303 if (rdev->
mc.igp_sideport_enabled) {
304 if (rdev->
pm.max_bandwidth.full > rdev->
pm.sideport_bandwidth.full &&
305 rdev->
pm.sideport_bandwidth.full)
306 rdev->
pm.max_bandwidth = rdev->
pm.sideport_bandwidth;
308 read_delay_latency.
full = dfixed_div(read_delay_latency,
309 rdev->
pm.igp_sideport_mclk);
311 if (rdev->
pm.max_bandwidth.full > rdev->
pm.k8_bandwidth.full &&
312 rdev->
pm.k8_bandwidth.full)
313 rdev->
pm.max_bandwidth = rdev->
pm.k8_bandwidth;
314 if (rdev->
pm.max_bandwidth.full > rdev->
pm.ht_bandwidth.full &&
315 rdev->
pm.ht_bandwidth.full)
316 rdev->
pm.max_bandwidth = rdev->
pm.ht_bandwidth;
324 rdev->
pm.sclk.full = dfixed_div(a, rdev->
pm.sclk);
333 chunk_time.
full = dfixed_div(chunk_time, a);
364 tolerable_latency.
full = line_time.
full;
367 tolerable_latency.
full = request_fifo_depth.
full - tolerable_latency.
full;
368 tolerable_latency.
full =
dfixed_mul(tolerable_latency, chunk_time);
369 tolerable_latency.
full = line_time.
full - tolerable_latency.
full;
384 estimated_width.
full = dfixed_div(estimated_width, consumption_time);
404 fixed20_12 priority_mark02, priority_mark12, fill_rate;
409 if (rdev->
mode_info.crtcs[0]->base.enabled)
410 mode0 = &rdev->
mode_info.crtcs[0]->base.mode;
411 if (rdev->
mode_info.crtcs[1]->base.enabled)
412 mode1 = &rdev->
mode_info.crtcs[1]->base.mode;
436 rs690_crtc_bandwidth_compute(rdev, rdev->
mode_info.crtcs[0], &wm0);
437 rs690_crtc_bandwidth_compute(rdev, rdev->
mode_info.crtcs[1], &wm1);
443 if (mode0 && mode1) {
453 fill_rate.
full = dfixed_div(wm0.
sclk, a);
461 priority_mark02.
full = dfixed_div(a, b);
466 priority_mark02.
full = dfixed_div(a, b);
475 priority_mark12.
full = dfixed_div(a, b);
480 priority_mark12.
full = dfixed_div(a, b);
485 priority_mark02.
full = 0;
491 priority_mark12.
full = 0;
505 fill_rate.
full = dfixed_div(wm0.
sclk, a);
513 priority_mark02.
full = dfixed_div(a, b);
518 priority_mark02.
full = dfixed_div(a, b);
523 priority_mark02.
full = 0;
534 fill_rate.
full = dfixed_div(wm1.
sclk, a);
542 priority_mark12.
full = dfixed_div(a, b);
547 priority_mark12.
full = dfixed_div(a, b);
552 priority_mark12.
full = 0;
593 dev_warn(rdev->
dev,
"Wait MC idle timeout before updating MC.\n");
608 rs690_mc_program(rdev);
612 rs690_gpu_init(rdev);
626 dev_err(rdev->
dev,
"failed initializing CP fences (%d).\n", r);
636 dev_err(rdev->
dev,
"failed initializing CP (%d).\n", r);
642 dev_err(rdev->
dev,
"IB initialization failed (%d).\n", r);
648 dev_err(rdev->
dev,
"failed initializing audio\n");
665 dev_warn(rdev->
dev,
"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n",
677 r = rs690_startup(rdev);
733 dev_err(rdev->
dev,
"Expecting atombios for RV515 GPU\n");
739 "GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n",
769 r = rs690_startup(rdev);
772 dev_err(rdev->
dev,
"Disabling GPU acceleration\n");