From patchwork Mon Mar 14 18:07:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pooja Dhannawat X-Patchwork-Id: 8583091 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7286B9F6E1 for ; Mon, 14 Mar 2016 18:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6DEA201FA for ; Mon, 14 Mar 2016 18:09:31 +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 E96E4201BC for ; Mon, 14 Mar 2016 18:09:30 +0000 (UTC) Received: from localhost ([::1]:43202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWvp-0006Bg-Tq for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Mar 2016 14:09:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWvi-0006Ba-HJ for qemu-devel@nongnu.org; Mon, 14 Mar 2016 14:09:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afWvd-0001wP-H4 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 14:09:22 -0400 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:33068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWvd-0001wK-4m for qemu-devel@nongnu.org; Mon, 14 Mar 2016 14:09:17 -0400 Received: by mail-pa0-x243.google.com with SMTP id q6so15308322pav.0 for ; Mon, 14 Mar 2016 11:09:17 -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=H3V+DLi4C42ZDeucyvrLO1OqJwIJ112XQGnkLLhy0H4ofI078FQqCPbamZoyK8GvkR KquG+FCdKad7Jz1g3ZAMt6IkyU7C9raeGPEgnOYwlj3kAUUO17qj1ZDaJ7DKSe45Mt18 WTX/QvSmf8u5K/bq+p5Pk1iHukzs3tPvWlm8wLHrc8EWWvcwYPuj2qPK4toHbNOZPawJ 9bADoZ9fHC2YpFKX8BtnHO4fJQqrbR1LWgiY1Ltn2Gesq2ly1GgtMOWIci+tkfm8Ul00 2J3e0C90P5Uz0pue+71rVgeAdc7PW8LUikhUZvU5RTC/EA7+aPVou2lqKjdRyHWNCYw2 904g== 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=bk/2lnUzkS2+JwVTLrv8Kss9Fku7PNz+ZBH8U5PfpWxMxWQ4b2HB3V5/1zjviP/zfV FjYsu8zOUCyiFpwkMwRDN+cm4+fhWw7ySbS+s3uPJQFHTcPE5XaClJ40KT8O/asHDe08 s1XYryYm/+1wmyMa/fi8qKZ0PldwRn9qvyC+pXRR6KZSfnBBBxFKoy3lOfAde9TKnlfc ItX3+a8mi6FtdUVgtbDSrqElzoGOOcAjsw5vAIkPbTD4it5BGEryo9NrhR/NX7bupjir fUhhoFjob+BZ3YAeMNKsD36YOKOZ1VUXKM1nwSk86Z/nS3iPjoNITQqisKfaWTURAS3E t9gw== X-Gm-Message-State: AD7BkJLScBgirKDk11pozmgP1maZHegfKqpR8tVg8WuhALTwY+ZxIXLvhNfOB+Ms8uyYlw== X-Received: by 10.66.160.231 with SMTP id xn7mr40480787pab.134.1457978956290; Mon, 14 Mar 2016 11:09:16 -0700 (PDT) Received: from localhost.localdomain ([183.87.60.98]) by smtp.gmail.com with ESMTPSA id q26sm33740755pfi.57.2016.03.14.11.09.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Mar 2016 11:09:15 -0700 (PDT) From: Pooja Dhannawat To: qemu-devel@nongnu.org Date: Mon, 14 Mar 2016 23:37:11 +0530 Message-Id: <1457978831-28644-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:c03::243 Subject: [Qemu-devel] [PATCH v3] 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,