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 X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DCEDC4338F for ; Mon, 2 Aug 2021 06:24:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 15D0960FC1 for ; Mon, 2 Aug 2021 06:24:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 15D0960FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A4796E02A; Mon, 2 Aug 2021 06:24:50 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id D48BF6E027; Mon, 2 Aug 2021 06:24:48 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="213426708" X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="213426708" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 23:24:46 -0700 X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="666455287" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.17.228]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 23:24:45 -0700 Date: Sun, 01 Aug 2021 23:24:45 -0700 Message-ID: <87tuk85poy.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Matthew Auld Cc: , , Maarten Lankhorst , Daniel Vetter , Ramalingam C In-Reply-To: <20210730085348.2326899-8-matthew.auld@intel.com> References: <20210730085348.2326899-1-matthew.auld@intel.com> <20210730085348.2326899-8-matthew.auld@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 v3 08/11] lib/ioctl_wrappers: update set_domain for discrete 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 30 Jul 2021 01:53:45 -0700, Matthew Auld wrote: > > On discrete set_domain is now gone, instead we just need to add the > wait. Reviewed-by: Ashutosh Dixit > Signed-off-by: Matthew Auld > Cc: Maarten Lankhorst > Cc: Ashutosh Dixit > Cc: Daniel Vetter > Cc: Ramalingam C > --- > lib/ioctl_wrappers.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c > index 7e27a1b3..09eb3ce7 100644 > --- a/lib/ioctl_wrappers.c > +++ b/lib/ioctl_wrappers.c > @@ -565,7 +565,12 @@ int __gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write) > */ > void gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write) > { > - igt_assert_eq(__gem_set_domain(fd, handle, read, write), 0); > + int ret = __gem_set_domain(fd, handle, read, write); > + > + if (ret == -ENODEV && gem_has_lmem(fd)) > + igt_assert_eq(gem_wait(fd, handle, 0), 0); > + else > + igt_assert_eq(ret, 0); > } > > /** > -- > 2.26.3 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 01 Aug 2021 23:24:45 -0700 Message-ID: <87tuk85poy.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210730085348.2326899-8-matthew.auld@intel.com> References: <20210730085348.2326899-1-matthew.auld@intel.com> <20210730085348.2326899-8-matthew.auld@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 v3 08/11] lib/ioctl_wrappers: update set_domain for discrete List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Matthew Auld Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Daniel Vetter , Ramalingam C List-ID: On Fri, 30 Jul 2021 01:53:45 -0700, Matthew Auld wrote: > > On discrete set_domain is now gone, instead we just need to add the > wait. Reviewed-by: Ashutosh Dixit > Signed-off-by: Matthew Auld > Cc: Maarten Lankhorst > Cc: Ashutosh Dixit > Cc: Daniel Vetter > Cc: Ramalingam C > --- > lib/ioctl_wrappers.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c > index 7e27a1b3..09eb3ce7 100644 > --- a/lib/ioctl_wrappers.c > +++ b/lib/ioctl_wrappers.c > @@ -565,7 +565,12 @@ int __gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write) > */ > void gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write) > { > - igt_assert_eq(__gem_set_domain(fd, handle, read, write), 0); > + int ret = __gem_set_domain(fd, handle, read, write); > + > + if (ret == -ENODEV && gem_has_lmem(fd)) > + igt_assert_eq(gem_wait(fd, handle, 0), 0); > + else > + igt_assert_eq(ret, 0); > } > > /** > -- > 2.26.3 >