On Fri, 29 Sep 2017 14:21:02 +0100 Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 26 September 2017 at 18:15, Daniel Stone <dani...@collabora.com> wrote: > > Add a test environment variable to allow disabling universal planes. > > > > Signed-off-by: Daniel Stone <dani...@collabora.com> > > --- > > libweston/compositor-drm.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c > > index b28e602f..0827e953 100644 > > --- a/libweston/compositor-drm.c > > +++ b/libweston/compositor-drm.c > > @@ -2551,8 +2551,10 @@ init_kms_caps(struct drm_backend *b) > > else > > b->cursor_height = 64; > > > > - ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, > > 1); > > - b->universal_planes = (ret == 0); > > + if (!getenv("WESTON_DISABLE_UNIVERSAL_PLANES")) { > > + ret = drmSetClientCap(b->drm.fd, > > DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1); > > + b->universal_planes = (ret == 0); > > + } > Just a general idea, please don't bother with it for now: > > Normally it's great if one can have clear description of the format > env. variables expect. > Quick grep shows WAYLAND_DEBUG and this instance. > > For bool sounding variables, one would expect FOO=0/1 to work. Hi Emil, yes. I think we will replace all these ad hoc weston debug switches eventually with something like LIBWESTON_DEBUG=disable-universal-planes,disable-foofoo that is a single env var accepting a list of debug switches. We need to also think whether we want it to be a libweston or Weston thing. If it was a Weston thing, then libweston would have ABI to set them. I haven't thought it through yet. Thanks, pq
pgpCPAc6OmPKM.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel