From: Matt Roper <matthew.d.roper@intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>
Cc: intel-gfx@lists.freedesktop.org, daniel.vetter@intel.com
Subject: Re: [PATCH 1/4] drm/i915: Color manager framework for valleyview
Date: Wed, 10 Sep 2014 14:17:02 -0700 [thread overview]
Message-ID: <20140910211702.GH26681@intel.com> (raw)
In-Reply-To: <54103418.7050305@intel.com>
On Wed, Sep 10, 2014 at 04:50:56PM +0530, Sharma, Shashank wrote:
...
> >>+
> >>+/* Properties */
> >>+enum clrmgr_tweaks {
> >>+ csc = 0,
> >>+ gamma,
> >>+ contrast,
> >>+ brightness,
> >>+ hue_saturation,
> >>+ clrmgr_tweak_invalid
> >>+};
> >
> >These are just enums into your property name array, right? I'm not
> >sure if we need these either.
> >
> >
> Actually my plan was like this:
> One enum(like this), which assigns color property id to each property.
> Arrays, arranged in order of this enum for sizes, name and
> init_values of these properties. So it would be easy to access, easy
> to plug in new property, and less hard coding.
> +/* Properties */
> enum clrmgr_tweaks {
> csc = 0,
> gamma,
> contrast,
> brightness,
> hue_saturation,
> clrmgr_tweak_invalid
> };
>
> array color_prop_sizes{size_csc, size_gamma, size_cont, size_bright};
> array color_prop_name{"csc", "gamma", "cont", "bright"};
> array init_values{{9 init values for CSC} {129 init values for
> gamma} {1 default value of contrast} {1 default val for brightness}}
>
> Does it look that bad :) ?
Okay, I think I see what you were going for, but I'm still not convinced
that pulling these values out into separate arrays is more clear at the
moment. You still have to make sure your arrays stay in sync and if
there's any control flow (e.g., some properties are only relevant on
certain platforms), then that gets more complicated as well.
I'd suggest not using the arrays for now while we only have a handful of
properties. Once we have a large list of properties in the driver maybe
we can revisit whether there's a nicer way to stick them in a table and
simplify the code.
Matt
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
next prev parent reply other threads:[~2014-09-10 21:15 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 18:04 [PATCH 00/11]: Color manager framework for I915 driver shashank.sharma
2014-07-23 18:04 ` [PATCH 01/11] drm/i915: Color manager framework for valleyview shashank.sharma
2014-07-23 18:04 ` [PATCH 02/11] drm/i915: Register pipe level color properties shashank.sharma
2014-07-25 0:02 ` Matt Roper
2014-07-23 18:04 ` [PATCH 03/11] drm/i915: Register plane " shashank.sharma
2014-07-23 18:04 ` [PATCH 04/11] drm/i915: Add color manager CSC correction shashank.sharma
2014-07-23 18:04 ` [PATCH 05/11] drm/i915: Add color manager gamma correction shashank.sharma
2014-07-23 18:05 ` [PATCH 06/11] drm/i915: Add contrast and brightness correction shashank.sharma
2014-07-23 18:05 ` [PATCH 07/11] drm/i915: Add hue and saturation correction shashank.sharma
2014-07-23 18:05 ` [PATCH 08/11] drm/i915: Add CRTC set property functions shashank.sharma
2014-07-23 18:05 ` [PATCH 09/11] drm/i915: Add set plane " shashank.sharma
2014-07-23 18:05 ` [PATCH 10/11] drm/i915: Plug-in color manager init shashank.sharma
2014-07-23 18:05 ` [PATCH 11/11] drm/i915: Plug-in color manager exit shashank.sharma
2014-07-23 18:34 ` [PATCH 00/11]: Color manager framework for I915 driver Daniel Vetter
2014-07-24 4:08 ` Sharma, Shashank
2014-07-25 0:43 ` Matt Roper
2014-07-25 4:36 ` Sharma, Shashank
2014-07-26 1:58 ` Matt Roper
2014-07-28 4:57 ` Sharma, Shashank
2014-09-09 6:23 ` [PATCH 0/4] Color manager framework shashank.sharma
2014-09-09 6:23 ` [PATCH 1/4] drm/i915: Color manager framework for valleyview shashank.sharma
2014-09-09 22:51 ` Bob Paauwe
2014-09-10 8:40 ` Sharma, Shashank
2014-09-10 16:25 ` Bob Paauwe
2014-09-10 1:29 ` Matt Roper
2014-09-10 11:20 ` Sharma, Shashank
2014-09-10 21:17 ` Matt Roper [this message]
2014-09-11 7:52 ` Daniel Vetter
2014-09-09 6:23 ` [PATCH 2/4] drm/i915: Plug-in color manager attach shashank.sharma
2014-09-10 1:29 ` Matt Roper
2014-09-10 11:52 ` Sharma, Shashank
2014-09-09 6:23 ` [PATCH 3/4] drm/i915: CSC color correction shashank.sharma
2014-09-09 22:51 ` Bob Paauwe
2014-09-10 8:55 ` Sharma, Shashank
2014-09-10 16:03 ` Bob Paauwe
2014-09-10 1:30 ` Matt Roper
2014-09-10 6:40 ` Daniel Vetter
2014-09-10 12:05 ` Sharma, Shashank
2014-09-10 12:13 ` Daniel Vetter
2014-09-10 22:17 ` Matt Roper
2014-09-11 7:53 ` Daniel Vetter
2014-09-09 6:23 ` [PATCH 4/4] drm/i915: Add set_protpery function shashank.sharma
2014-09-10 1:28 ` [PATCH 0/4] Color manager framework Matt Roper
2014-09-10 11:08 ` Sharma, Shashank
2014-09-10 18:15 ` Matt Roper
2014-09-11 7:56 ` Daniel Vetter
2014-09-11 8:18 ` Sharma, Shashank
2014-09-11 8:49 ` Daniel Vetter
2014-09-11 9:23 ` Ville Syrjälä
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=20140910211702.GH26681@intel.com \
--to=matthew.d.roper@intel.com \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shashank.sharma@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