[PATCH v14 24/41] compositor-drm: Extract overlay FB import to helper
Pekka Paalanen
ppaalanen at gmail.com
Thu Jan 25 11:25:48 UTC 2018
On Wed, 20 Dec 2017 12:26:41 +0000
Daniel Stone <daniels at collabora.com> wrote:
> ... in order to be able to use it from scanout as well.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> 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 <pekka.paalanen at collabora.co.uk>
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/20180125/e8f3cd38/attachment-0001.sig>
More information about the wayland-devel
mailing list