public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/22] drm/i915: Shrink cxsr_latency_table
Date: Wed, 5 Oct 2016 20:01:50 +0300	[thread overview]
Message-ID: <20161005170150.GE4329@intel.com> (raw)
In-Reply-To: <1475670829-14025-2-git-send-email-tvrtko.ursulin@linux.intel.com>

On Wed, Oct 05, 2016 at 01:33:28PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> unsigned long is too wide - use smaller types in
> struct cxsr_latency to save 800-something bytes of .rodata.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  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..c52b1d3a7ba0 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;
> +	unsigned int fsb_freq;
> +	unsigned int mem_freq;
> +	unsigned int display_sr;
> +	unsigned int display_hpll_disable;
> +	unsigned int cursor_sr;
> +	unsigned int cursor_hpll_disable;

Am I blind or would all of the values fit even in u16?

>  };
>  
>  #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)
>  {
> -- 
> 2.7.4
> 
> _______________________________________________
> 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

  reply	other threads:[~2016-10-05 17:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 12:33 [PATCH 00/22] .rodata diet Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 01/22] drm/i915: Shrink cxsr_latency_table Tvrtko Ursulin
2016-10-05 17:01   ` Ville Syrjälä [this message]
2016-10-06  7:35     ` Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 02/22] drm/i915: Shrink sdvo_cmd_names Tvrtko Ursulin
2016-10-13 14:03   ` Daniel Vetter
2016-10-05 12:33 ` [PATCH 03/22] drm/i915: Shrink per-platform watermark configuration Tvrtko Ursulin
2016-10-05 15:07   ` Joonas Lahtinen
2016-10-05 16:50     ` Tvrtko Ursulin
2016-10-05 16:53       ` Tvrtko Ursulin
2016-10-06  6:58         ` Joonas Lahtinen
2016-10-06  7:37           ` Tvrtko Ursulin
2016-10-07  7:09             ` Joonas Lahtinen
2016-10-05 17:11   ` Ville Syrjälä
2016-10-06 16:38     ` Tvrtko Ursulin
2016-10-06 16:50       ` Ville Syrjälä
2016-10-05 12:33 ` [PATCH 04/22] drm/i915: Make HAS_DDI and HAS_PCH_LPT_LP only take dev_priv Tvrtko Ursulin
2016-10-05 17:16   ` Ville Syrjälä
2016-10-06  7:39     ` Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 05/22] drm/i915: Make INTEL_PCH_TYPE & co " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 06/22] drm/i915: Make HAS_GMCH_DISPLAY " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 07/22] drm/i915: Make HAS_RUNTIME_PM " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 08/22] drm/i915: Do not use INTEL_INFO(dev_priv)->ring_mask inside WARNs Tvrtko Ursulin
2016-10-05 14:01   ` Joonas Lahtinen
2016-10-05 12:33 ` [PATCH 09/22] drm/i915: Make IS_GEN-range macro only take dev_priv Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 10/22] drm/i915: Make INTEL_DEVID " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 11/22] drm/i915: Make IS_IVYBRIDGE " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 12/22] drm/i915: Make IS_BROADWELL " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 13/22] drm/i915: Make IS_HASWELL " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 14/22] drm/i915: Make IS_KABYLAKE " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 15/22] drm/i915: Make IS_SKYLAKE " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 16/22] drm/i915: Make IS_BROXTON " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 17/22] drm/i915: Make HAS_L3_DPF " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 18/22] drm/i915: Make IS_G4X " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 19/22] drm/i915: Make IS_CHERRYVIEW " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 20/22] drm/i915: Make IS_VALLEYVIEW " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 21/22] drm/i915: Make INTEL_GEN " Tvrtko Ursulin
2016-10-05 12:33 ` [PATCH 22/22] drm/i915: Make IS_GEN macros " Tvrtko Ursulin
2016-10-05 13:01 ` [PATCH 00/22] .rodata diet Jani Nikula
2016-10-05 13:39   ` Tvrtko Ursulin
2016-10-05 13:54     ` Chris Wilson
2016-10-11 13:06   ` Daniel Vetter
2016-10-05 14:49 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-10-11 12:17 ` [PATCH 00/22] " David Weinehall
2016-10-11 13:15   ` Tvrtko Ursulin

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=20161005170150.GE4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    /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