From: Matt Roper <matthew.d.roper@intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>
Cc: "Vetter, Daniel" <daniel.vetter@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 00/11]: Color manager framework for I915 driver
Date: Thu, 24 Jul 2014 17:43:59 -0700 [thread overview]
Message-ID: <20140725004358.GE1618@intel.com> (raw)
In-Reply-To: <FF3DDC77922A8A4BB08A3BC48A1EA8CB01753757@BGSMSX101.gar.corp.intel.com>
On Thu, Jul 24, 2014 at 04:08:41AM +0000, Sharma, Shashank wrote:
> Hi Daniel,
> Thanks for your time and comments.
>
> The current design is exactly same as we discussed previously in the mail chain, color manager is just the framework which does this job:
> 1. Create a DRM property for requesting object.
> 2. Attach the DRM property with the object.
I didn't see Daniel's response when I sent my other message, but I had a
lot of the same thoughts that he brought up. I think my previous email
explains one of the concerns here --- properties don't hold values, so
you only need to create a property once total (well, technically once
per DRM device), not once per object.
Once you stop creating duplicate properties, you don't really need the
color manager framework at all. Just find an appropriate driver init
function and create each property once, storing the property pointer
somewhere in dev_priv (or, if these properties can become cross-driver
standard properties, they'd be created once by the DRM core and stored
in drm_device).
> There is no other job done here in the framework, no parsing and nothing else.
> The color manager data structures also just add and array of DRM properties for an object (CRTC/PIPE) and total no of DRM properties.
> So there is nothing which is not required.
>
> Typical sequence of how it works:
> 1. intel CRTC init calls color-manager init for that CRTC, gets a color pointer, which has space to save DRM properties.
> 2. intel CRTC init calls attach color properties, which will register the DRM property, add into the color pointer, and return.
CRTC init can just attach the (already created as described above)
properties to the new CRTC being created. No special color manager
interface calls needed.
> 3. A CRTC set property checks if this is color property, calls color-manager-set-property.
> 4. Color manager set-property calls core set property function, which takes care of calling platform specific set_propety function.
This level of indirection seems unnecessary.
intel_{crtc,plane}->set_property() can just point at functions that just
do:
if (property == dev_priv->foo_property) {
// do foo stuff;
} else if (property == dev_priv->bar_property) {
// do bar stuff;
} else if (property == dev_priv->baz_property) {
// do baz stuff;
} ...
The properties you're adding now as part of the "color manager" will
likely be joined by other, unrelated propeties in the future. There's
no need to isolate "color manager" properties behind another level of
function pointer abstraction.
> 5. Color manager exit gets call from CRTC/plane destroy, and frees the DRM property per CRTC/plane, plus color pointer.
As with init, these can just be moved to the proper crtc/plane tear down
functions; no need to pull them out into separate color manager
functions.
> Can you please point out, which of the above steps is not falling in line for you?
I think Daniel's big point is that the i915 driver has (or will
eventually have) lots of crtc and plane properties that do various
things. You're pulling some of those properties out into a separate
framework that you call "color manager" that simply adds indirection.
But that extra indirection doesn't really add any value; the DRM core,
with its property support, is already all the framework we need.
Matt
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
next prev parent reply other threads:[~2014-07-25 0:42 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 [this message]
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
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=20140725004358.GE1618@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