qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman
Date: Thu, 20 Sep 2012 15:51:02 +0200	[thread overview]
Message-ID: <505B1F46.1080303@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1209201218480.29232@kaball.uk.xensource.com>

  Hi,

> It might be a good idea to get rid
> of DisplayAllocator altogether.

After some digging in the source code:  Yes, I think so.

Look, we have *two* concepts for avoiding memcpy:

The first is the DisplayAllocator.  Only implemented by SDL, which is
scheduled to be downgraded by anthonys gtk patches.  Doesn't really fit
into the concept of displaychangelisteners coming and going at runtime,
and also not of having multiple displaychangelisteners (like sdl+vnc at
the same time).  It allows vga emulation to render directly into a SDL
buffer.

The second is qemu_create_displaysurface_from().  It allows vga
emulation hand out a surface with direct pointer to the guests video
memory for displaychangelisteners to read from.

You can't have both (i.e. the guest will never ever write directly into
the SDL buffer), there will always be at least one memcpy.

So what happens in practice?

In any graphics mode relevant today vga emulation will use
qemu_create_displaysurface_from().  Whenever a DisplayAllocator is
present or not doesn't make any difference then.

In case vga emulation has to render something because the guests video
memory can't be represented directly as displaysurface (text mode, gfx
modes with <= 256 colors) it will allocate a surface where it will
render the screen to and will use the SDL DisplayAllocator if registered.

I somehow doubt text mode acceleration is worth the complexity+confusion
DisplayAllocator adds to the picture.

Also I'd like to have reference counting for display surfaces because I
can offload the display scaling to a separate thread then.  Guess this
is easier to implement when zapping DisplayAllocator first.

cheers,
  Gerd

  reply	other threads:[~2012-09-20 13:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 11:15 [Qemu-devel] [PATCH v4 0/9] linux framebuffer display driver Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 1/9] QLIST-ify display change listeners Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 2/9] add unregister_displaychangelistener Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 3/9] move set_mouse + cursor_define callbacks Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 4/9] fbdev: add linux framebuffer display driver Gerd Hoffmann
2012-09-19 18:09   ` Stefano Stabellini
2012-09-21 12:28     ` Gerd Hoffmann
2012-09-24 11:06       ` Stefano Stabellini
2012-09-24 13:09         ` Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 5/9] fbdev: add monitor command to enable/disable Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 6/9] fbdev: make configurable at compile time Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 7/9] fbdev: move to pixman Gerd Hoffmann
2012-09-19 18:10   ` Stefano Stabellini
2012-09-20  6:16     ` Gerd Hoffmann
2012-09-20 11:33       ` Stefano Stabellini
2012-09-20 13:51         ` Gerd Hoffmann [this message]
2012-09-20 15:20           ` Stefano Stabellini
2012-09-20 15:27             ` Gerd Hoffmann
2012-09-20 15:28               ` Stefano Stabellini
2012-09-20 15:33                 ` Stefano Stabellini
2012-09-21  5:40                   ` Gerd Hoffmann
2012-09-21 10:48                     ` Stefano Stabellini
2012-09-19 11:15 ` [Qemu-devel] [PATCH 8/9] fbdev: add mouse pointer support Gerd Hoffmann
2012-09-19 11:15 ` [Qemu-devel] [PATCH 9/9] fbdev: add display scaling support Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2012-09-18  7:17 [Qemu-devel] [PULL 0/9] linux framebuffer display driver Gerd Hoffmann
2012-09-18  7:17 ` [Qemu-devel] [PATCH 7/9] fbdev: move to pixman Gerd Hoffmann
2012-09-18 15:01   ` Stefano Stabellini
2012-09-19  5:51     ` Gerd Hoffmann
2012-09-18 19:14   ` Anthony Liguori
2012-09-18 21:08     ` Anthony Liguori
2012-11-26 18:42     ` Alexander Graf
2012-11-26 20:01       ` Gerd Hoffmann
2012-11-26 20:05         ` Alexander Graf
2012-09-18 20:30   ` Søren Sandmann
2012-09-19  5:56     ` 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=505B1F46.1080303@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.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).