[Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear

2013-11-20 Thread Zhenyu Wang
If valgrind is not available, current VG_CLEAR() would just ignore memory clear operation which might make invalid ioctl argument. So make sure VG_CLEAR() will always clear memory. --- intel/intel_bufmgr_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intel/intel_bufmgr_g

Re: [Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear

2013-11-20 Thread Damien Lespiau
On Wed, Nov 20, 2013 at 05:22:48PM +0800, Zhenyu Wang wrote: > If valgrind is not available, current VG_CLEAR() would just ignore > memory clear operation which might make invalid ioctl argument. So > make sure VG_CLEAR() will always clear memory. > --- > intel/intel_bufmgr_gem.c | 2 +- > 1 file

Re: [Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear

2013-11-20 Thread Zhenyu Wang
On 2013.11.20 11:36:20 +, Damien Lespiau wrote: > On Wed, Nov 20, 2013 at 05:22:48PM +0800, Zhenyu Wang wrote: > > If valgrind is not available, current VG_CLEAR() would just ignore > > memory clear operation which might make invalid ioctl argument. So > > make sure VG_CLEAR() will always clear

Re: [Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear

2013-11-20 Thread Damien Lespiau
On Wed, Nov 20, 2013 at 11:53:54PM +0800, Zhenyu Wang wrote: > > VG_CLEAR() is really just for valgrind. If you need to set some specific > > variable/field to 0 then you need to set it to 0 and not rely on > > VG_CLEAR() to do it for you. > > > > ok, in valgrind case it does memory clear for ioc

Re: [Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear

2013-11-20 Thread Zhenyu Wang
On 2013.11.20 16:59:22 +, Damien Lespiau wrote: > Right, so the fix is (was) to zero the fields checked by the kernel > explicitely, not change the VG() macro, which is just used in testing > (and it should this way). > That's fine. Thanks. -- Open Source Technology Center, Intel ltd. $gpg