[PATCH weston v11 02/13] compositor-drm: Rename fb_plane to scanout_plane

Ucan, Emre (ADITG/ESB) eucan at de.adit-jv.com
Mon Jul 24 15:39:17 UTC 2017


Hi,

It is a simple renaming patch. Proposed name makes sense:
Reviewed-by: Emre Ucan <eucan at de.adit-jv.com>

Best regards

Emre Ucan
Engineering Software Base (ADITG/ESB)

Tel. +49 5121 49 6937

> -----Original Message-----
> From: wayland-devel [mailto:wayland-devel-
> bounces at lists.freedesktop.org] On Behalf Of Daniel Stone
> Sent: Dienstag, 18. Juli 2017 15:15
> To: wayland-devel at lists.freedesktop.org
> Subject: [PATCH weston v11 02/13] compositor-drm: Rename fb_plane to
> scanout_plane
> 
> All planes being displayed have a framebuffer. What makes 'fb_plane'
> special is that it's being displayed as the primary plane by KMS.
> 
> Previous patchsets renamed this to 'primary_plane' to match the KMS
> terminology, namely the CRTC's base plane, which is controlled by
> drmModeSetCrtc in the legacy API, and identified by PLANE_TYPE ==
> "Primary" in the universal-plane API.
> 
> However, Weston uses 'primary_plane' internally to refer to the case
> where client content is _not_ directly displayed on a plane, but
> composited via the renderer, with the result of the compositing then
> shown.
> 
> Rename to 'scanout_plane' as our least-ambiguous name, and document it a
> bit.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
>  libweston/compositor-drm.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index 5967a18f..54b50d9d 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -233,7 +233,8 @@ struct drm_output {
>  	struct gbm_surface *gbm_surface;
>  	uint32_t gbm_format;
> 
> -	struct weston_plane fb_plane;
> +	/* Plane for a fullscreen direct scanout view */
> +	struct weston_plane scanout_plane;
> 
>  	/* The last framebuffer submitted to the kernel for this CRTC. */
>  	struct drm_fb *fb_current;
> @@ -719,7 +720,7 @@ drm_output_prepare_scanout_view(struct
> drm_output *output,
> 
>  	drm_fb_set_buffer(output->fb_pending, buffer);
> 
> -	return &output->fb_plane;
> +	return &output->scanout_plane;
>  }
> 
>  static struct drm_fb *
> @@ -2774,10 +2775,10 @@ drm_output_enable(struct weston_output
> *base)
> 
>  	weston_plane_init(&output->cursor_plane, b->compositor,
>  			  INT32_MIN, INT32_MIN);
> -	weston_plane_init(&output->fb_plane, b->compositor, 0, 0);
> +	weston_plane_init(&output->scanout_plane, b->compositor, 0, 0);
> 
>  	weston_compositor_stack_plane(b->compositor, &output-
> >cursor_plane, NULL);
> -	weston_compositor_stack_plane(b->compositor, &output-
> >fb_plane,
> +	weston_compositor_stack_plane(b->compositor, &output-
> >scanout_plane,
>  				      &b->compositor->primary_plane);
> 
>  	weston_log("Output %s, (connector %d, crtc %d)\n",
> @@ -2818,7 +2819,7 @@ drm_output_deinit(struct weston_output *base)
>  	else
>  		drm_output_fini_egl(output);
> 
> -	weston_plane_release(&output->fb_plane);
> +	weston_plane_release(&output->scanout_plane);
>  	weston_plane_release(&output->cursor_plane);
> 
>  	drmModeFreeProperty(output->dpms_prop);
> --
> 2.13.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list