From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/9] drm/i915: Shrink TV modes const data
Date: Mon, 10 Oct 2016 09:38:38 +0100 [thread overview]
Message-ID: <2ce65417-2b0d-6447-5431-85426e01fb18@linux.intel.com> (raw)
In-Reply-To: <87d1j8wve0.fsf@intel.com>
On 10/10/2016 07:49, Jani Nikula wrote:
> On Fri, 07 Oct 2016, Tvrtko Ursulin <tursulin@ursulin.net> wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Make struct video_levels and struct tv_mode use data types
>> of sufficient width to save approximately one kilobyte in
>> the .rodata section.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_tv.c | 50 ++++++++++++++++++++++++-----------------
>> 1 file changed, 30 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
>> index 3988c45f9e5f..fd4d59341897 100644
>> --- a/drivers/gpu/drm/i915/intel_tv.c
>> +++ b/drivers/gpu/drm/i915/intel_tv.c
>> @@ -86,7 +86,8 @@ struct intel_tv {
>> };
>>
>> struct video_levels {
>> - int blank, black, burst;
>> + u16 blank, black;
>> + u8 burst;
>> };
>>
>> struct color_conversion {
>> @@ -339,34 +340,43 @@ static const struct video_levels component_levels = {
>>
>> struct tv_mode {
>> const char *name;
>> - int clock;
>> - int refresh; /* in millihertz (for precision) */
>> - u32 oversample;
>> - int hsync_end, hblank_start, hblank_end, htotal;
>> - bool progressive, trilevel_sync, component_only;
>> - int vsync_start_f1, vsync_start_f2, vsync_len;
>> - bool veq_ena;
>> - int veq_start_f1, veq_start_f2, veq_len;
>> - int vi_end_f1, vi_end_f2, nbr_end;
>> - bool burst_ena;
>> - int hburst_start, hburst_len;
>> - int vburst_start_f1, vburst_end_f1;
>> - int vburst_start_f2, vburst_end_f2;
>> - int vburst_start_f3, vburst_end_f3;
>> - int vburst_start_f4, vburst_end_f4;
>> +
>> + u32 clock;
>> + u16 refresh; /* in millihertz (for precision) */
>> + u32 oversample;
>> + u8 hsync_end;
>> + u16 hblank_start, hblank_end, htotal;
>> + bool progressive : 1, trilevel_sync : 1, component_only : 1;
>> + u8 vsync_start_f1, vsync_start_f2, vsync_len;
>> + bool veq_ena : 1;
>> + u8 veq_start_f1, veq_start_f2, veq_len;
>> + u8 vi_end_f1, vi_end_f2;
>> + u16 nbr_end;
>> + bool burst_ena : 1;
>> + u8 hburst_start, hburst_len;
>> + u8 vburst_start_f1;
>> + u16 vburst_end_f1;
>> + u8 vburst_start_f2;
>> + u16 vburst_end_f2;
>> + u8 vburst_start_f3;
>> + u16 vburst_end_f3;
>> + u8 vburst_start_f4;
>> + u16 vburst_end_f4;
> Not convinced about the indentation change.
I found it much more readable like that in this case. I still do, but
thinking about it more, maybe it is just because my editor does no
syntax highlighting for u32 types. I need to fix that.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-10 8:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 13:34 [PATCH 0/9] .rodata diet 2 (non-disruptive version) Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 1/9] drm/i915: Shrink cxsr_latency_table Tvrtko Ursulin
2016-10-10 7:15 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 2/9] drm/i915: Shrink sdvo_cmd_names Tvrtko Ursulin
2016-10-10 7:16 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 3/9] drm/i915: Shrink per-platform watermark configuration Tvrtko Ursulin
2016-10-10 7:17 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 4/9] drm/i915: Shrink TV modes const data Tvrtko Ursulin
2016-10-10 6:49 ` Jani Nikula
2016-10-10 8:38 ` Tvrtko Ursulin [this message]
2016-10-10 7:22 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 5/9] drm/i915: Use unsigned int for latencies Tvrtko Ursulin
2016-10-10 7:24 ` Joonas Lahtinen
2016-10-10 8:34 ` Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 6/9] drm/i915: unsigned int is enough for crtc clock Tvrtko Ursulin
2016-10-10 7:25 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 7/9] drm/i915: Convert get_fifo_size return from int to unsigned int Tvrtko Ursulin
2016-10-10 7:46 ` Joonas Lahtinen
2016-10-07 13:34 ` [PATCH 8/9] drm/i915: Make intel_calculate_wm return " Tvrtko Ursulin
2016-10-10 8:02 ` Joonas Lahtinen
2016-10-10 8:33 ` Tvrtko Ursulin
2016-10-07 13:34 ` [PATCH 9/9] drm/i915: Tidy watermark computation local types Tvrtko Ursulin
2016-10-07 13:48 ` Ville Syrjälä
2016-10-07 14:51 ` Tvrtko Ursulin
2016-10-07 15:16 ` Ville Syrjälä
2016-10-10 8:06 ` Joonas Lahtinen
2016-10-10 8:19 ` ✗ Fi.CI.BAT: warning for .rodata diet 2 (non-disruptive version) Patchwork
2016-10-10 8:27 ` ✗ Fi.CI.BAT: failure " Patchwork
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=2ce65417-2b0d-6447-5431-85426e01fb18@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--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 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.