Home | History | Annotate | Download | only in radeon

Lines Matching refs:wm

1952 static u32 evergreen_dram_bandwidth(struct evergreen_wm_params *wm)
1960 yclk.full = dfixed_const(wm->yclk);
1962 dram_channels.full = dfixed_const(wm->dram_channels * 4);
1972 static u32 evergreen_dram_bandwidth_for_display(struct evergreen_wm_params *wm)
1980 yclk.full = dfixed_const(wm->yclk);
1982 dram_channels.full = dfixed_const(wm->dram_channels * 4);
1992 static u32 evergreen_data_return_bandwidth(struct evergreen_wm_params *wm)
2000 sclk.full = dfixed_const(wm->sclk);
2012 static u32 evergreen_dmif_request_bandwidth(struct evergreen_wm_params *wm)
2020 disp_clk.full = dfixed_const(wm->disp_clk);
2032 static u32 evergreen_available_bandwidth(struct evergreen_wm_params *wm)
2035 u32 dram_bandwidth = evergreen_dram_bandwidth(wm);
2036 u32 data_return_bandwidth = evergreen_data_return_bandwidth(wm);
2037 u32 dmif_req_bandwidth = evergreen_dmif_request_bandwidth(wm);
2042 static u32 evergreen_average_bandwidth(struct evergreen_wm_params *wm)
2055 line_time.full = dfixed_const(wm->active_time + wm->blank_time);
2057 bpp.full = dfixed_const(wm->bytes_per_pixel);
2058 src_width.full = dfixed_const(wm->src_width);
2060 bandwidth.full = dfixed_mul(bandwidth, wm->vsc);
2066 static u32 evergreen_latency_watermark(struct evergreen_wm_params *wm)
2070 u32 available_bandwidth = evergreen_available_bandwidth(wm);
2073 u32 dc_latency = 40000000 / wm->disp_clk; /* dc pipe latency */
2074 u32 other_heads_data_return_time = ((wm->num_heads + 1) * worst_chunk_return_time) +
2075 (wm->num_heads * cursor_line_pair_return_time);
2080 if (wm->num_heads == 0)
2085 if ((wm->vsc.full > a.full) ||
2086 ((wm->vsc.full > b.full) && (wm->vtaps >= 3)) ||
2087 (wm->vtaps >= 5) ||
2088 ((wm->vsc.full >= a.full) && wm->interlaced))
2094 b.full = dfixed_const(wm->num_heads);
2097 lb_fill_bw = min(dfixed_trunc(a), wm->disp_clk * wm->bytes_per_pixel / 1000);
2099 a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
2106 if (line_fill_time < wm->active_time)
2109 return latency + (line_fill_time - wm->active_time);
2113 static bool evergreen_average_bandwidth_vs_dram_bandwidth_for_display(struct evergreen_wm_params *wm)
2115 if (evergreen_average_bandwidth(wm) <=
2116 (evergreen_dram_bandwidth_for_display(wm) / wm->num_heads))
2122 static bool evergreen_average_bandwidth_vs_available_bandwidth(struct evergreen_wm_params *wm)
2124 if (evergreen_average_bandwidth(wm) <=
2125 (evergreen_available_bandwidth(wm) / wm->num_heads))
2131 static bool evergreen_check_latency_hiding(struct evergreen_wm_params *wm)
2133 u32 lb_partitions = wm->lb_size / wm->src_width;
2134 u32 line_time = wm->active_time + wm->blank_time;
2140 if (wm->vsc.full > a.full)
2143 if (lb_partitions <= (wm->vtaps + 1))
2149 latency_hiding = (latency_tolerant_lines * line_time + wm->blank_time);
2151 if (evergreen_latency_watermark(wm) <= latency_hiding)
2288 /* select wm A */
2297 /* select wm B */