Lines Matching defs:wm

1950 static u32 evergreen_dram_bandwidth(struct evergreen_wm_params *wm)
1958 yclk.full = dfixed_const(wm->yclk);
1960 dram_channels.full = dfixed_const(wm->dram_channels * 4);
1970 static u32 evergreen_dram_bandwidth_for_display(struct evergreen_wm_params *wm)
1978 yclk.full = dfixed_const(wm->yclk);
1980 dram_channels.full = dfixed_const(wm->dram_channels * 4);
1990 static u32 evergreen_data_return_bandwidth(struct evergreen_wm_params *wm)
1998 sclk.full = dfixed_const(wm->sclk);
2010 static u32 evergreen_dmif_request_bandwidth(struct evergreen_wm_params *wm)
2018 disp_clk.full = dfixed_const(wm->disp_clk);
2030 static u32 evergreen_available_bandwidth(struct evergreen_wm_params *wm)
2033 u32 dram_bandwidth = evergreen_dram_bandwidth(wm);
2034 u32 data_return_bandwidth = evergreen_data_return_bandwidth(wm);
2035 u32 dmif_req_bandwidth = evergreen_dmif_request_bandwidth(wm);
2040 static u32 evergreen_average_bandwidth(struct evergreen_wm_params *wm)
2053 line_time.full = dfixed_const(wm->active_time + wm->blank_time);
2055 bpp.full = dfixed_const(wm->bytes_per_pixel);
2056 src_width.full = dfixed_const(wm->src_width);
2058 bandwidth.full = dfixed_mul(bandwidth, wm->vsc);
2064 static u32 evergreen_latency_watermark(struct evergreen_wm_params *wm)
2068 u32 available_bandwidth = evergreen_available_bandwidth(wm);
2071 u32 dc_latency = 40000000 / wm->disp_clk; /* dc pipe latency */
2072 u32 other_heads_data_return_time = ((wm->num_heads + 1) * worst_chunk_return_time) +
2073 (wm->num_heads * cursor_line_pair_return_time);
2078 if (wm->num_heads == 0)
2083 if ((wm->vsc.full > a.full) ||
2084 ((wm->vsc.full > b.full) && (wm->vtaps >= 3)) ||
2085 (wm->vtaps >= 5) ||
2086 ((wm->vsc.full >= a.full) && wm->interlaced))
2092 b.full = dfixed_const(wm->num_heads);
2095 lb_fill_bw = min(dfixed_trunc(a), wm->disp_clk * wm->bytes_per_pixel / 1000);
2097 a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
2104 if (line_fill_time < wm->active_time)
2107 return latency + (line_fill_time - wm->active_time);
2111 static bool evergreen_average_bandwidth_vs_dram_bandwidth_for_display(struct evergreen_wm_params *wm)
2113 if (evergreen_average_bandwidth(wm) <=
2114 (evergreen_dram_bandwidth_for_display(wm) / wm->num_heads))
2120 static bool evergreen_average_bandwidth_vs_available_bandwidth(struct evergreen_wm_params *wm)
2122 if (evergreen_average_bandwidth(wm) <=
2123 (evergreen_available_bandwidth(wm) / wm->num_heads))
2129 static bool evergreen_check_latency_hiding(struct evergreen_wm_params *wm)
2131 u32 lb_partitions = wm->lb_size / wm->src_width;
2132 u32 line_time = wm->active_time + wm->blank_time;
2138 if (wm->vsc.full > a.full)
2141 if (lb_partitions <= (wm->vtaps + 1))
2147 latency_hiding = (latency_tolerant_lines * line_time + wm->blank_time);
2149 if (evergreen_latency_watermark(wm) <= latency_hiding)
2286 /* select wm A */
2295 /* select wm B */