On Tue, 26 Sep 2017 18:15:45 +0100
Daniel Stone <dani...@collabora.com> wrote:

> From: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> 
> Set the atomic client cap, where it exists, and use this to discover the
> plane/CRTC/connector properties we require for atomic modesetting.
> 
> Signed-off-by: Daniel Stone <dani...@collabora.com>
> Co-authored-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> ---
>  configure.ac               |  3 +++
>  libweston/compositor-drm.c | 57 
> +++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 59 insertions(+), 1 deletion(-)


> @@ -2816,6 +2839,13 @@ init_kms_caps(struct drm_backend *b)
>       weston_log("DRM: %s universal planes\n",
>                  b->universal_planes ? "supports" : "does not support");
>  
> +#ifdef HAVE_DRM_ATOMIC
> +     ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ATOMIC, 1);
> +     b->atomic_modeset = (ret == 0);

Hi,

as I saw this being discussed in IRC, maybe this should be conditional
on universal planes, because enabling atomic will also enable universal
planes, and that will break the debug code disabling universal planes.

> +#endif
> +     weston_log("DRM: %s atomic modesetting\n",
> +                b->atomic_modeset ? "supports" : "does not support");
> +
>       return 0;
>  }
>  
> @@ -2959,6 +2989,16 @@ drm_plane_create(struct drm_backend *b, const 
> drmModePlane *kplane,
>                       .enum_values = plane_type_enums,
>                       .num_enum_values = WDRM_PLANE_TYPE__COUNT,
>               },
> +             [WDRM_PLANE_SRC_X] = { .name = "SRC_X", },
> +             [WDRM_PLANE_SRC_Y] = { .name = "SRC_Y", },
> +             [WDRM_PLANE_SRC_W] = { .name = "SRC_W", },
> +             [WDRM_PLANE_SRC_H] = { .name = "SRC_H", },
> +             [WDRM_PLANE_CRTC_X] = { .name = "CRTC_X", },
> +             [WDRM_PLANE_CRTC_Y] = { .name = "CRTC_Y", },
> +             [WDRM_PLANE_CRTC_W] = { .name = "CRTC_W", },
> +             [WDRM_PLANE_CRTC_H] = { .name = "CRTC_H", },
> +             [WDRM_PLANE_FB_ID] = { .name = "FB_ID", },
> +             [WDRM_PLANE_CRTC_ID] = { .name = "CRTC_ID", },
>       };
>  
>       plane = zalloc(sizeof(*plane) +
> @@ -3141,7 +3181,6 @@ create_sprites(struct drm_backend *b)
>       drmModePlane *kplane;
>       struct drm_plane *drm_plane;
>       uint32_t i;
> -

Stray change.

>       kplane_res = drmModeGetPlaneResources(b->drm.fd);
>       if (!kplane_res) {
>               weston_log("failed to get plane resources: %s\n",

Those two fixed gives this:
Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>


Thanks,
pq

Attachment: pgpmxus5FFVvX.pgp
Description: OpenPGP digital signature

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

Reply via email to