[PATCH 02/10] compositor-drm: Fix refresh rate selection in drm_output_switch_mode
Bryce Harrington
bryce at osg.samsung.com
Tue Jun 30 12:19:44 PDT 2015
On Sun, Jun 21, 2015 at 09:25:09PM +0200, Mario Kleiner wrote:
> 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.
Ouch!
> Match proper fields to fix this.
>
> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
> Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
Thanks, pushed:
To ssh://git.freedesktop.org/git/wayland/weston
9f4d655..872797c master -> master
> ---
> src/compositor-drm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 6d8684d..58b2e5a 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -1225,8 +1225,8 @@ choose_mode (struct drm_output *output, struct weston_mode *target_mode)
> wl_list_for_each(mode, &output->base.mode_list, base.link) {
> if (mode->mode_info.hdisplay == target_mode->width &&
> mode->mode_info.vdisplay == target_mode->height) {
> - if (mode->mode_info.vrefresh == target_mode->refresh ||
> - target_mode->refresh == 0) {
> + if (mode->base.refresh == target_mode->refresh ||
> + target_mode->refresh == 0) {
> return mode;
> } else if (!tmp_mode)
> tmp_mode = mode;
> --
> 1.9.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list