From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tvrtko Ursulin Subject: Re: [PATCH 3/3] tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact Date: Thu, 24 Apr 2014 10:08:56 +0100 Message-ID: <5358D4A8.1060107@linux.intel.com> References: <1393431465-31630-1-git-send-email-tvrtko.ursulin@linux.intel.com> <1398271115-19038-1-git-send-email-tvrtko.ursulin@linux.intel.com> <1398271115-19038-3-git-send-email-tvrtko.ursulin@linux.intel.com> <20140423171749.GD23344@bdvolkin-ubuntu-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id CD6AD6EBE8 for ; Thu, 24 Apr 2014 02:09:21 -0700 (PDT) In-Reply-To: <20140423171749.GD23344@bdvolkin-ubuntu-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Volkin, Bradley D" Cc: Intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 04/23/2014 06:17 PM, Volkin, Bradley D wrote: [snip] >> +static int gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t *handle) >> +{ >> + struct local_i915_gem_userptr userptr; >> + int ret; >> + >> + userptr.user_ptr = (uintptr_t)ptr; >> + userptr.user_size = size; >> + userptr.flags = userptr_flags; >> + if (read_only) >> + userptr.flags |= LOCAL_I915_USERPTR_READ_ONLY; >> + >> + ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr); >> + if (ret) >> + ret = errno; >> + igt_skip_on_f(ret == ENODEV && >> + (userptr_flags & LOCAL_I915_USERPTR_UNSYNCHRONIZED) == 0, >> + "Skipping, synchronized mappings with no kernel CONFIG_MMU_NOTIFIER?"); > > I missed it the first time around, but the condition here doesn't > match the other test; it's missing the '&& !read_only'. It looks > like read_only will always be 0 in this test though, so probably > not an issue. > > Reviewed-by: Brad Volkin Good catch! It does not matter in the benchmark but I've sent a respin for consistency and clarity. Thanks, Tvrtko