[Intel-gfx] [PATCH 13/22] drm/i915: CHV: Pipe level Gamma correction

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 13 06:08:10 PDT 2015


On 10 October 2015 at 06:09, Sharma, Shashank <shashank.sharma at intel.com> wrote:
> On 10/10/2015 4:37 AM, Emil Velikov wrote:
>>
>> Hi Shashank,
>>
>> On 9 October 2015 at 20:29, Shashank Sharma <shashank.sharma at intel.com>
>> wrote:
>>>
>>> CHV/BSW platform supports two different pipe level gamma
>>> correction modes, which are:
>>> 1. Legacy 8-bit mode
>>> 2. 10-bit CGM (Color Gamut Mapping) mode
>>>
>>> This patch does the following:
>>> 1. Attaches Gamma property to CRTC
>>> 3. Adds the core Gamma correction function for CHV/BSW
>>> 4. Adds Gamma correction macros
>>>
>>> Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
>>> Signed-off-by: Kausal Malladi <kausalmalladi at gmail.com>
>>> ---
[snip]
>>> +       length = num_samples * sizeof(struct drm_r32g32b32);
>>
>> Calculation can overflow.
>
> good catch, will take care of this.
Actually we do not at all here as the variable is unused. Same applies
for patch 21/22.

[snip]
>>> +               while (count < num_samples) {
>>
>> Using for(i = 0;....) loop seems the more common approach ?
>
> Nah, we are good with while. The whole color management series prefers while
> (and me too.... :))
Hmm... so you'd prefer your approach/coding style over the one already
in i915? Feels a bit strange but as long as others are happy fine go
with it.

Regards,
Emil


More information about the Intel-gfx mailing list