From patchwork Fri Oct 7 13:34:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9366099 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 0E9B360487 for ; Fri, 7 Oct 2016 13:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0122A295AA for ; Fri, 7 Oct 2016 13:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA4F8295F6; Fri, 7 Oct 2016 13:34:30 +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 A8975295AA for ; Fri, 7 Oct 2016 13:34:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4C2A6EB99; Fri, 7 Oct 2016 13:34:27 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A5DF56E3DC for ; Fri, 7 Oct 2016 13:34:24 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id f193so3026062wmg.2 for ; Fri, 07 Oct 2016 06:34:24 -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=r2rwKS45xWq6MOuMxkn20CEIsWFxZjQsZ3KQr/k8f8o=; b=FM22wnQvRIaHhwRaVVIbHbi66zdsp5IYyU03nRb+uPijlZUsp0fiLHcNA9xD4LVrdz VsRSCh+C1doivLsPIEebIHFDkqnqtqF+bbSahDNoqeWv+wxR21rpGGTTPWoTUdchzuD0 BnTdnccV+tuAb3Bl4ujss+MKaNvQ2/OaKwsMmsfJJ+iNaZz7c3kB7DM8lT1sIoEzOHpI gUMOM6JXPZmhJhmiSdPdJ2avA6YMw+Fuy+Y4UBmEVDtFU91WDrqnQ3a5BQPhW17ccyYl TidcIS9fmK1j7rZxJZtXyZQvk1QGhgYdRhKhkue3L5XhcQRUX7JhGm3lGjCTxgSraIao zCzw== 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=r2rwKS45xWq6MOuMxkn20CEIsWFxZjQsZ3KQr/k8f8o=; b=c0Yo4PAfpz6C2h+rFlABIY1pFNu1R19j9nkbtfpXsJ1wM5DblFZMpU0NTReQ+f+BMw CHIlw44yNouMvPddvPq1EuQGNBEyZ33vVr5jmGGKs83TXhgiWwFfnQgv0s5Nx5mb0Wng Z0eQgg+7FMcSKUy8xruhjVOwzZww8hReMjTTO30tkJTU8TouJF3Zz4C5hHXi3iCKzi+x Ur4EdYqTNXKHWjhXqtIWDWTLt5dpBFnbY/6kHj0CldJVrOibfRxdRbkysG4HFr1GMyOa xCSIr1tX04TdnRqDE5EkOUjReX60yRGK589hhVt0TSoDt/cxSLyEr6c2bRfvxOvEbqZF qylQ== X-Gm-Message-State: AA6/9RkE5f2wmJqKMQeNx+K1ra3S4mk+97w5siA4o+oxQpBQK1GKmntnoFZJW0X1dyh76g== X-Received: by 10.194.206.68 with SMTP id lm4mr16401906wjc.106.1475847263071; Fri, 07 Oct 2016 06:34:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2016 06:34:22 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 7 Oct 2016 14:34:04 +0100 Message-Id: <1475847252-31580-2-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 1/9] 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. v2: All data even fits in u16 for even more saving. (Ville Syrjala) Signed-off-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen --- 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..f618a1c4b9a3 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; + u16 fsb_freq; + u16 mem_freq; + u16 display_sr; + u16 display_hpll_disable; + u16 cursor_sr; + u16 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) {