mesa-drm/tests
Devarsh Thakkar a2d588fe12 modetest: Add support for setting mode having floating vertical refresh rate
For the scenario where user may require to modeset with a mode
supporting a fractional value for vertical refresh-rate,
appropriate mode can be selected by searching for mode
having matching fractional vertical refresh rate using
below equation.

vrefresh = (1000 * pixel clock) / (htotal * vtotal) Hz.

We do this way since driver doesn't return float value of vrefresh
as it use int for vrefresh in struct drm_mode_info, but we can derive
the actual value using pixel clock, horizontal total size and
vertical total size values.

So for e.g. if user want to select mode having 59.94 Hz as refresh rate
then with this patch it be can done as shown in below command,
given there is an appropriate mode is available :

modetest -M xlnx -s 39:1920x1080-59.94@BG24 -v

NOTE: Above command was tested on xilinx DRM driver with DP
monitor which was supporting mode having 59.94 Hz refresh rate.

V2: Update commit message
V3: Update with below changes as per review comments :
  1) Use epsilon for vrefresh comparison
  2) Use implicit type-casting wherever possible
V4: Keep patch version history on main commit message

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-11-25 16:13:43 +02:00
..
amdgpu Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
etnaviv Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
exynos Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
kms Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
kmstest Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
modeprint Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
modetest modetest: Add support for setting mode having floating vertical refresh rate 2019-11-25 16:13:43 +02:00
nouveau Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
proptest Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
radeon Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
tegra Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
ttmtest fix various typos 2019-04-17 18:23:25 +01:00
util Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
vbltest Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
Android.mk android: simplify the including rule of subdirs 2015-03-20 17:07:21 +00:00
drmdevice.c tests: skip drmdevice test if the machine doesn't have any drm device 2018-11-11 18:39:57 +00:00
drmsl.c drmsltest: Check expected neighbours 2017-08-21 13:05:13 +01:00
hash.c tests/hash: return non-zero on failure 2015-04-05 15:33:06 +01:00
meson.build meson: make symbols hidden by default 2018-09-19 22:46:45 -07:00
random.c tests/random: return non-zero on test failure 2015-04-05 15:33:33 +01:00