qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sahid Orentino Ferdjaoui <sferdjao@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*
Date: Thu, 6 Apr 2017 12:43:36 +0200	[thread overview]
Message-ID: <20170406104336.GA28959@redhat> (raw)
In-Reply-To: <ef70b4ab-f71a-8235-dc63-ae34097436af@amsat.org>

On Mon, Apr 03, 2017 at 09:28:02AM -0300, Philippe Mathieu-Daudé wrote:
> On 04/03/2017 08:40 AM, Laurent Vivier wrote:
> > This avoids a "#ifdef HOST_WORDS_BIGENDIAN" and this is the purpose
> > of PIXMAN_BE_* macros.
> > 
> > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>

> 
> > ---
> >  hw/display/virtio-gpu.c | 35 ++++++++---------------------------
> >  1 file changed, 8 insertions(+), 27 deletions(-)
> > 
> > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> > index 9b530ab..7befcef 100644
> > --- a/hw/display/virtio-gpu.c
> > +++ b/hw/display/virtio-gpu.c
> > @@ -258,41 +258,22 @@ void virtio_gpu_get_display_info(VirtIOGPU *g,
> >  static pixman_format_code_t get_pixman_format(uint32_t virtio_gpu_format)
> >  {
> >      switch (virtio_gpu_format) {
> > -#ifdef HOST_WORDS_BIGENDIAN
> >      case VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM:
> > -        return PIXMAN_b8g8r8x8;
> > +        return PIXMAN_BE_b8g8r8x8;
> >      case VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM:
> > -        return PIXMAN_b8g8r8a8;
> > +        return PIXMAN_BE_b8g8r8a8;
> >      case VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM:
> > -        return PIXMAN_x8r8g8b8;
> > +        return PIXMAN_BE_x8r8g8b8;
> >      case VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM:
> > -        return PIXMAN_a8r8g8b8;
> > +        return PIXMAN_BE_a8r8g8b8;
> >      case VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM:
> > -        return PIXMAN_r8g8b8x8;
> > +        return PIXMAN_BE_r8g8b8x8;
> >      case VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM:
> > -        return PIXMAN_r8g8b8a8;
> > +        return PIXMAN_BE_r8g8b8a8;
> >      case VIRTIO_GPU_FORMAT_X8B8G8R8_UNORM:
> > -        return PIXMAN_x8b8g8r8;
> > +        return PIXMAN_BE_x8b8g8r8;
> >      case VIRTIO_GPU_FORMAT_A8B8G8R8_UNORM:
> > -        return PIXMAN_a8b8g8r8;
> > -#else
> > -    case VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM:
> > -        return PIXMAN_x8r8g8b8;
> > -    case VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM:
> > -        return PIXMAN_a8r8g8b8;
> > -    case VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM:
> > -        return PIXMAN_b8g8r8x8;
> > -    case VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM:
> > -        return PIXMAN_b8g8r8a8;
> > -    case VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM:
> > -        return PIXMAN_x8b8g8r8;
> > -    case VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM:
> > -        return PIXMAN_a8b8g8r8;
> > -    case VIRTIO_GPU_FORMAT_X8B8G8R8_UNORM:
> > -        return PIXMAN_r8g8b8x8;
> > -    case VIRTIO_GPU_FORMAT_A8B8G8R8_UNORM:
> > -        return PIXMAN_r8g8b8a8;
> > -#endif
> > +        return PIXMAN_BE_a8b8g8r8;
> >      default:
> >          return 0;
> >      }
> > 

  reply	other threads:[~2017-04-06 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 11:40 [Qemu-devel] [PATCH] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_* Laurent Vivier
2017-04-03 12:28 ` Philippe Mathieu-Daudé
2017-04-06 10:43   ` Sahid Orentino Ferdjaoui [this message]
2017-04-07 10:29 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406104336.GA28959@redhat \
    --to=sferdjao@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).