Re: [PATCH v2 04/10] drm: Add Gamma correction structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kausal Malladi,

On 5 June 2015 at 13:00, Jindal, Sonika <sonika.jindal@xxxxxxxxx> wrote:
> On 6/4/2015 7:12 PM, Kausal Malladi wrote:
>>
>> From: Kausal Malladi <Kausal.Malladi@xxxxxxxxx>
>>
...
>> v2: Addressing Daniel Stone's comment, added a variable sized array to
>> carry Gamma correction values as blob property.
>>
>> Signed-off-by: Shashank Sharma <shashank.sharma@xxxxxxxxx>
>> Signed-off-by: Kausal Malladi <Kausal.Malladi@xxxxxxxxx>
>> ---
>>   include/drm/drm_crtc.h |  3 +++
>>   include/uapi/drm/drm.h | 10 ++++++++++
>>   2 files changed, 13 insertions(+)
>>
...
>> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
>> index 3801584..fc2661c 100644
>> --- a/include/uapi/drm/drm.h
>> +++ b/include/uapi/drm/drm.h
>> @@ -829,6 +829,16 @@ struct drm_event_vblank {
>>         __u32 reserved;
>>   };
>>
>> +/* Color Management structure for Gamma */
>> +struct drm_gamma {
>> +       __u32 flags;
>> +       __u32 gamma_level;
>> +       __u32 gamma_precision;
>> +       __u32 num_samples;
>> +       __u32 reserved;
>> +       __u16 values[0];
Silly question:
Why use zero sized array ? Afaik it's a construct not covered in
C90/C99, which makes sizeof(struct drm_gamma) act funny. There seems
to be no other instance of a zero-sized array in drm uapi, plus based
of Daniel Vettel's "Botching up IOCTLS" I think that using it here
might be a bad idea.

The commit message mentions that Daniel Stone suggested it, but that
email never made it to the dri-devel mailiing list (and many other
emails, as mentioned previously) :'-(

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux