From patchwork Wed Mar 14 16:31:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 10282677 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 CFF98602BD for ; Wed, 14 Mar 2018 16:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0F6E28475 for ; Wed, 14 Mar 2018 16:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5A1F28478; Wed, 14 Mar 2018 16:32: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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 3EDED28475 for ; Wed, 14 Mar 2018 16:32:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EAF96E722; Wed, 14 Mar 2018 16:32:08 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id A11676E722 for ; Wed, 14 Mar 2018 16:32:07 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 09:32:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,471,1515484800"; d="scan'208";a="182735250" Received: from ldmartin-desk.jf.intel.com (HELO ldmartin-desk.amr.corp.intel.com) ([10.24.10.217]) by orsmga004.jf.intel.com with ESMTP; 14 Mar 2018 09:32:06 -0700 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org Date: Wed, 14 Mar 2018 09:31:32 -0700 Message-Id: <20180314163132.4130-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [Intel-gfx] [PATCH] drm/i915: Remove hole and padding from intel_shared_dpll X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucas De Marchi MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Reorder fields so we save 8 bytes per instance: this removes a 4-bytes hole after enum intel_dpll_id and a 4-bytes padding. Signed-off-by: Lucas De Marchi --- Is this something desirable? I happened to be looking at intel_shared_dpll and noticed the hole. I haven't checked any other struct yet, but there are probably more and more important ones. This one saves only 8 * I915_NUM_PLLS. drivers/gpu/drm/i915/intel_dpll_mgr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.h b/drivers/gpu/drm/i915/intel_dpll_mgr.h index f24ccf443d25..9635522dcb32 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.h +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.h @@ -238,11 +238,6 @@ struct intel_shared_dpll { */ enum intel_dpll_id id; - /** - * @funcs: platform specific hooks - */ - struct intel_shared_dpll_funcs funcs; - #define INTEL_DPLL_ALWAYS_ON (1 << 0) /** * @flags: @@ -252,6 +247,11 @@ struct intel_shared_dpll { * not in use by any CRTC. */ uint32_t flags; + + /** + * @funcs: platform specific hooks + */ + struct intel_shared_dpll_funcs funcs; }; #define SKL_DPLL0 0