[PATCH weston v12 16/40] compositor-drm: Allow disabling atomic

Pekka Paalanen ppaalanen at gmail.com
Wed Oct 4 09:56:55 UTC 2017


On Tue, 26 Sep 2017 18:15:49 +0100
Daniel Stone <daniels at collabora.com> wrote:

> Add a test environment variable to allow disabling atomic modesetting.
> 
> Signed-off-by: Daniel Stone <daniels at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171004/fa2e71f4/attachment.sig>


More information about the wayland-devel mailing list