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 <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/22] drm/i915: Shrink per-platform watermark configuration
Date: Thu, 6 Oct 2016 19:50:36 +0300	[thread overview]
Message-ID: <20161006165036.GP4329@intel.com> (raw)
In-Reply-To: <027a88b5-c8e2-8d66-e589-11543893f5dd@linux.intel.com>

On Thu, Oct 06, 2016 at 05:38:12PM +0100, Tvrtko Ursulin wrote:
> 
> On 05/10/2016 18:11, Ville Syrjälä wrote:
> > On Wed, Oct 05, 2016 at 01:33:30PM +0100, Tvrtko Ursulin wrote:
> >> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>
> >> Use types of more appropriate size in struct
> >> intel_watermark_params to save 512 bytes of .rodata.
> >>
> >> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >> ---
> >>   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;
> >>   };
> > This thing has been bugging me since forever. And yet I never sent out a
> > fix. We could probably shrink things furher by tossing out a bunch of
> > the data since it's not all that diverse. But this looks like a decent
> > first step.
> >
> > The other thing that bugs me about these is the defines for the actual
> > values. Makes it just that much harder to figure out what the actual
> > values are. I'm pretty sure I have a branch or two where I kill the
> > defines but naturally I can't find it right now. I'm too lazy to
> > double check the values now with this indirection in place, but your
> > choice of types does look reasonable, so
> >
> > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Thanks.
> 
> Btw we can shave one more kilobyte by similarly shrinking "struct 
> video_levels" and "struct tv_mode". u8/u16 are enough to replace most of 
> the ints there.  If you want to ack that in principle I can include a 
> patch for that in the next round.

Sure, go for it.

-- 
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-06 16:50 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ä
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ä [this message]
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=20161006165036.GP4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox