From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51E2410E479 for ; Thu, 28 Jul 2022 17:35:04 +0000 (UTC) Date: Thu, 28 Jul 2022 10:34:51 -0700 Message-ID: <878rodgmys.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Zbigniew =?ISO-8859-2?Q?Kempczy=F1ski?= In-Reply-To: <20220728120620.54065-1-zbigniew.kempczynski@intel.com> References: <20220728120620.54065-1-zbigniew.kempczynski@intel.com> 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] lib/batchbuffer: Ensure obj.alignment is zeroed for softpinning 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 Thu, 28 Jul 2022 05:06:20 -0700, Zbigniew Kempczy=F1ski wrote: > > Passing obj.alignment doesn't make sense for softpinning as offsets > are under full control of allocator. Reviewed-by: Ashutosh Dixit > Signed-off-by: Zbigniew Kempczy=F1ski > Cc: Ashutosh Dixit > --- > lib/intel_batchbuffer.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c > index 36cb55048d..ef1b594771 100644 > --- a/lib/intel_batchbuffer.c > +++ b/lib/intel_batchbuffer.c > @@ -1346,7 +1346,6 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t = size, bool do_relocs, > > igt_assert(ibb); > > - ibb->allows_obj_alignment =3D gem_allows_obj_alignment(i915); > ibb->uses_full_ppgtt =3D gem_uses_full_ppgtt(i915); > ibb->devid =3D intel_get_drm_devid(i915); > ibb->gen =3D intel_gen(ibb->devid); > @@ -1359,6 +1358,13 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t= size, bool do_relocs, > if (!ibb->uses_full_ppgtt) > do_relocs =3D true; > > + /* > + * For softpin mode allocator has full control over offsets allocation > + * so we want kernel to not interfere with this. > + */ > + if (do_relocs) > + ibb->allows_obj_alignment =3D gem_allows_obj_alignment(i915); > + > /* Use safe start offset instead assuming 0x0 is safe */ > start =3D max_t(uint64_t, start, gem_detect_safe_start_offset(i915)); > > -- > 2.34.1 >