From patchwork Thu Nov 22 17:03:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 151802 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp990477ljp; Thu, 22 Nov 2018 09:03:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/VaacNh8AOdoXfvWSv4KJ77QGrcsiybzE/2mEhJJhfoagj2hdi+xv8dY/lHNn4F7fDC+7zq X-Received: by 2002:adf:9071:: with SMTP id h104-v6mr10345149wrh.65.1542906194013; Thu, 22 Nov 2018 09:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542906194; cv=none; d=google.com; s=arc-20160816; b=AQPdZqm1teNoizgRsk8iIviYkNHy6OWI9XdFScb0g1heMwPNyxxAAdI7P9tfCKbWhK pYu5yByw72z8iwrQsKWfXGECgLuPDjjVXlN324w56AJFiSrGExOrgB5Dq3JN3JaJuBEI gpbfaFSvfwzRSoDdu544kqSqFzI4Qcn229TwRKRhIIeTqrvNI/DZtya10b3c6MLeW/uy Ek2T2uyreWkXcGuKSj9/BzHWPz9VFqTK60VvXUJQGfD8g3DVPGXIKz3stH2kDUB5SwIC UpGad5GY4BZoHih/ZVOp+3q7ZDmd4wedsn3WJgSn7tlsZIYKNY/bE46THSyy4YA43dJu j+zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=AHG1UAIEwsHls/oy0Jw6PO+fWYVt8QmesEpcjyjHeB4=; b=ySLBj5mbvnAtIpWBUX4Q5eTQh9veJRQCgrVzA3k7SoPcuS4NeV+yWIJ3XNTQN4EU8P 9sExPqO/4cBbQy3E70v1VEWsP6VlRo6TiPhWZkjC5JfDRwe9TQGVJQYUgDVY0j2qi/nw X++jb8kNm/OLT/Aw7rKJFY3Fbdz6joDjDLIk+YOrzkpgvrmfBLFgdCJFHcT1NLa7wACf UjiPwoWUzkZw89l9aHPEzd2H683Zh1lG4WD0WIJfBAmMhuhunySXAij4/G0bcFa8QmmF yQm2D1hmAWYsZUCIz2tGlktFMt479nIhAmpaxttKR5vhwv8bgpq14K05NUKSeMBzhtNA /xlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id l30si17255948wre.339.2018.11.22.09.03.13 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Nov 2018 09:03:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1gPsNj-0005Zt-VH; Thu, 22 Nov 2018 17:03:11 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Gerd Hoffmann Subject: [PATCH for-4.0] ui/console: Remove qemu_create_display_surface_guestmem() Date: Thu, 22 Nov 2018 17:03:09 +0000 Message-Id: <20181122170309.4856-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 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 --- include/ui/console.h | 4 ---- ui/console.c | 36 ------------------------------------ 2 files changed, 40 deletions(-) -- 2.19.1 diff --git a/include/ui/console.h b/include/ui/console.h index c17803c530a..853fcf4eb75 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 3a285bae00a..7076becedd5 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) {