Skip to content
  • Imre Deak's avatar
    tests/pm_rps: vlv: round middle point to freq supported by HW · b32b5327
    Imre Deak authored
    
    
    When setting the calculated middle frequency value the test assumes that
    the HW/kernel rounds this value according to a 50MHz step value. This is
    not so at least on VLV/CHV, on my B0 BYT-M for example this step value
    is 22MHz, so there the test will fail.
    
    To fix this get the nearest supported value by setting the target
    frequency as a min or max frequency and read it back. The kernel will
    round the returned value to the nearest supported.
    
    v2:
    - remove the 50MHz rounding that was done for non-VLV platforms, the new
      way of rounding should provide the correct value for all platforms
      (Ville)
    
    Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    b32b5327