[PATCH weston 2/2] compositor-drm: Restore use-current-mode functionality

Daniel Stone daniel at fooishbar.org
Wed Nov 9 14:43:46 UTC 2016


Hi Armin,

On 9 October 2016 at 22:48, Armin Krezović <krezovic.armin at gmail.com> wrote:
> diff --git a/compositor/main.c b/compositor/main.c
> index 320305c..ffeadfb 100644
> --- a/compositor/main.c
> +++ b/compositor/main.c
> @@ -78,6 +78,7 @@ struct wet_compositor {
>         struct weston_config *config;
>         struct wet_output_config *parsed_options;
>         struct wl_listener pending_output_listener;
> +       bool drm_use_current_mode;
>  };

I'm fairly confused about this one, though I freely admit I didn't
track the libweston config work, so may have missed something.

What makes --use-current-mode special enough that it should be the
only such option inside struct wet_compositor? What makes it different
to, say, use_pixman, which lives in the DRM backend?

> @@ -1138,7 +1140,7 @@ drm_backend_output_configure(struct wl_listener *listener, void *data)
>                 weston_output_disable(output);
>                 free(s);
>                 return;
> -       } else if (strcmp(s, "current") == 0) {
> +       } else if (wet->drm_use_current_mode || strcmp(s, "current") == 0) {
>                 mode = WESTON_DRM_BACKEND_OUTPUT_CURRENT;
>         } else if (strcmp(s, "preferred") != 0) {
>                 modeline = s;

What would the difference be to making this check be 'else if
(b->use_current_mode || strcmp(s, "current") == 0)'?

Cheers,
Daniel


More information about the wayland-devel mailing list