From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDFA010E2E4 for ; Wed, 30 Mar 2022 06:08:12 +0000 (UTC) Date: Tue, 29 Mar 2022 23:08:11 -0700 Message-ID: <87h77g6khg.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Andrzej Turko In-Reply-To: <20210810191425.8391-2-andrzej.turko@linux.intel.com> References: <20210810191425.8391-1-andrzej.turko@linux.intel.com> <20210810191425.8391-2-andrzej.turko@linux.intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/gem_exec_store: Support gens without relocations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Tue, 10 Aug 2021 12:14:24 -0700, Andrzej Turko wrote: > > @@ -213,24 +257,41 @@ static void store_all(int fd, const intel_ctx_t *ctx) > execbuf.flags |= I915_EXEC_SECURE; > execbuf.rsvd1 = ctx->id; > > + ahnd = intel_allocator_open(fd, ctx->id, INTEL_ALLOCATOR_SIMPLE); > + > memset(obj, 0, sizeof(obj)); > obj[0].handle = gem_create(fd, nengine*sizeof(uint32_t)); > + obj[0].offset = intel_allocator_alloc(ahnd, obj[0].handle, > + nengine*sizeof(uint32_t), ALIGNMENT); > + obj[0].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_WRITE; > + obj[0].offset = CANONICAL(obj[0].offset); > obj[1].handle = gem_create(fd, 2*nengine*sizeof(batch)); > - obj[1].relocation_count = 1; > + obj[1].offset = intel_allocator_alloc(ahnd, obj[1].handle, > + nengine*sizeof(uint32_t), ALIGNMENT); Is this correct, or should the size argument be 2*nengine*sizeof(batch) (instead of nengine*sizeof(uint32_t))? > + obj[1].offset = CANONICAL(obj[1].offset); > + obj[1].flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;