From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDDC76EC3A for ; Thu, 14 Oct 2021 20:05:38 +0000 (UTC) Date: Thu, 14 Oct 2021 13:05:37 -0700 Message-ID: <87sfx3cqy6.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20211014155306.GA28397@zkempczy-mobl2> References: <20211014081917.15977-1-zbigniew.kempczynski@intel.com> <87mtnbhbhd.wl-ashutosh.dixit@intel.com> <20211014155306.GA28397@zkempczy-mobl2> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Subject: Re: [igt-dev] [PATCH i-g-t 0/7] Prepare IGTs to allow only zero alignment List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Zbigniew =?ISO-8859-2?Q?Kempczy=F1ski?= Cc: igt-dev@lists.freedesktop.org, Petri Latvala List-ID: On Thu, 14 Oct 2021 08:53:06 -0700, Zbigniew Kempczy=F1ski wrote: > > On Thu, Oct 14, 2021 at 08:28:30AM -0700, Dixit, Ashutosh wrote: > > On Thu, 14 Oct 2021 01:19:10 -0700, Zbigniew Kempczy=F1ski wrote: > > > > > > In the future we're planning to allow passing only zero alignment so > > > this is preparation step to introduce check and disable or fix > > > igts which uses this constraint. > > > > > > v2: rename to gem_allows_obj_alignment() (Ashutosh) > > > addressing review comments from Ashutosh > > > > > > > For patches 1 through 6: > > > > Reviewed-by: Ashutosh Dixit > > > > For patch 7, I think the point below from my earlier email is still > > unaddressed: > > > > > So assigning a new offset will cause a new fault-in (bind) but not su= re if > > > it will cause an actual fault-out (unbind). Though I am not sure if t= here > > > is actually a way to force it to happen if this doesn't work? Is ther= e a > > > way to verify that the unbind is actually happening? > > > > Maybe if assign the same offset to a different object/page that will ca= use > > a fault-out (unbind) followed by a fault-in (bind). > > For softpin case if you're changing the offset i915 will unbind/bind vma > in ppgtt, see eb_vma_misplaced() condition: > > if (flags & EXEC_OBJECT_PINNED && > vma->node.start !=3D entry->offset) > return true; > > so when you will go out from eb_pin_vma() with an error in else {} part > i915_vma_unbind() will be called. You can verify this using dynamic ftrac= e. Actually makes sense that if an object moves to a different offset that it will be unbound from the previous offset. So yes this should work.