compositor-drm: Fix refresh rate selection in drm_output_switch_mode
authorMario Kleiner <mario.kleiner.de@gmail.com>
Sun, 21 Jun 2015 19:25:09 +0000 (21:25 +0200)
committerBryce Harrington <bryce@osg.samsung.com>
Tue, 30 Jun 2015 19:16:41 +0000 (12:16 -0700)
commit872797cdf5c23d85d9abf5531a3dc7141c693e62
tree08577e2986f113e0c6c7c4efc19b0d4a8281e332
parent9f4d655494a5dfd01b45b82dc425ab549c8b3624
compositor-drm: Fix refresh rate selection in drm_output_switch_mode

The matching logic in choose_mode() compared refresh rate
of a drm_mode candidate mode expressed in Hz against the
requested refresh rate of the target weston_mode expressed
in milliHz, so the match always failed and the logic always
ended up the mode with the highest refresh rate for a given
resolution, instead of the one matching the requested rate.

Match proper fields to fix this.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
src/compositor-drm.c