From: Daniel Vetter Subject: Re: [PATCH 3/3] tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact Date: Tue, 22 Apr 2014 20:59:23 +0200 Message-ID: <20140422185923.GY10722@phenom.ffwll.local> References: <1393431465-31630-1-git-send-email-tvrtko.ursulin@linux.intel.com> <1395227586-18623-1-git-send-email-tvrtko.ursulin@linux.intel.com> <1395227586-18623-4-git-send-email-tvrtko.ursulin@linux.intel.com> <20140417231846.GB7521@bdvolkin-ubuntu-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by gabe.freedesktop.org (Postfix) with ESMTP id EF5B86E57A for ; Tue, 22 Apr 2014 11:59:28 -0700 (PDT) Received: by mail-ee0-f53.google.com with SMTP id b57so33352eek.12 for ; Tue, 22 Apr 2014 11:59:26 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140417231846.GB7521@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 Thu, Apr 17, 2014 at 04:18:46PM -0700, Volkin, Bradley D wrote: > On Wed, Mar 19, 2014 at 04:13:06AM -0700, Tvrtko Ursulin wrote: > > + bo_ptr = (char *)(((unsigned long)ptr + (PAGE_SIZE - 1)) > > + & ~(PAGE_SIZE - 1)); > > You might add an ALIGN macro in this file or a suitable header. A couple of > .c files in lib/ individually define one already. lib/drmtest.h (with the gtkdoc for it include) is the current grab-bag for such random useful pieces. We already have an ARRAY_SIZE in there. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch