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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF92C433EF for ; Fri, 15 Oct 2021 22:51:34 +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 EF39E6108E for ; Fri, 15 Oct 2021 22:51:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EF39E6108E 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 10F5B6EE05; Fri, 15 Oct 2021 22:51:33 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D92CE6EE04; Fri, 15 Oct 2021 22:51:31 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="227891447" X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="227891447" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 15:51:31 -0700 X-IronPort-AV: E=Sophos;i="5.85,376,1624345200"; d="scan'208";a="481864637" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.20.32]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 15:51:31 -0700 Date: Fri, 15 Oct 2021 15:41:26 -0700 Message-ID: <87a6j9di7d.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: John Harrison Cc: , In-Reply-To: <92e77c59-f783-8d2c-c306-be163c6626d3@intel.com> References: <20211014194238.1078854-1-John.C.Harrison@Intel.com> <87k0iecpc1.wl-ashutosh.dixit@intel.com> <92e77c59-f783-8d2c-c306-be163c6626d3@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] [igt-dev] [PATCH v2 i-g-t] tests/i915: Skip gem_exec_fair on GuC based platforms 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, 15 Oct 2021 14:46:20 -0700, John Harrison wrote: > > On 10/15/2021 07:52, Dixit, Ashutosh wrote: > > On Thu, 14 Oct 2021 12:42:38 -0700, wrote: > >> + /* > >> + * These tests are for a specific scheduling model which is > >> + * not currently implemented by GuC. So skip on GuC platforms. > >> + */ > >> + devid = intel_get_drm_devid(i915); > >> + igt_require((intel_gen(devid) < 12) || IS_TIGERLAKE(devid) || > >> + IS_ROCKETLAKE(devid) || IS_ALDERLAKE_S(devid)); > > As I hinted on v1 let's just do this here: > > > > igt_require(gem_has_guc_submission(i915)); > > > > So that we can can have a single unified way of detecting if GuC is being > > used throughout IGT. Today it is gem_has_guc_submission() and it works with > > the current kernel. > > Earlier, you were saying that 'has' was only checking for capability not > usage. Which would be pretty useless for this situation. Looking at the > code, though it sort of does work. It checks the live value of the > enable_guc module parameter. If that says that GuC submission is enabled > then either we are using GuC submission or we have no engines (because a > failure to start the submission backend is terminal, there is no fallback > to execlist mode if GuC didn't work). So it can be used. > > I say sort of, though, because the code also sets 'has_execlists' when it > sets 'has_guc'. Which means that the gem_has_execlists() test is not > useable as an indication that the execlist back end is being used. So > gem_has_execlists() and gem_has_guc_submission() are basically very > non-orthogonal. One is a test of hardware presence irrespective of use, the > other is a test of usage irrespective of presence. The comment in the code > is 'query whether the driver is using execlists as a hardware submission > method'. So it seems like that was the original intention. Whether it has > been broken since or was just broken from the beginning is unclear. I completely agree, there is all this confusion in the code, it needs to be cleaned up. For now I thought it was better to use a centralized way to detect GuC rather than have different ways in different files. Fortunately gem_has_guc_submission() is doing that though gem_has_execlists() is broken in detecting if execlists are being used.