qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Suramya Shah <shah.suramya@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Removed support for depth!=32
Date: Mon, 27 Feb 2017 12:54:24 +0100	[thread overview]
Message-ID: <1488196464.25015.20.camel@redhat.com> (raw)
In-Reply-To: <CAFEAcA9nZCfVyDUzbavnu0HYtfHp1WTK=euATBB9FHkvnC7hTQ@mail.gmail.com>

  Hi,

> (Gerd: can you remind me of the reason why we can assume that
> depth is always 32 here? IIRC it's because the UI layer always
> uses 32 bit depth now but I couldn't convince myself of that
> with a quick look through the ui code...)

qemu-allocated display surfaces (backed by host memory) are always
32bpp.  Display emulation will get such surfaces in case it uses
qemu_create_displaysurface() or qemu_console_resize().  So the display
emulation only needs to be able to generate 32bpp output
(PIXMAN_x8r8g8b8 to be exact) from whatever the guest creates.

There is also the option to create display surfaces which are backed by
guest ram or vga device memory, using qemu_create_displaysurface_from(),
those can have a different format (any pixman supported format is
allowed here, because the ui code will use pixman to convert those
surfaces if needed).

sm501 uses qemu_console_resize (see line 1320), so yes, the code will
never see a display surface with a depth != 32 and a whole bunch of code
can be dropped.  The need for the include template goes away too.

cheers,
  Gerd

      reply	other threads:[~2017-02-27 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  8:14 [Qemu-devel] [PATCH] Removed support for depth!=32 Suramya Shah
2017-02-27  9:59 ` no-reply
2017-02-27 10:36 ` Peter Maydell
2017-02-27 11:54   ` Gerd Hoffmann [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=1488196464.25015.20.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shah.suramya@gmail.com \
    /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).