From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] console: stop using PixelFormat
Date: Sat, 21 Jun 2014 15:27:02 +1000 [thread overview]
Message-ID: <1403328422.4587.77.camel@pasglop> (raw)
In-Reply-To: <1403094208-26235-5-git-send-email-kraxel@redhat.com>
On Wed, 2014-06-18 at 14:23 +0200, Gerd Hoffmann wrote:
> With this patch the qemu console core stops using PixelFormat and pixman
> format codes side-by-side, pixman format code is the primary way to
> specify the DisplaySurface format:
>
> * DisplaySurface stops carrying a PixelFormat field.
> * qemu_create_displaysurface_from() expects a pixman format now.
>
> Functions to convert PixelFormat to pixman_format_code_t (and back)
> exist for those who still use PixelFormat. As PixelFormat allows
> easy access to masks and shifts it will probably continue to exist.
Finally got to start playing with that stuff (got busy with other things
for a while) and untangling vga.c (remove whole chunks of it actually
since we know the target is always 32bpp when we need to convert or
"draw" so it's a lot easier).
While at it, I noticed this patch is missing this, feel free to fold in
no need to add an ack or anything, it's trivial:
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 032eb7a..f9cdd96 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -711,15 +711,17 @@ static void xenfb_update(void *opaque)
/* resize if needed */
if (xenfb->do_resize) {
+ pixman_format_code_t format;
+
xenfb->do_resize = 0;
switch (xenfb->depth) {
case 16:
case 32:
/* console.c supported depth -> buffer can be used directly */
+ format = qemu_default_pixman_format(xenfb->depth, true);
surface = qemu_create_displaysurface_from
- (xenfb->width, xenfb->height, xenfb->depth,
- xenfb->row_stride, xenfb->pixels + xenfb->offset,
- false);
+ (xenfb->width, xenfb->height, format,
+ xenfb->row_stride, xenfb->pixels + xenfb->offset);
break;
default:
/* we must convert stuff */
prev parent reply other threads:[~2014-06-21 5:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 12:23 [Qemu-devel] [PATCH 0/4] console: more pixman conversion work Gerd Hoffmann
2014-06-18 12:23 ` [Qemu-devel] [PATCH 1/4] console: add qemu_pixelformat_from_pixman Gerd Hoffmann
2014-06-18 12:23 ` [Qemu-devel] [PATCH 2/4] console: add qemu_default_pixman_format Gerd Hoffmann
2014-06-18 12:23 ` [Qemu-devel] [PATCH 3/4] console: reimplement qemu_default_pixelformat Gerd Hoffmann
2014-06-18 12:23 ` [Qemu-devel] [PATCH 4/4] console: stop using PixelFormat Gerd Hoffmann
2014-06-21 5:27 ` Benjamin Herrenschmidt [this message]
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=1403328422.4587.77.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=aliguori@amazon.com \
--cc=kraxel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.