From patchwork Wed Oct 5 12:33:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9362831 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 1493A6075E for ; Wed, 5 Oct 2016 12:34:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 058262893E for ; Wed, 5 Oct 2016 12:34:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBEBF28942; Wed, 5 Oct 2016 12:34:09 +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 ADBF02893E for ; Wed, 5 Oct 2016 12:34:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 896CF6E82F; Wed, 5 Oct 2016 12:34:04 +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 6A64E6E24C for ; Wed, 5 Oct 2016 12:34:03 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id b184so24370024wma.3 for ; Wed, 05 Oct 2016 05:34:03 -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=aIujlcNKY+4uAMTIU24Ic5zV8XF42SKCI2DJR/vYbRg=; b=rJaOwYe3u+Zeqru5cHODbHwrzYj+jUgNp1nbZIwcPqNM/aJdXRLtyJTq+MN3at5Tmo +iXOJwplA0ZE9G5pFKTyYYAN7ZT1k8KFr2tjVZMnq8WfN3mlHcPbzylfJ/1YGz1SAEDc 0xKYnWCUr5+GggV84dDSOgzfstLXQpTaO/Qvea+3OGg2+xQKrd5OQmyQ+dhjS6uPR4g7 ZmjT+n1g2xGIivntTgbGLU/dvK/GBoPif1hiknXVB7qV2jirDedueQ1FJckUByI3gGNn 5xnM+O/S+WZlCHKyvxoLWRfaIhgotu7xbqw3/eCe5VlBSOl44O4YqM5rCqgz19+vyunh y2yw== 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=aIujlcNKY+4uAMTIU24Ic5zV8XF42SKCI2DJR/vYbRg=; b=nIizGyuvMivIlLflrkU0P5emUPOXeUMhd+u7GeJ0JMvOTl4YNQwZbKmPtdwFevnYz+ GaYb/ZG6zDKR6shu1z30qRsX1ry06k/MuB1iMgsCUV27SA4j3SQY10wb7gM1Dfr7nEwK SdLk30lDMo4UcC59Le2yAsCQVoQHohcCHeToFxrqyv5BKpvtImNHjKPUgwFyYVm3xgiv zD6XDNLplQ9CdiOvj5youRblR1xfJ2ibjTaX+HRzt/ltBa6miJoqVufwDTYNPI/3PMm8 A8sxR0kWk3V0LVSJ4weFk6mgaFpI9NV2G/PIc5ajBmnHQ9OZbb8fgPY5x4BdxDfMnxki oWcg== X-Gm-Message-State: AA6/9RkzKJcxTXVQeGqIuQHFEkz4HUBeMoShgFlPkxLio9WBCQH0FvV2IJ49lV3hxnk/tQ== X-Received: by 10.28.145.65 with SMTP id t62mr8325551wmd.49.1475670841820; Wed, 05 Oct 2016 05:34:01 -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.34.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 05:34:01 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 5 Oct 2016 13:33:30 +0100 Message-Id: <1475670829-14025-4-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 03/22] drm/i915: Shrink per-platform watermark configuration 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 Use types of more appropriate size in struct intel_watermark_params to save 512 bytes of .rodata. Signed-off-by: Tvrtko Ursulin Acked-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_drv.h | 10 +++++----- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index c52b1d3a7ba0..59a73f8ca7af 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -799,11 +799,11 @@ struct intel_plane { }; struct intel_watermark_params { - unsigned long fifo_size; - unsigned long max_wm; - unsigned long default_wm; - unsigned long guard_size; - unsigned long cacheline_size; + u16 fifo_size; + u16 max_wm; + u8 default_wm; + u8 guard_size; + u8 cacheline_size; }; struct cxsr_latency { diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3b1f0b40ccb9..96d0c57c816c 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -775,13 +775,13 @@ static bool g4x_check_srwm(struct drm_device *dev, display_wm, cursor_wm); if (display_wm > display->max_wm) { - DRM_DEBUG_KMS("display watermark is too large(%d/%ld), disabling\n", + DRM_DEBUG_KMS("display watermark is too large(%d/%u), disabling\n", display_wm, display->max_wm); return false; } if (cursor_wm > cursor->max_wm) { - DRM_DEBUG_KMS("cursor watermark is too large(%d/%ld), disabling\n", + DRM_DEBUG_KMS("cursor watermark is too large(%d/%u), disabling\n", cursor_wm, cursor->max_wm); return false; }