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 769FE10E452 for ; Thu, 15 Dec 2022 18:37:18 +0000 (UTC) Date: Thu, 15 Dec 2022 10:30:17 -0800 Message-ID: <87pmck1pvq.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Alan Previn In-Reply-To: <20221215174334.2008511-1-alan.previn.teres.alexis@intel.com> References: <20221215174334.2008511-1-alan.previn.teres.alexis@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 v2 1/1] tests/i915/pxp: PXP debugfs path promoted to global 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, 15 Dec 2022 09:43:33 -0800, Alan Previn wrote: > > As per recent kernel side update in preparation for > MTL, PXP is now a global i915 subsystem so let's update > the debugfs path to try both the legacy and new paths > before we fail. > > Changes from prior rev: > v1: - Fix a comment (Daniele) I went ahead and merged this. Thanks for the patch :) > > Signed-off-by: Alan Previn > Reviewed-by: Daniele Ceraolo Spurio > --- > tests/i915/gem_pxp.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c > index ffad9b5a..41043df9 100644 > --- a/tests/i915/gem_pxp.c > +++ b/tests/i915/gem_pxp.c > @@ -848,6 +848,14 @@ static void trigger_pxp_debugfs_forced_teardown(int i915) > char str[32]; > > fd = igt_debugfs_open(i915, "gt/pxp/terminate_state", O_RDWR); > + /* > + * On newer kernels, we promoted PXP to be a global i915 subsystem, > + * so try again with a top-level path if we failed at the gt path. > + * If we still fail, then we assert out. > + */ > + if (fd < 0) > + fd = igt_debugfs_open(i915, "pxp/terminate_state", O_RDWR); > + > igt_assert_f(fd >= 0, "Can't open pxp termination debugfs\n"); > ret = snprintf(str, sizeof(str), "0x1"); > igt_assert(ret > 2 && ret < sizeof(str)); > > base-commit: c001793d5f22deb01918b6ba52af829794582df1 > -- > 2.34.1 >