All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Remove hole and padding from intel_shared_dpll
Date: Wed, 14 Mar 2018 19:19:18 +0200	[thread overview]
Message-ID: <20180314171918.GM5453@intel.com> (raw)
In-Reply-To: <20180314163132.4130-1-lucas.demarchi@intel.com>

On Wed, Mar 14, 2018 at 09:31:32AM -0700, Lucas De Marchi wrote:
> 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;

Why do we need to copy the entire thing here anyway? Can't we just
make this a pointer?

>  };
>  
>  #define SKL_DPLL0 0
> -- 
> 2.14.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-03-14 17:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 16:31 [PATCH] drm/i915: Remove hole and padding from intel_shared_dpll Lucas De Marchi
2018-03-14 17:06 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-03-14 17:19 ` Ville Syrjälä [this message]
2018-03-15  8:01   ` [PATCH] " 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=20180314171918.GM5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.