@@ -2887,20 +2887,19 @@ static void intel_cx0_phy_lane_reset(struct intel_encoder *encoder,
28872887 XELPDP_LANE_PHY_CURRENT_STATUS (1 ))
28882888 : XELPDP_LANE_PHY_CURRENT_STATUS (0 );
28892889
2890- if (intel_de_wait_us (display , XELPDP_PORT_BUF_CTL1 (display , port ),
2891- XELPDP_PORT_BUF_SOC_PHY_READY ,
2892- XELPDP_PORT_BUF_SOC_PHY_READY ,
2893- XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US , NULL ))
2890+ if (intel_de_wait_for_set_us (display , XELPDP_PORT_BUF_CTL1 (display , port ),
2891+ XELPDP_PORT_BUF_SOC_PHY_READY ,
2892+ XELPDP_PORT_BUF_SOC_READY_TIMEOUT_US ))
28942893 drm_warn (display -> drm ,
28952894 "PHY %c failed to bring out of SOC reset\n" ,
28962895 phy_name (phy ));
28972896
28982897 intel_de_rmw (display , XELPDP_PORT_BUF_CTL2 (display , port ), lane_pipe_reset ,
28992898 lane_pipe_reset );
29002899
2901- if (intel_de_wait_us (display , XELPDP_PORT_BUF_CTL2 (display , port ),
2902- lane_phy_current_status , lane_phy_current_status ,
2903- XELPDP_PORT_RESET_START_TIMEOUT_US , NULL ))
2900+ if (intel_de_wait_for_set_us (display , XELPDP_PORT_BUF_CTL2 (display , port ),
2901+ lane_phy_current_status ,
2902+ XELPDP_PORT_RESET_START_TIMEOUT_US ))
29042903 drm_warn (display -> drm ,
29052904 "PHY %c failed to bring out of lane reset\n" ,
29062905 phy_name (phy ));
@@ -3187,8 +3186,8 @@ void intel_mtl_tbt_pll_enable(struct intel_encoder *encoder,
31873186 intel_de_write (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ), val );
31883187
31893188 /* 5. Poll on PORT_CLOCK_CTL TBT CLOCK Ack == "1". */
3190- if (intel_de_wait_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3191- XELPDP_TBT_CLOCK_ACK , XELPDP_TBT_CLOCK_ACK , 100 , NULL ))
3189+ if (intel_de_wait_for_set_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3190+ XELPDP_TBT_CLOCK_ACK , 100 ))
31923191 drm_warn (display -> drm , "[ENCODER:%d:%s][%c] PHY PLL not locked\n" ,
31933192 encoder -> base .base .id , encoder -> base .name , phy_name (phy ));
31943193
@@ -3299,10 +3298,10 @@ static void intel_cx0pll_disable(struct intel_encoder *encoder)
32993298 /*
33003299 * 5. Poll on PORT_CLOCK_CTL PCLK PLL Ack LN<Lane for maxPCLK**> == "0".
33013300 */
3302- if (intel_de_wait_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3303- intel_cx0_get_pclk_pll_ack (INTEL_CX0_BOTH_LANES ) |
3304- intel_cx0_get_pclk_refclk_ack (INTEL_CX0_BOTH_LANES ), 0 ,
3305- XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US , NULL ))
3301+ if (intel_de_wait_for_clear_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3302+ intel_cx0_get_pclk_pll_ack (INTEL_CX0_BOTH_LANES ) |
3303+ intel_cx0_get_pclk_refclk_ack (INTEL_CX0_BOTH_LANES ),
3304+ XELPDP_PCLK_PLL_DISABLE_TIMEOUT_US ))
33063305 drm_warn (display -> drm , "Port %c PLL not unlocked\n" ,
33073306 phy_name (phy ));
33083307
@@ -3347,8 +3346,8 @@ void intel_mtl_tbt_pll_disable(struct intel_encoder *encoder)
33473346 XELPDP_TBT_CLOCK_REQUEST , 0 );
33483347
33493348 /* 3. Poll on PORT_CLOCK_CTL TBT CLOCK Ack == "0". */
3350- if (intel_de_wait_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3351- XELPDP_TBT_CLOCK_ACK , 0 , 10 , NULL ))
3349+ if (intel_de_wait_for_clear_us (display , XELPDP_PORT_CLOCK_CTL (display , encoder -> port ),
3350+ XELPDP_TBT_CLOCK_ACK , 10 ))
33523351 drm_warn (display -> drm , "[ENCODER:%d:%s][%c] PHY PLL not unlocked\n" ,
33533352 encoder -> base .base .id , encoder -> base .name , phy_name (phy ));
33543353
0 commit comments