Commit 7f827145 authored by Devarsh Thakkar's avatar Devarsh Thakkar Committed by Ville Syrjälä

modetest: Use floating vrefresh while dumping mode

Add function to derive floating value of vertical
refresh rate from drm mode using pixel clock,
horizontal total size and vertical total size.

Use this function to find suitable mode having vrefresh
value which is matching with user provided vrefresh value.

If user doesn't provide any vrefresh value in args then
update vertical refresh rate value in pipe args using this
function.

Also use this function for printing floating vrefresh while
dumping all available modes.

This will give more accurate picture to user for available modes
differentiated by floating vertical refresh rate and help user
select more appropriate mode using suitable refresh rate value.

V4:
1) While setting mode, print mode name and vrefresh using struct
   drmModeModeInfo instead of struct pipe_args.
2) Revert back to using a float value instead of float *
   for vrefresh arg in connector_find_mode().

V3:
1) Change name of function used to derive refresh rate.

V2:
1) Don't use inline function for deriving refresh rate from mode.
2) If requested mode not found, print refresh rate only
   if user had provided it in args.
Signed-off-by: default avatarDevarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Neil Armstrong's avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 31a6ec14
Pipeline #89632 passed with stage
in 2 minutes and 56 seconds