From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL 3/8] ui/console: Remove qemu_create_display_surface_guestmem()
Date: Thu, 10 Jan 2019 09:47:47 +0100 [thread overview]
Message-ID: <20190110084752.30510-4-kraxel@redhat.com> (raw)
In-Reply-To: <20190110084752.30510-1-kraxel@redhat.com>
From: Peter Maydell <peter.maydell@linaro.org>
The qemu_create_display_surface_guestmem() function was added in
commit a77549b3ffcc24c32ee4e but apparently never used. Remove it.
(The API of this function is in any case awkward as a generic
function: it assumes that a physical address uniquely identifies
a piece of memory in the system, which is mostly but not
always true.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20181122170309.4856-1-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/ui/console.h | 4 ----
ui/console.c | 36 ------------------------------------
2 files changed, 40 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index c17803c530..853fcf4eb7 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -257,10 +257,6 @@ DisplaySurface *qemu_create_displaysurface_from(int width, int height,
pixman_format_code_t format,
int linesize, uint8_t *data);
DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image);
-DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
- pixman_format_code_t format,
- int linesize,
- uint64_t addr);
DisplaySurface *qemu_create_message_surface(int w, int h,
const char *msg);
PixelFormat qemu_default_pixelformat(int bpp);
diff --git a/ui/console.c b/ui/console.c
index 3a285bae00..7076becedd 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1385,42 +1385,6 @@ DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image)
return surface;
}
-static void qemu_unmap_displaysurface_guestmem(pixman_image_t *image,
- void *unused)
-{
- void *data = pixman_image_get_data(image);
- uint32_t size = pixman_image_get_stride(image) *
- pixman_image_get_height(image);
- cpu_physical_memory_unmap(data, size, 0, 0);
-}
-
-DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
- pixman_format_code_t format,
- int linesize, uint64_t addr)
-{
- DisplaySurface *surface;
- hwaddr size;
- void *data;
-
- if (linesize == 0) {
- linesize = width * PIXMAN_FORMAT_BPP(format) / 8;
- }
-
- size = (hwaddr)linesize * height;
- data = cpu_physical_memory_map(addr, &size, 0);
- if (size != (hwaddr)linesize * height) {
- cpu_physical_memory_unmap(data, size, 0, 0);
- return NULL;
- }
-
- surface = qemu_create_displaysurface_from
- (width, height, format, linesize, data);
- pixman_image_set_destroy_function
- (surface->image, qemu_unmap_displaysurface_guestmem, NULL);
-
- return surface;
-}
-
DisplaySurface *qemu_create_message_surface(int w, int h,
const char *msg)
{
--
2.9.3
next prev parent reply other threads:[~2019-01-10 8:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 8:47 [Qemu-devel] [PULL 0/8] Ui 20190110 patches Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 1/8] egl-headless: add egl_create_context Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 2/8] configure: bump spice-server required version to 0.12.5 Gerd Hoffmann
2019-01-10 8:47 ` Gerd Hoffmann [this message]
2019-01-10 8:47 ` [Qemu-devel] [PULL 4/8] keymaps: remove modifiers include Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 5/8] keymaps: drop nl-be map Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 6/8] keymaps: remove common include Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 7/8] keymaps: drop support for include files Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 8/8] spice: Remove unused include Gerd Hoffmann
2019-01-11 14:10 ` Philippe Mathieu-Daudé
2019-01-10 17:49 ` [Qemu-devel] [PULL 0/8] Ui 20190110 patches Peter Maydell
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=20190110084752.30510-4-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).