On Tue, 26 Sep 2017 18:15:49 +0100 Daniel Stone <dani...@collabora.com> 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)); > + { > #endif > weston_log("DRM: %s atomic modesetting\n", > b->atomic_modeset ? "supports" : "does not support"); Hi, I think this patch should come before the "compositor-drm: Atomic modesetting support" patch if not even squashed into "compositor-drm: Discover atomic properties", so that if someone is bisecting an issue with DISABLE_ATOMIC, there is no commit where it suddenly doesn't work. Thanks, pq
pgpp3zKfzhQg7.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel