Lines Matching full:wp

226 static void wp_request_mtl(struct ivpu_device *vdev, struct wp_request *wp)  in wp_request_mtl()  argument
231 val = REG_SET_FLD_NUM(VPU_HW_BTRS_MTL_WP_REQ_PAYLOAD0, MIN_RATIO, wp->min, val); in wp_request_mtl()
232 val = REG_SET_FLD_NUM(VPU_HW_BTRS_MTL_WP_REQ_PAYLOAD0, MAX_RATIO, wp->max, val); in wp_request_mtl()
236 val = REG_SET_FLD_NUM(VPU_HW_BTRS_MTL_WP_REQ_PAYLOAD1, TARGET_RATIO, wp->target, val); in wp_request_mtl()
241 val = REG_SET_FLD_NUM(VPU_HW_BTRS_MTL_WP_REQ_PAYLOAD2, CONFIG, wp->cfg, val); in wp_request_mtl()
249 static void wp_request_lnl(struct ivpu_device *vdev, struct wp_request *wp) in wp_request_lnl() argument
254 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD0, MIN_RATIO, wp->min, val); in wp_request_lnl()
255 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD0, MAX_RATIO, wp->max, val); in wp_request_lnl()
259 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD1, TARGET_RATIO, wp->target, val); in wp_request_lnl()
260 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD1, EPP, wp->epp, val); in wp_request_lnl()
264 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD2, CONFIG, wp->cfg, val); in wp_request_lnl()
265 val = REG_SET_FLD_NUM(VPU_HW_BTRS_LNL_WP_REQ_PAYLOAD2, CDYN, wp->cdyn, val); in wp_request_lnl()
273 static void wp_request(struct ivpu_device *vdev, struct wp_request *wp) in wp_request() argument
276 wp_request_mtl(vdev, wp); in wp_request()
278 wp_request_lnl(vdev, wp); in wp_request()
281 static int wp_request_send(struct ivpu_device *vdev, struct wp_request *wp) in wp_request_send() argument
291 wp_request(vdev, wp); in wp_request_send()
300 static void prepare_wp_request(struct ivpu_device *vdev, struct wp_request *wp, bool enable) in prepare_wp_request() argument
304 wp->min = hw->pll.min_ratio; in prepare_wp_request()
305 wp->max = hw->pll.max_ratio; in prepare_wp_request()
308 wp->target = enable ? hw->pll.pn_ratio : 0; in prepare_wp_request()
309 wp->cfg = enable ? hw->config : 0; in prepare_wp_request()
310 wp->cdyn = 0; in prepare_wp_request()
311 wp->epp = 0; in prepare_wp_request()
313 wp->target = hw->pll.pn_ratio; in prepare_wp_request()
314 wp->cfg = enable ? PLL_CONFIG_DEFAULT : 0; in prepare_wp_request()
315 wp->cdyn = enable ? PLL_CDYN_DEFAULT : 0; in prepare_wp_request()
316 wp->epp = enable ? PLL_EPP_DEFAULT : 0; in prepare_wp_request()
321 wp->cfg = 1; in prepare_wp_request()
339 struct wp_request wp; in ivpu_hw_btrs_wp_drive() local
347 prepare_wp_request(vdev, &wp, enable); in ivpu_hw_btrs_wp_drive()
350 PLL_RATIO_TO_FREQ(wp.target), wp.cfg, wp.epp, wp.cdyn); in ivpu_hw_btrs_wp_drive()
352 ret = wp_request_send(vdev, &wp); in ivpu_hw_btrs_wp_drive()