From patchwork Wed Oct 5 12:33:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9362829 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 5455D6075E for ; Wed, 5 Oct 2016 12:34:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 446CF2893E for ; Wed, 5 Oct 2016 12:34:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36DDC28942; Wed, 5 Oct 2016 12:34:08 +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 E9E852893E for ; Wed, 5 Oct 2016 12:34:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EF956E833; Wed, 5 Oct 2016 12:34:03 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id CFDD46E24C for ; Wed, 5 Oct 2016 12:34:01 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id f193so19744436wmg.2 for ; Wed, 05 Oct 2016 05:34:01 -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=5B39Q/CfGaiAEHBV6TYN3nK4eqkGg5/TpKytwP5OPjE=; b=AQOMXgRvA2VcB4E4OR5uyi7/9biL6fJtA4x9zSTq7+yzrH/xufVA6B2VJn/qKftDbD 8oDROB2Ntox2+2r3z5OweYLdoLBDtR8TC0oMPUSbebI0get3yax5aqgvhcBY8ECSjhwd A4DuUyD70zRdtq4RuQr74EjZL4LZAHWx0Jtzkc0xEBqHeN01PFLt9m1BTLs5HwkHD/t2 piXcvNzF/M9Y57My6Qb+SkcXRDEUYqMgUrdoPlxTHJG1gYUgG6u+ktXeqRkIT4oCRjmZ YcjYxTNcJVix/oz2JgzwNtngseKG06sT5VcU3UV6F8wDeZ3Lnon7wRzfQMukbMZvwB5v AZ4g== 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=5B39Q/CfGaiAEHBV6TYN3nK4eqkGg5/TpKytwP5OPjE=; b=ldllAYAb080cHlWZe2F88oRdDSZnWL5+OXjMUDIxBo6jiLKtLoMgKDHUKCNXdyZLaZ wVldjTBUH17O6Y1KqFmr3e0LoU0Gb7aaE7zCp1KB2xrqgN6VwrsZld6iTDZ5qefHcBYi f3Cl87wJrh+SJw8wnTXK2BWitnFG2mvcQFpGGUGDKavHh3ur7wkShJH4qk9Xf0LRtpeP 9qktM48qFthlH7sxUbGufm0bGuqLxDN367NrseTlqMigU09I6y2+bsT2FyM9nafqpLtK LH+5+G0MHdsqa55fC//ZGR03+xwzrNglQQ5sBIZAV3u5OPxr81EHGEvAVMrcXvoRQTZr 9yrg== X-Gm-Message-State: AA6/9RkyITunr8a8sRmKxkg3MquY51GRH96iD5mmauufqAAC4LW1+B8eXBl4O3SGB+ZHrQ== X-Received: by 10.194.58.81 with SMTP id o17mr7382431wjq.227.1475670840396; Wed, 05 Oct 2016 05:34:00 -0700 (PDT) Received: from e31.Home ([2a02:c7d:9b6d:e300:916a:6cab:ac67:71c2]) by smtp.gmail.com with ESMTPSA id t138sm29428317wmt.5.2016.10.05.05.33.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 05:33:59 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 5 Oct 2016 13:33:28 +0100 Message-Id: <1475670829-14025-2-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475670829-14025-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1475670829-14025-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 01/22] drm/i915: Shrink cxsr_latency_table 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 unsigned long is too wide - use smaller types in struct cxsr_latency to save 800-something bytes of .rodata. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/intel_drv.h | 16 ++++++++-------- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index f48e79ae2ac6..c52b1d3a7ba0 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -807,14 +807,14 @@ struct intel_watermark_params { }; struct cxsr_latency { - int is_desktop; - int is_ddr3; - unsigned long fsb_freq; - unsigned long mem_freq; - unsigned long display_sr; - unsigned long display_hpll_disable; - unsigned long cursor_sr; - unsigned long cursor_hpll_disable; + bool is_desktop : 1; + bool is_ddr3 : 1; + unsigned int fsb_freq; + unsigned int mem_freq; + unsigned int display_sr; + unsigned int display_hpll_disable; + unsigned int cursor_sr; + unsigned int cursor_hpll_disable; }; #define to_intel_atomic_state(x) container_of(x, struct intel_atomic_state, base) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 7f1748a1e614..3b1f0b40ccb9 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -252,8 +252,8 @@ static const struct cxsr_latency cxsr_latency_table[] = { {0, 1, 400, 800, 6042, 36042, 6584, 36584}, /* DDR3-800 SC */ }; -static const struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, - int is_ddr3, +static const struct cxsr_latency *intel_get_cxsr_latency(bool is_desktop, + bool is_ddr3, int fsb, int mem) {