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

Pekka Paalanen ppaalanen at gmail.com
Thu Jan 30 14:37:06 UTC 2020


On Tue, 3 Apr 2018 14:42:58 +0300
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> 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?

Hi,

if you still happen to care about this, I suppose we could merge it if
you send it in as a Gitlab merge request. Personally I would prefer to
leave the fbdev-backend alone waiting to be removed.

https://gitlab.freedesktop.org/wayland/weston/blob/master/CONTRIBUTING.md


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


More information about the wayland-devel mailing list