[PATCH v14 26/41] compositor-drm: Remove no_addfb2 handling

Pekka Paalanen ppaalanen at gmail.com
Thu Jan 25 12:07:15 UTC 2018


On Wed, 20 Dec 2017 12:26:43 +0000
Daniel Stone <daniels at collabora.com> wrote:

> If AddFB2 ever fails for any reason, we fall back to legacy AddFB, which
> doesn't support the same swathe of formats, or multi-planar formats, or
> modifiers.
> 
> This can happen with arbitrary client buffers, condemning us to the
> fallback forever more. Remove this, at the cost of an unnecessary ioctl
> for users on old kernels without AddFB2; unfortunately, we cannot detect
> the complete absence of the ioctl, as the return here is -EINVAL rather
> than -ENOTTY.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>  libweston/compositor-drm.c | 46 ++++++++++++----------------------------------
>  1 file changed, 12 insertions(+), 34 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index 09318c98c..e6b5efba0 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -241,7 +241,6 @@ struct drm_backend {
>  	 */
>  	int min_width, max_width;
>  	int min_height, max_height;
> -	int no_addfb2;
>  
>  	struct wl_list plane_list;
>  	int sprites_are_broken;
> @@ -848,6 +847,7 @@ drm_fb_create_dumb(struct drm_backend *b, int width, int height,
>  	struct drm_mode_create_dumb create_arg;
>  	struct drm_mode_destroy_dumb destroy_arg;
>  	struct drm_mode_map_dumb map_arg;
> +	uint32_t handles[4] = { 0 }, pitches[4] = { 0 }, offsets[4] = { 0 };

That's a little painful to read, how about a separate statement for
each?

Anyway,

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/d25e7a8c/attachment.sig>


More information about the wayland-devel mailing list