From patchwork Mon Mar 14 15:04:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pooja Dhannawat X-Patchwork-Id: 8580701 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 38C3AC0553 for ; Mon, 14 Mar 2016 15:06:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72DA0202E5 for ; Mon, 14 Mar 2016 15:06:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B270D200E5 for ; Mon, 14 Mar 2016 15:06:34 +0000 (UTC) Received: from localhost ([::1]:41568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afU4n-0004W2-TD for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Mar 2016 11:06:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afU4g-0004Vj-BB for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:06:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afU4a-00018q-JS for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:06:26 -0400 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:34275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afU4a-00018a-85 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:06:20 -0400 Received: by mail-pf0-x22a.google.com with SMTP id x3so44262162pfb.1 for ; Mon, 14 Mar 2016 08:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=1mBbPN4GBjz0gTB8JULoIhuWyhbOLSwOSSCcA0wyMsU=; b=0ZXPUmaCeEQmSLbdCqyttveEycAnqAYml6VyUw2RjhxWzsXX3+sI0bnMhYNQD792nF v/oxJ3FH7+E6BQC1b+eGpUfV2d0fYXbUIYU1gjWUUWvV4lNMGXQnco75fZlfuBL95x6U 70JL7Cg/UDK3Rq6kjczy0FnxgVQLSqzuyXrbat4BnRGAPFOn8WsofI5U2oJYUA/Ry3un v6w9C10ftMJ6S3mHdWFwOq2Tzoww9mSAT4L2hQJpI7zlAkmztMjrYwO3yFmX5qoPizau OonEpdDj1kS/E4C4dlcU3Egugxkpz6PaC6ocRXO9OSmyLTWXYT0e6AhOadgLwda/hzfx 66Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=1mBbPN4GBjz0gTB8JULoIhuWyhbOLSwOSSCcA0wyMsU=; b=V0Q5yh5lZKYMy0a77legzfxWu/KL05Gh8o4o0iYhUvX8Xyv0oN5vr9aLCbdE7TwTT8 /z08cFNtADiRBqFiuUisjslXPbfGjC1eo+d7KZlr28uYYjg9gIm1VH97N+pS6j3Bb701 IzjtbgXEtHvESfifF7fFFpnTx72Ye+PYxGpFcxDMkStDn19Ny80kuECj98ZdlaMQpGPi JYs/XRhBhfoyfVeW76HZ8ygRYwFmPgjEjO6VNaA4YGLFJho1RLVjMuT0Nj8zv/IWfuUR mWR5KP+VI5FsKRoodd0ufxUpopCGRguKuSwo6xpAVHfhi73C4Ck6HUBtuZ6+MDU1gK3y p69w== X-Gm-Message-State: AD7BkJLHRHK44rQ0W0Lm6Rcxg8YaT1miNVCBl1bMlxDYsDzkYo1DojKLOrE6uOuE64y0/A== X-Received: by 10.98.11.92 with SMTP id t89mr995773pfi.5.1457967979589; Mon, 14 Mar 2016 08:06:19 -0700 (PDT) Received: from localhost.localdomain ([183.87.60.98]) by smtp.gmail.com with ESMTPSA id o7sm32915393pfj.89.2016.03.14.08.06.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Mar 2016 08:06:18 -0700 (PDT) From: Pooja Dhannawat To: qemu-devel@nongnu.org Date: Mon, 14 Mar 2016 20:34:10 +0530 Message-Id: <1457967850-8537-1-git-send-email-dhannawatpooja1@gmail.com> X-Mailer: git-send-email 2.5.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22a Subject: [Qemu-devel] [Patch v2 1/1] blizzard: Remove support for DEPTH != 32 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removing support for DEPTH != 32 from blizzard template header and file that includes it, as macro DEPTH == 32 only used. Signed-off-by: Pooja Dhannawat --- hw/display/blizzard.c | 24 ------------------------ hw/display/blizzard_template.h | 30 +----------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index c231960..a72e789 100644 --- a/hw/display/blizzard.c +++ b/hw/display/blizzard.c @@ -925,14 +925,6 @@ static void blizzard_update_display(void *opaque) s->my[1] = 0; } -#define DEPTH 8 -#include "blizzard_template.h" -#define DEPTH 15 -#include "blizzard_template.h" -#define DEPTH 16 -#include "blizzard_template.h" -#define DEPTH 24 -#include "blizzard_template.h" #define DEPTH 32 #include "blizzard_template.h" @@ -956,22 +948,6 @@ void *s1d13745_init(qemu_irq gpio_int) s->line_fn_tab[0] = s->line_fn_tab[1] = g_malloc0(sizeof(blizzard_fn_t) * 0x10); break; - case 8: - s->line_fn_tab[0] = blizzard_draw_fn_8; - s->line_fn_tab[1] = blizzard_draw_fn_r_8; - break; - case 15: - s->line_fn_tab[0] = blizzard_draw_fn_15; - s->line_fn_tab[1] = blizzard_draw_fn_r_15; - break; - case 16: - s->line_fn_tab[0] = blizzard_draw_fn_16; - s->line_fn_tab[1] = blizzard_draw_fn_r_16; - break; - case 24: - s->line_fn_tab[0] = blizzard_draw_fn_24; - s->line_fn_tab[1] = blizzard_draw_fn_r_24; - break; case 32: s->line_fn_tab[0] = blizzard_draw_fn_32; s->line_fn_tab[1] = blizzard_draw_fn_r_32; diff --git a/hw/display/blizzard_template.h b/hw/display/blizzard_template.h index b7ef27c..bc38d7a 100644 --- a/hw/display/blizzard_template.h +++ b/hw/display/blizzard_template.h @@ -19,31 +19,7 @@ */ #define SKIP_PIXEL(to) (to += deststep) -#if DEPTH == 8 -# define PIXEL_TYPE uint8_t -# define COPY_PIXEL(to, from) do { *to = from; SKIP_PIXEL(to); } while (0) -# define COPY_PIXEL1(to, from) (*to++ = from) -#elif DEPTH == 15 || DEPTH == 16 -# define PIXEL_TYPE uint16_t -# define COPY_PIXEL(to, from) do { *to = from; SKIP_PIXEL(to); } while (0) -# define COPY_PIXEL1(to, from) (*to++ = from) -#elif DEPTH == 24 -# define PIXEL_TYPE uint8_t -# define COPY_PIXEL(to, from) \ - do { \ - to[0] = from; \ - to[1] = (from) >> 8; \ - to[2] = (from) >> 16; \ - SKIP_PIXEL(to); \ - } while (0) - -# define COPY_PIXEL1(to, from) \ - do { \ - *to++ = from; \ - *to++ = (from) >> 8; \ - *to++ = (from) >> 16; \ - } while (0) -#elif DEPTH == 32 +#if DEPTH == 32 # define PIXEL_TYPE uint32_t # define COPY_PIXEL(to, from) do { *to = from; SKIP_PIXEL(to); } while (0) # define COPY_PIXEL1(to, from) (*to++ = from) @@ -58,9 +34,6 @@ static void glue(blizzard_draw_line16_, DEPTH)(PIXEL_TYPE *dest, const uint16_t *src, unsigned int width) { -#if !defined(SWAP_WORDS) && DEPTH == 16 - memcpy(dest, src, width); -#else uint16_t data; unsigned int r, g, b; const uint16_t *end = (const void *) src + width; @@ -74,7 +47,6 @@ static void glue(blizzard_draw_line16_, DEPTH)(PIXEL_TYPE *dest, data >>= 5; COPY_PIXEL1(dest, glue(rgb_to_pixel, DEPTH)(r, g, b)); } -#endif } static void glue(blizzard_draw_line24mode1_, DEPTH)(PIXEL_TYPE *dest,