On 6/4/2015 7:12 PM, Kausal Malladi wrote:
Do you have any macro defines for these levels? Maybe an enum will be better?
You need this reserved?
Just trying to understand, why do we need to store the blob id separately?
Hi Sonika,
Please find my responses inline.
Thanks, Kausal
On Friday 05 June 2015 05:30 PM, Jindal, Sonika wrote:
Yes, we have macro defines for these. There are only two possible levels (pipe/plane).
In case any future platforms require any additional checks, we can use this member. Having said that, yes.. we are currently not using it.
Saving Blob ID allows us to do a lookup of the blob using ID. This will be useful in get_property call.
Hi Kausal Malladi,
On 5 June 2015 at 13:00, Jindal, Sonika sonika.jindal@intel.com wrote:
On 6/4/2015 7:12 PM, Kausal Malladi wrote:
From: Kausal Malladi Kausal.Malladi@intel.com
...
...
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
Hi, Emil Velikov
The reason behind a zero sized array is that we want to use the same variable for various color correction possible across various driver . Due to current blob implementation, it doesn’t look very efficient to have another pointer in the structure, so we are left with this option only.
I guess as long as we are using gcc (which is for all Linux distributions), we are good. The size of the zero sized array will be zero, so no alignment errors as such.
Regards Shashank -----Original Message----- From: Emil Velikov [mailto:emil.l.velikov@gmail.com] Sent: Friday, June 12, 2015 10:48 PM To: Jindal, Sonika Cc: Malladi, Kausal; Roper, Matthew D; Barnes, Jesse; Lespiau, Damien; R, Durgadoss; Purushothaman, Vijay A; intel-gfx@lists.freedesktop.org; ML dri-devel; Matheson, Annie J; Palleti, Avinash Reddy; Mukherjee, Indranil; R, Dhanya p; Kamath, Sunil; Vetter, Daniel; Sharma, Shashank Subject: Re: [PATCH v2 04/10] drm: Add Gamma correction structure
Hi Kausal Malladi,
On 5 June 2015 at 13:00, Jindal, Sonika sonika.jindal@intel.com wrote:
On 6/4/2015 7:12 PM, Kausal Malladi wrote:
From: Kausal Malladi Kausal.Malladi@intel.com
...
...
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
On 14 June 2015 at 10:02, Sharma, Shashank shashank.sharma@intel.com wrote:
Can you elaborate (to suggest any reading material) about those inefficiencies ?
I guess as long as we are using gcc (which is for all Linux distributions), we are good. The size of the zero sized array will be zero, so no alignment errors as such.
Note that most of the DRM subsystem code is dual-licensed. As such it is used in other OSes - Solaris, *BSD, not to mention the work (in progress) about using clang/LLVM to build the kernel. In the former case not everyone uses GCC.
Thanks Emil
dri-devel@lists.freedesktop.org