From: Valentin Manea <valentin.manea@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Jia Liu <proljc@gmail.com>
Subject: [Qemu-devel] Big Endian qemu_pixelformat_from_pixman and qemu_default_pixman_format
Date: Sun, 14 Sep 2014 22:08:40 +0300 [thread overview]
Message-ID: <5415E7B8.6070704@gmail.com> (raw)
Hi Gerd,
I'm working on improving the OpenRISC support for QEMU and recently I got in
one problem with qemu_pixelformat_from_pixman(). It seems quite recently the
ui/console.c code has started using it for big endian as well but the new change
breaks my existing framebuffer patches.
The problem is that for little endian 32bpp qemu_default_pixman_format() will
return PIXMAN_x8r8g8b8 but for big endian 32bpp it returns PIXMAN_b8g8r8a8:
pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endian)
{
if (native_endian) {
switch (bpp) {
case 15:
return PIXMAN_x1r5g5b5;
case 16:
return PIXMAN_r5g6b5;
case 24:
return PIXMAN_r8g8b8;
case 32:
return PIXMAN_x8r8g8b8;
}
} else {
switch (bpp) {
case 24:
return PIXMAN_b8g8r8;
case 32:
return PIXMAN_b8g8r8a8;
break;
}
}
I was wondering if there is any reason not to return PIXMAN_b8g8r8x8 also for
big endian? In the worst case scenario it would be compatible to the previous code.
If you are OK, I would like to submit this patch:
diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c
index 30c7fdd..1f6fea5 100644
--- a/ui/qemu-pixman.c
+++ b/ui/qemu-pixman.c
@@ -80,7 +80,7 @@ pixman_format_code_t qemu_default_pixman_format(int bpp, bool
native_endian)
case 24:
return PIXMAN_b8g8r8;
case 32:
- return PIXMAN_b8g8r8a8;
+ return PIXMAN_b8g8r8x8;
break;
}
}
Thanks
next reply other threads:[~2014-09-14 19:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 19:08 Valentin Manea [this message]
2014-09-15 6:33 ` [Qemu-devel] Big Endian qemu_pixelformat_from_pixman and qemu_default_pixman_format 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=5415E7B8.6070704@gmail.com \
--to=valentin.manea@gmail.com \
--cc=kraxel@redhat.com \
--cc=proljc@gmail.com \
--cc=qemu-devel@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).