• Chon Ming Lee's avatar
    drm/i915/chv: find the best divisor for the target clock v4 · ef9348c8
    Chon Ming Lee authored
    Based on the chv clock limit, find the best divisor.
    
    The divisor data has been verified with this spreadsheet.
    P1273_DPLL_Programming Spreadsheet.
    
    v2: Rebase the code and change the chv_find_best_dpll based on new
    standard way to use intel_PLL_is_valid.  Besides, clean up some extra
    variables.
    
    v3: Ville suggest better fixed point for m2 calculation.
    
    v4: -Add comment for the limit is compute using fast clock. (Ville)
    	-Don't pass the request clock to chv_clock, as the same function will
    	 be use clock readout, which doens't have request clock. (Ville)
    	-Add and use DIV_ROUND_CLOSEST_ULL to consistent with other clock
    	calculation. (Ville)
    	-Fix the dp m2 after m2 has stored fixed point. (Ville)
    Signed-off-by: default avatarChon Ming Lee <chon.ming.lee@intel.com>
    [vsyrjala: Avoid div-by-zero in chv_clock()]
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    ef9348c8
intel_display.c 336 KB