From patchwork Thu Jan 10 08:47:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 155126 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1653788jaa; Thu, 10 Jan 2019 00:57:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN6L4rZqGm9t7YcPPWgwp+9mP24AkZiiQFS0GF9Hi59ocs9wieOvQQQ1agqSIiZ/Ao81yUhx X-Received: by 2002:a1c:c90b:: with SMTP id f11mr8894055wmb.33.1547110663024; Thu, 10 Jan 2019 00:57:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547110663; cv=none; d=google.com; s=arc-20160816; b=MsS1TB+v3YSxMjMJq4tWeaJGSBvqTGyvf31fDdOesl9v80CrPMtf4k4nHi9GYLm8mY Kt1ABFFcE8UokBoVnipIpfbupi+n9G2R9rlg6zjEo5CLDIfav4hR7wamkAeRhWPZu0bU 1CqIWwShD1D+760JELkjDzRZtpfS1yVCcIhHHL/HCZTmFHh5f+JT0JSU4l8tAcKmJPk3 ZoP/SQvZ+mrqRn9XHHEboW+YRN/+k6odwSC7z5rPkttZt72MsX55CDYkAVGvT1THpSQy wePNExJ/ye85ju1chzRWf7Yw9M5OZg7161HMBQ07xPlxVpb8CYZKG+rNOr3N18Xf6AWP FG5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=dE7u8FRnUeh1vvA1LjzMcS+bZ5VAA81IYMyzjppxzUw=; b=FQrdijVsAcJBhFRJKelRb3f1tesSt0u3VKtk/FOUnDtQIakxoKmFgY83PLQAQRZdwA WJoFEK34vlNWjZgkk/vMryW3z+Z6pynjpAj9hVNF26FrTX0QsazfET2v2Xdy6My3roR6 DmrKMeGqnJ16Vd1awVV/GhwOBKXrKnja05z5u+iUCTr4XrQ7lpxLiYpVe0GwOFBdEgOi DmbObmFcyaKjoLeYCmWo+rTkotvOoIAfBSvtpKcN7KOp9lG504i9vTlK+baaWJSkdaDO iM9mX2oUtwrTMY+V9yVAF+pKIXsNlaPypro7PhMgRoKsGQuBEkyDrvsh7rwo+PMQPkYF cY8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b80si10618829wmb.19.2019.01.10.00.57.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 Jan 2019 00:57:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([127.0.0.1]:58404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghW9l-0004Aj-Uf for patch@linaro.org; Thu, 10 Jan 2019 03:57:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghW3L-0008SQ-63 for qemu-devel@nongnu.org; Thu, 10 Jan 2019 03:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghW0Q-00060l-7o for qemu-devel@nongnu.org; Thu, 10 Jan 2019 03:48:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghW0P-00060C-IE for qemu-devel@nongnu.org; Thu, 10 Jan 2019 03:48:01 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA2E18E596; Thu, 10 Jan 2019 08:48:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-203.ams2.redhat.com [10.36.116.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38FAE7EB63; Thu, 10 Jan 2019 08:47:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 00D529D8B; Thu, 10 Jan 2019 09:47:53 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 09:47:47 +0100 Message-Id: <20190110084752.30510-4-kraxel@redhat.com> In-Reply-To: <20190110084752.30510-1-kraxel@redhat.com> References: <20190110084752.30510-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 10 Jan 2019 08:48:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/8] ui/console: Remove qemu_create_display_surface_guestmem() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell 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 Message-id: 20181122170309.4856-1-peter.maydell@linaro.org Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 4 ---- ui/console.c | 36 ------------------------------------ 2 files changed, 40 deletions(-) -- 2.9.3 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) {