On Wed, 20 Dec 2017 12:26:41 +0000
Daniel Stone <[email protected]> wrote:

> ... in order to be able to use it from scanout as well.
> 
> Signed-off-by: Daniel Stone <[email protected]>
> ---
>  libweston/compositor-drm.c | 221 
> ++++++++++++++++++++++++---------------------
>  1 file changed, 119 insertions(+), 102 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index dbe53513b..195eef725 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c

> @@ -2695,6 +2761,14 @@ drm_output_prepare_overlay_view(struct 
> drm_output_state *output_state,
>               if (!drm_plane_is_available(p, output))
>                       continue;
>  
> +             /* Check whether the format is supported */
> +             for (i = 0; i < p->count_formats; i++) {
> +                     if (p->formats[i] == fb->format->format)
> +                             break;
> +             }
> +             if (i == p->count_formats)
> +                     continue;
> +
>               state = drm_output_state_get_plane(output_state, p);
>               if (state->fb) {
>                       state = NULL;

One minor behavioral change is that if the format is not compatible,
the new code will keep trying other planes while the old one did not.

> @@ -2705,76 +2779,19 @@ drm_output_prepare_overlay_view(struct 
> drm_output_state *output_state,

> -     /* Check whether the format is supported */
> -     for (i = 0; i < p->count_formats; i++)
> -             if (p->formats[i] == state->fb->format->format)
> -                     break;
> -     if (i == p->count_formats)
> -             goto err;
> -
> -     drm_fb_set_buffer(state->fb, ev->surface->buffer_ref.buffer);
> -
>       return &p->base;
>  
>  err:

Reviewed-by: Pekka Paalanen <[email protected]>


Thanks,
pq

Attachment: pgpJis6U9g_F7.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to