public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH] drm/i915: Remove hole and padding from intel_shared_dpll
Date: Wed, 14 Mar 2018 09:31:32 -0700	[thread overview]
Message-ID: <20180314163132.4130-1-lucas.demarchi@intel.com> (raw)

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 <lucas.demarchi@intel.com>
---

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
-- 
2.14.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2018-03-14 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 16:31 Lucas De Marchi [this message]
2018-03-14 17:06 ` ✓ Fi.CI.BAT: success for drm/i915: Remove hole and padding from intel_shared_dpll Patchwork
2018-03-14 17:19 ` [PATCH] " Ville Syrjälä
2018-03-15  8:01   ` Lucas De Marchi
2018-03-15  9:54     ` Ville Syrjälä
2018-03-15 18:07       ` Lucas De Marchi
2018-03-15 18:12         ` Ville Syrjälä
2018-03-15  1:03 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-03-15 11:16 ` [PATCH] " Jani Nikula
2018-03-15 18:02   ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180314163132.4130-1-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox