<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On 17 October 2014 01:36, Jiang, Fei <span dir="ltr"><<a href="mailto:fei.jiang@intel.com" target="_blank">fei.jiang@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for Emil's suggestion. You are right, we need make sure structure size aligned on 8 bytes, which is important for 32bit-64bit compatible case.</blockquote><div><br></div><div>While you're at it, please don't use enum as a type inside ioctls, since the size can vary by compiler. Please use a uint32_t or whatever instead, assigning enum values to that.</div><div> </div><div>Cheers,</div><div>Daniel</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
Fei<br>
</font></span><span class="im HOEnZb">-----Original Message-----<br>
From: Emil Velikov [mailto:<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>]<br>
</span><div class="HOEnZb"><div class="h5">Sent: Thursday, October 16, 2014 11:20 PM<br>
To: Cheng, Yao; <a href="mailto:intel-gfx@lists.freedesktop.org">intel-gfx@lists.freedesktop.org</a><br>
Cc: <a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>; Jiang, Fei; <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>; Vetter, Daniel<br>
Subject: Re: [RFC PATCH 3/3] libdrm: user mode helper for ipvr drm driver<br>
<br>
On 16/10/14 15:33, Cheng, Yao wrote:<br>
> Hi Emil,<br>
> Sorry, what do you mean by "correctly aligned"? does it mean the paddings in this data structure?<br>
><br>
Afaict for compatibility reasons the struct size have to be "aligned"<br>
(multiple of 8 bytes), or if you prefer - the struct is missing the required padding :) I've only skimmed through the patch so it may be that other structs are having this issue.<br>
<br>
Cheers,<br>
Emil<br>
<br>
>> -----Original Message-----<br>
>> From: Emil Velikov [mailto:<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>]<br>
>> Sent: Wednesday, October 15, 2014 5:24 PM<br>
>> To: Cheng, Yao; <a href="mailto:intel-gfx@lists.freedesktop.org">intel-gfx@lists.freedesktop.org</a><br>
>> Cc: <a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>; Jiang, Fei;<br>
>> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>; Vetter, Daniel<br>
>> Subject: Re: [RFC PATCH 3/3] libdrm: user mode helper for ipvr drm<br>
>> driver<br>
>><br>
>> Hi Yao,<br>
>><br>
>> struct drm_ipvr_gem_userptr does not seem to be correctly aligned -<br>
>> is that intentional ? Might be worth checking if anything else in<br>
>> ipvr_drm.h and ipvr_bufmgr.h is in the same boat.<br>
>><br>
>> Cheers,<br>
>> Emil<br>
>><br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</div></div></blockquote></div><br></div></div>