All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Shankar, Uma" <uma.shankar@intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/6] Intel Color Manager Framework
Date: Fri, 21 Feb 2014 11:17:06 +0200	[thread overview]
Message-ID: <20140221091706.GJ3852@intel.com> (raw)
In-Reply-To: <FF3DDC77922A8A4BB08A3BC48A1EA8CB016585C9@BGSMSX101.gar.corp.intel.com>

On Fri, Feb 21, 2014 at 03:34:43AM +0000, Sharma, Shashank wrote:
> Hi Ville/All,
> 
> We gave a presentation on design on this framework, few months ago, in one of our common forum with OTC folks. 
> We  discussed, took review comments, and re-designed the framework, as per the feedbacks. 

Apparently I wasn't there. And in any case it would be better to discuss
it on dri-devel where people outside Intel can give their opinion.

> 
> We also discussed the benefits of providing the controls directly from /sysfs over going for a UI manager based property settings.
> So I don't understand where are we going wrong, can you please elaborate a bit ? 

The most important issue from my POV is that it can't be part of the
atomic modeset.

Another issue is that it make the whole API inconsistent. Some stuff
through ioctl, some stuff through sysfs, some stuff through whatever the
next guy thinks of. It's not pretty. I've worked in the past with a
driver where I had to poke at various standardish ioctls, custom ioctls,
and sysfs to make it do anything useful, and I have no interest in
repeating that experience. sysfs is especially painful since you have
do the string<->binary conversions all over the place, and also you
en up doing open+read/write+close cycles for every little thing.

It also adds more entrypoints into the driver for us to worry about.
That means extra worries about the power management stuff and locking
at the very least.

Also the rules of sysfs say "one item per file". The only allowed
exception to this rule I know of is hardware provided blobs (like
EDID, PCI ROM etc.). Your current implementation breaks this rule
blatantly.

> 
> This is just a basic design, and once go ahead with this, we can always work on making hardware agnostic, as you recommended.  
> 
> IMHO, controls from /sysfs would be a very generic interface for all linux/drm based platform, where any userspace can read/write and control properties. 
> We don't even need a UI manager or a minimum executable to play around, just a small script can do. But we can always write something on top of this,
> to be included in any UI framework or property.

If there's a real need to get at properties through sysfs, then we could
think about exposing them all. But that may presents some issues where
the current master suddenly gets confused about its state since someone
else went behind its back and changed a bunch of stuff.

>  
> Regards
> Shashank    
> 
> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] 
> Sent: Thursday, February 20, 2014 6:41 PM
> To: Sharma, Shashank
> Cc: intel-gfx@lists.freedesktop.org; Shankar, Uma; dri-devel@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 0/6] Intel Color Manager Framework
> 
> On Thu, Feb 20, 2014 at 06:07:21PM +0530, Shashank Sharma wrote:
> > Color manager is a new framework in i915 driver, which provides a 
> > unified interface for various color correction methods supported by 
> > intel hardwares. The high level overview of this change is:
> 
> Would have been good to discuss this idea before implementing it. The plan is to use kms properties for this kind of stuff which allows us to hook it up with the upcoming atomic modeset API. Just yesterday there was some discussion on #dri-devel about exposing user settable blob properties even before the atomic modeset API lands (it was always the plan for the atomic modeset API anyway). So based on a cursory glance, this looks like it's going in the wrong direction.
> 
> Also ideally the properties should be hardware agnostic, so a generic userspace could use them regardless of the hardware/driver. Obviously that might not be possible in all cases, but we should at least spend a bit of effort on trying to make that happen for most properties.
> 
> --
> Ville Syrjälä
> Intel OTC

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-02-21  9:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 12:37 [PATCH 0/6] Intel Color Manager Framework Shashank Sharma
2014-02-20 12:37 ` [PATCH 1/6] drm/i915: Add Color manager framework Shashank Sharma
2014-02-20 12:37 ` [PATCH 2/6] drm/i915: Color Manager: Add CSC color correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 3/6] drm/i915: Color manager: Add Gamma correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 4/6] drm/i915: Color manager: brightness/contrast Shashank Sharma
2014-02-20 12:37 ` [PATCH 5/6] drm/i915: Color manager: hue/saturation correction Shashank Sharma
2014-02-20 12:37 ` [PATCH 6/6] drm/i915: Save color manager status Shashank Sharma
2014-02-20 13:11 ` [Intel-gfx] [PATCH 0/6] Intel Color Manager Framework Ville Syrjälä
2014-02-21  3:34   ` Sharma, Shashank
2014-02-21  9:17     ` Ville Syrjälä [this message]
2014-02-21 14:20       ` Sharma, Shashank
2014-02-21 14:46         ` [Intel-gfx] " Ville Syrjälä
2014-02-21 15:41           ` Alex Deucher
2014-02-25 11:41             ` [Intel-gfx] " Thierry Reding
2014-02-22  4:11           ` Sharma, Shashank
2014-02-21 14:49         ` Rob Clark
2014-02-21 18:24           ` Sean Paul
2014-02-21 18:57   ` [Intel-gfx] " Stéphane Marchesin
2014-02-22  3:49     ` Sharma, Shashank
2014-02-24  4:04       ` Stéphane Marchesin
2014-02-25  3:56         ` Sharma, Shashank

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=20140221091706.GJ3852@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shashank.sharma@intel.com \
    --cc=uma.shankar@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 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.