[PATCH] compositor-fbdev: Add support for ABGR in calculate_pixman_format

Pekka Paalanen ppaalanen at gmail.com
Tue Apr 3 11:42:58 UTC 2018


On Wed, 19 Jul 2017 00:06:38 +0200
Pablo Castellano <pablo at anche.no> wrote:

> In PostmarketOS we have added support for the Asus grouper device
> (Google Nexus 7 2012 tablet), which uses ABGR.
> 
> This mode seems to be less common and previously it was not correctly
> handled by calculate_pixman_format()
> 
> For more information, see:
> https://github.com/postmarketOS/pmbootstrap/wiki/asus-grouper-%28Google-Nexus-7-2012%29
> 
> Signed-off-by: Pablo Castellano <pablo at anche.no>

Hi,

the web page mentions Tegra. Is there really no way to get DRM drivers
on that device?


Thanks,
pq

> ---
>  libweston/compositor-fbdev.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
> index e80a504..37c8005 100644
> --- a/libweston/compositor-fbdev.c
> +++ b/libweston/compositor-fbdev.c
> @@ -211,8 +211,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
>  	    vinfo->blue.msb_right != 0)
>  		return 0;
>  
> -	/* Work out the format type from the offsets. We only support RGBA and
> -	 * ARGB at the moment. */
> +	/* Work out the format type from the offsets. We only support RGBA,
> +	 * ARGB and ABGR at the moment. */
>  	type = PIXMAN_TYPE_OTHER;
>  
>  	if ((vinfo->transp.offset >= vinfo->red.offset ||
> @@ -224,6 +224,10 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
>  	         vinfo->green.offset >= vinfo->blue.offset &&
>  	         vinfo->blue.offset >= vinfo->transp.offset)
>  		type = PIXMAN_TYPE_RGBA;
> +	else if (vinfo->transp.offset >= vinfo->blue.offset &&
> +	         vinfo->blue.offset >= vinfo->green.offset &&
> +	         vinfo->green.offset >= vinfo->red.offset)
> +		type = PIXMAN_TYPE_ABGR;
>  
>  	if (type == PIXMAN_TYPE_OTHER)
>  		return 0;

-------------- 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/20180403/620c37ba/attachment.sig>


More information about the wayland-devel mailing list