From patchwork Mon Jun 23 23:10:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 363234 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8AD6014008F for ; Tue, 24 Jun 2014 09:13:33 +1000 (EST) Received: from localhost ([::1]:56429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDQZ-0000uV-Em for incoming@patchwork.ozlabs.org; Mon, 23 Jun 2014 19:13:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDOn-0006x6-8l for qemu-devel@nongnu.org; Mon, 23 Jun 2014 19:11:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzDOi-0003HT-2A for qemu-devel@nongnu.org; Mon, 23 Jun 2014 19:11:41 -0400 Received: from gate.crashing.org ([63.228.1.57]:40433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDOh-0003HK-PT for qemu-devel@nongnu.org; Mon, 23 Jun 2014 19:11:36 -0400 Received: from pasglop.au.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id s5NNBAeT030798; Mon, 23 Jun 2014 18:11:14 -0500 From: Benjamin Herrenschmidt To: qemu-devel@nongnu.org Date: Tue, 24 Jun 2014 09:10:55 +1000 Message-Id: <1403565068-15229-2-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1403565068-15229-1-git-send-email-benh@kernel.crashing.org> References: <1403565068-15229-1-git-send-email-benh@kernel.crashing.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 63.228.1.57 Cc: Gerd Hoffmann Subject: [Qemu-devel] [RFC 01/14] vga: Create direct sufaces for depth 24 too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org pixman supports 24bpp directly, let's share surfaces For both endians even ! Signed-off-by: Benjamin Herrenschmidt --- hw/display/vga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index e4cd206..4674576 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1692,7 +1692,8 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) disp_width != s->last_width || height != s->last_height || s->last_depth != depth) { - if (depth == 32 || ((depth == 16 || depth == 15) && !byteswap)) { + if (depth == 32 || depth == 24 || + ((depth == 16 || depth == 15) && !byteswap)) { pixman_format_code_t format = qemu_default_pixman_format(depth, !byteswap); surface = qemu_create_displaysurface_from(disp_width,