From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4571F896AF for ; Tue, 3 Aug 2021 21:01:26 +0000 (UTC) Date: Tue, 03 Aug 2021 14:01:24 -0700 Message-ID: <87k0l2kztn.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210726200026.4815-3-zbigniew.kempczynski@intel.com> References: <20210726200026.4815-1-zbigniew.kempczynski@intel.com> <20210726200026.4815-3-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 v3 02/52] lib/intel_allocator: Add few helper functions for common use 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 , Chris Wilson List-ID: On Mon, 26 Jul 2021 12:59:36 -0700, Zbigniew Kempczy=F1ski wrote: > > +static inline uint64_t get_simple_ahnd(int fd, uint32_t ctx) > +{ > + bool do_relocs =3D gem_has_relocations(fd); > + > + return do_relocs ? 0 : intel_allocator_open(fd, ctx, INTEL_ALLOCATOR_SI= MPLE); Should this function be e.g. return intel_allocator_open(fd, 0, do_relocs ? INTEL_ALLOCATOR_RELOC : INTEL_ALLOCATOR_SIM= PLE); Similarly for others.