From patchwork Fri Oct 7 13:34:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9366111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B2B760487 for ; Fri, 7 Oct 2016 13:34:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D0EC295AA for ; Fri, 7 Oct 2016 13:34:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61C3F295F6; Fri, 7 Oct 2016 13:34:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8CF7295AA for ; Fri, 7 Oct 2016 13:34:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47A306EB9A; Fri, 7 Oct 2016 13:34:37 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEE5B6E3DC for ; Fri, 7 Oct 2016 13:34:26 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id b201so3031721wmb.1 for ; Fri, 07 Oct 2016 06:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jZ7V3ZyfvI2ZXT6wCTIN0Me3J5p0uEm6kZ9CSAK701A=; b=SSYPgwPDlv2f6oLy2DYJeVJxJX7zg78DoNkiwleHRvcRI3zDNDJ82+6KXkXUzp5ISv iIN4b4WNx/jVCzZsM5dLOefchkFt3cZunn76elREGvjZUkt4JaSojFGrSntxv9Yrsa2q JUxkChAzWlOZ9Ue5lUroCSH1IvabG9IgfhyLPMckhuK2sGKBNGOpYMcjQ2dfEL37bvUN di0Cu5bLQlDnxI/raSUox9fS+hnFZna139S8kaJhda4Y+jHyiS0ZPBCjdm+UhNz/BcBb hOXeBzw4UN3hI3Nj4hMHkgyfIryuTG1S110GPK3E5gRgCwl21cGkCwRCB4+oGo5tKPTy FnfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jZ7V3ZyfvI2ZXT6wCTIN0Me3J5p0uEm6kZ9CSAK701A=; b=GqFIMEM/ab0fy1Mt5DVsIW7h5YvQ41xy8WeeAIxwWQ7WN9DDpeWPxSuWNSk4KVhBSh 5wGzrJktVv5MzftdH9wvvZEp7ujHW0qnQRVgQntcvYItwtChxz40cBe7nt5pcrTtaWr4 PsVeEswmgwRLW8J2QGTLVNN2TYgkCNzbJptCNqLO5cTItX7n5uvKnd5T9FTOJOMK2+VC C7bsKFXMmKVWrcmZAPvnDjK4GpLJzqKwiYcZr/n1N0xxclzaI6iweDTCmFZwPhttUUZZ gkCAbg1i6+9JaqMsl9ugPH3vQD+5xgTUUplhejBu1ApqgfxGQUI8RLgsfH/yJKTryrSs cRJQ== X-Gm-Message-State: AA6/9RlXDKmbDSEHDmk8ilXryXZqSa/BeZK71jC0mRk3+3YEtHTtmdYbndwW/9dEiRzECA== X-Received: by 10.194.68.106 with SMTP id v10mr17239399wjt.149.1475847265165; Fri, 07 Oct 2016 06:34:25 -0700 (PDT) Received: from localhost.localdomain ([2a02:c7d:9b6d:e300:916a:6cab:ac67:71c2]) by smtp.gmail.com with ESMTPSA id pj2sm19795081wjb.8.2016.10.07.06.34.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2016 06:34:24 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 7 Oct 2016 14:34:07 +0100 Message-Id: <1475847252-31580-5-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475847252-31580-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1475847252-31580-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 4/9] drm/i915: Shrink TV modes const data X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Make struct video_levels and struct tv_mode use data types of sufficient width to save approximately one kilobyte in the .rodata section. Signed-off-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_tv.c | 50 ++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 3988c45f9e5f..fd4d59341897 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -86,7 +86,8 @@ struct intel_tv { }; struct video_levels { - int blank, black, burst; + u16 blank, black; + u8 burst; }; struct color_conversion { @@ -339,34 +340,43 @@ static const struct video_levels component_levels = { struct tv_mode { const char *name; - int clock; - int refresh; /* in millihertz (for precision) */ - u32 oversample; - int hsync_end, hblank_start, hblank_end, htotal; - bool progressive, trilevel_sync, component_only; - int vsync_start_f1, vsync_start_f2, vsync_len; - bool veq_ena; - int veq_start_f1, veq_start_f2, veq_len; - int vi_end_f1, vi_end_f2, nbr_end; - bool burst_ena; - int hburst_start, hburst_len; - int vburst_start_f1, vburst_end_f1; - int vburst_start_f2, vburst_end_f2; - int vburst_start_f3, vburst_end_f3; - int vburst_start_f4, vburst_end_f4; + + u32 clock; + u16 refresh; /* in millihertz (for precision) */ + u32 oversample; + u8 hsync_end; + u16 hblank_start, hblank_end, htotal; + bool progressive : 1, trilevel_sync : 1, component_only : 1; + u8 vsync_start_f1, vsync_start_f2, vsync_len; + bool veq_ena : 1; + u8 veq_start_f1, veq_start_f2, veq_len; + u8 vi_end_f1, vi_end_f2; + u16 nbr_end; + bool burst_ena : 1; + u8 hburst_start, hburst_len; + u8 vburst_start_f1; + u16 vburst_end_f1; + u8 vburst_start_f2; + u16 vburst_end_f2; + u8 vburst_start_f3; + u16 vburst_end_f3; + u8 vburst_start_f4; + u16 vburst_end_f4; /* * subcarrier programming */ - int dda2_size, dda3_size, dda1_inc, dda2_inc, dda3_inc; - u32 sc_reset; - bool pal_burst; + u16 dda2_size, dda3_size; + u8 dda1_inc; + u16 dda2_inc, dda3_inc; + u32 sc_reset; + bool pal_burst : 1; /* * blank/black levels */ const struct video_levels *composite_levels, *svideo_levels; const struct color_conversion *composite_color, *svideo_color; const u32 *filter_table; - int max_srcw; + u16 max_srcw; };