Hi Daniel,

On Tue, 2017-09-26 at 18:15 +0100, Daniel Stone wrote:
> Add a test environment variable to allow disabling atomic modesetting.
> 
> > Signed-off-by: Daniel Stone <dani...@collabora.com>
> ---
>  libweston/compositor-drm.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index d04ba12f..8cd69f1f 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -3240,11 +3240,13 @@ init_kms_caps(struct drm_backend *b)
> >                b->universal_planes ? "supports" : "does not support");
>  
>  #ifdef HAVE_DRM_ATOMIC
> > -   ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
> > -   if (ret != 0)
> > -           cap = 0;
> > -   ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ATOMIC, 1);
> > -   b->atomic_modeset = ((ret == 0) && (cap == 1));
> > +   if (!getenv("DRM_DISABLE_ATOMIC")) {
> > +           ret = drmGetCap(b->drm.fd, DRM_CAP_CRTC_IN_VBLANK_EVENT, &cap);
> > +           if (ret != 0)
> > +                   cap = 0;
> > +           ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ATOMIC, 1);
> > +           b->atomic_modeset = ((ret == 0) && (cap == 1));
> +     {

        ^-- A typo here.

>  #endif
> >     weston_log("DRM: %s atomic modesetting\n",
> >                b->atomic_modeset ? "supports" : "does not support");

regards
Philipp
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to