<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<div>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 20, 2014 at 5:11 AM, Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com" target="_blank">ville.syrjala@linux.intel.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">On Thu, Feb 20, 2014 at 06:07:21PM +0530, Shashank Sharma wrote:<br>
<span style="color:#1F497D">></span>> Color manager is a new framework in i915 driver, which provides<br>
<span style="color:#1F497D">></span>> a unified interface for various color correction methods supported<br>
<span style="color:#1F497D">></span>> by intel hardwares. The high level overview of this change is:<br>
<br>
<span style="color:#1F497D">></span>Would have been good to discuss this idea before implementing it. The<br>
<span style="color:#1F497D">></span>plan is to use kms properties for this kind of stuff which allows us<br>
<span style="color:#1F497D">>t</span>o hook it up with the upcoming atomic modeset API. Just yesterday there<br>
<span style="color:#1F497D">></span>was some discussion on #dri-devel about exposing user settable blob<br>
<span style="color:#1F497D">></span>properties even before the atomic modeset API lands (it was always the<br>
<span style="color:#1F497D">></span>plan for the atomic modeset API anyway). So based on a cursory glance,<br>
<span style="color:#1F497D">></span>this looks like it's going in the wrong direction.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">+1. We'e looking into hooking up color correction controls, and if the interface isn't standard our user space won't be portable across drivers. There are multiple reasons for using drm properties:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- the KMS interface already provides a way to set the gamma ramp, which this code seems to replicate.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The current KMS interface just initializes the gamma soft LUT palette registers, in 8 bit mode corresponding to unit gamma. It’s impossible to apply accurate
 values corresponding to gamma=2.2 or 1.5 from KMS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Because for that we need to program palette registers in 10.6 bit mode of hardware.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D">></span>- the KMS interface allows us to name properties independently and enumerate them. It seems like right now you can't enumerate properties or guess what "property 0" is. I'd rather set the "Color conversion
 matrix" than remember to set <span style="color:#1F497D">></span>"property 0" (and even then, I'm not really sure it exists).<span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">All the properties are getting enumerated in color manager register function. The framework defines proper identifiers and mapping for each property, and every
 property is having a corresponding soft-lut to be loaded with correction values.  <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal">- you can reuse the get/set infrastructure which is already in place<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D">></span>Another thing that came out of the discussion on irc is that we should standardize the properties. For example we could use a text file describing the name of the controls and the format of the data (something
 similar to the device tree <span style="color:#1F497D">></span>bindings). That way user space can expect "color conversion matrix" to mean the same thing everywhere, to get the same data as input, and to work the same way on all platforms.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D">If you can please have a look on the header file, we are almost doing the same thing, in form of a protocol.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal">Stéphane<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Shashank<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>