From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 20 Jan 2022 17:50:33 -0800 Message-ID: <87v8yd502e.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20220121010928.3021085-1-John.C.Harrison@Intel.com> References: <20220121010928.3021085-1-John.C.Harrison@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] [Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_capture: Fix memory object size in gem_exec_capture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: John.C.Harrison@Intel.com Cc: IGT-Dev@Lists.FreeDesktop.Org, Intel-GFX@Lists.FreeDesktop.Org List-ID: On Thu, 20 Jan 2022 17:09:28 -0800, John.C.Harrison@Intel.com wrote: > > From: John Harrison > > The capture tests require knowing exactly how big the test allocation > is. Part of the test is to compare the captured size against the > allocated size to make sure they match. That doesn't work if the > allocator creates an object of a different size than was requested > without reporting the larger size. Reviewed-by: Ashutosh Dixit > Fixes: 85a593809 ("tests/i915/gem_exec_capture: Add support for local memory") > Signed-off-by: John Harrison > --- > tests/i915/gem_exec_capture.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c > index 5b2482518..60f8df04c 100644 > --- a/tests/i915/gem_exec_capture.c > +++ b/tests/i915/gem_exec_capture.c > @@ -387,10 +387,9 @@ static void capture(int fd, int dir, const intel_ctx_t *ctx, > const struct intel_execution_engine2 *e, uint32_t region) > { > uint32_t handle; > - uint64_t ahnd; > - int obj_size = 4096; > + uint64_t ahnd, obj_size = 4096; > > - handle = gem_create_in_memory_regions(fd, obj_size, region); > + igt_assert_eq(__gem_create_in_memory_regions(fd, &handle, &obj_size, region), 0); > ahnd = get_reloc_ahnd(fd, ctx->id); > > __capture1(fd, dir, ahnd, ctx, e, handle, obj_size, region); > -- > 2.25.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61541C433F5 for ; Fri, 21 Jan 2022 01:50:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DBC810E590; Fri, 21 Jan 2022 01:50:36 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id D0CB910E593; Fri, 21 Jan 2022 01:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642729834; x=1674265834; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=S+miNOOpvUWjkG1x2tDsOgLpo9gJFjNVW7wbFsjsJWQ=; b=O5qOqYok5NmUdV9huhuniBwUZdJD/LH8du9Q5S2+0ScInZiLVE9Kyb17 /Fl1c6zpFSR1+qme2Kx8ZdMs+mjdFFrweQVTmcVw8jnRrUVA6OqD6K7jQ S4mxHitbLyMlLCGLm8mZeJQ4wnYkQTKlRWjkxxfasGD/xPvlqUl7/ypTm wECtH15BRUHBQhPMFfPfpJz+u2xajTg1MBGOUzkpku8bKJ4GClVn417r4 b441MZwnO1pcbtMOi2iN3OLzQ6VGdPSOFUDpTfFRYTqgDbPy1YwV+HYZn EByfVg88sc7qA1seP35FumusT0uUNu01zYrfoT2dOFGDMJJEOCqVRdj8n Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10233"; a="269956957" X-IronPort-AV: E=Sophos;i="5.88,303,1635231600"; d="scan'208";a="269956957" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2022 17:50:34 -0800 X-IronPort-AV: E=Sophos;i="5.88,303,1635231600"; d="scan'208";a="533071073" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.251.12.247]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2022 17:50:34 -0800 Date: Thu, 20 Jan 2022 17:50:33 -0800 Message-ID: <87v8yd502e.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: John.C.Harrison@Intel.com In-Reply-To: <20220121010928.3021085-1-John.C.Harrison@Intel.com> References: <20220121010928.3021085-1-John.C.Harrison@Intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_capture: Fix memory object size in gem_exec_capture X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: IGT-Dev@Lists.FreeDesktop.Org, Intel-GFX@Lists.FreeDesktop.Org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 20 Jan 2022 17:09:28 -0800, John.C.Harrison@Intel.com wrote: > > From: John Harrison > > The capture tests require knowing exactly how big the test allocation > is. Part of the test is to compare the captured size against the > allocated size to make sure they match. That doesn't work if the > allocator creates an object of a different size than was requested > without reporting the larger size. Reviewed-by: Ashutosh Dixit > Fixes: 85a593809 ("tests/i915/gem_exec_capture: Add support for local memory") > Signed-off-by: John Harrison > --- > tests/i915/gem_exec_capture.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c > index 5b2482518..60f8df04c 100644 > --- a/tests/i915/gem_exec_capture.c > +++ b/tests/i915/gem_exec_capture.c > @@ -387,10 +387,9 @@ static void capture(int fd, int dir, const intel_ctx_t *ctx, > const struct intel_execution_engine2 *e, uint32_t region) > { > uint32_t handle; > - uint64_t ahnd; > - int obj_size = 4096; > + uint64_t ahnd, obj_size = 4096; > > - handle = gem_create_in_memory_regions(fd, obj_size, region); > + igt_assert_eq(__gem_create_in_memory_regions(fd, &handle, &obj_size, region), 0); > ahnd = get_reloc_ahnd(fd, ctx->id); > > __capture1(fd, dir, ahnd, ctx, e, handle, obj_size, region); > -- > 2.25.1 >