From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5E796EEA0 for ; Thu, 20 May 2021 04:58:44 +0000 (UTC) Date: Wed, 19 May 2021 21:58:41 -0700 Message-ID: <87r1i2dmri.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210520042725.770003-1-viswax.krishna.raveendra.talabattula@intel.com> References: <20210520042725.770003-1-viswax.krishna.raveendra.talabattula@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [Patch V2] [i-g-t] tests/i915: test pass for no caching case List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: viswax.krishna.raveendra.talabattula@intel.com Cc: igt-dev@lists.freedesktop.org, Mahesh.Meena@intel.com List-ID: On Wed, 19 May 2021 21:27:25 -0700, wrote: > > From: Viswa Krishna Raveendra Talabattula > > The userptr memory does not support I915_CACHING_NONE(no caching) level > as per the below commit related to i915 in the kernel > > drm/i915: Reject more ioctls for userptr, v2. > > So lets make test pass for both cases and return warning for 0 return > code > > Signed-off-by: Viswa Krishna Raveendra Talabattula > --- > tests/i915/gem_userptr_blits.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c > index aad5f141..2ac5713b 100644 > --- a/tests/i915/gem_userptr_blits.c > +++ b/tests/i915/gem_userptr_blits.c > @@ -2032,15 +2032,24 @@ static void test_set_caching(int i915) > > for (int idx = 0; idx < ARRAY_SIZE(levels); idx++) { > gem_userptr(i915, page, 4096, 0, 0, &handle); > - igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), 0); > + if (__gem_set_caching(i915, handle, levels[idx]) == 0) > + igt_warn("Deprecated return code 0 from __gem_set_caching\n"); > + else > + igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), -ENXIO); This is not correct since -ENXIO is the expected return only for I915_CACHING_NONE, not for I915_CACHING_CACHED. Same for below too. _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev