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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1EC31C433F5 for ; Mon, 22 Nov 2021 09:58:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C6D989381; Mon, 22 Nov 2021 09:58:04 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26E5689381 for ; Mon, 22 Nov 2021 09:58:03 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10175"; a="221979438" X-IronPort-AV: E=Sophos;i="5.87,254,1631602800"; d="scan'208";a="221979438" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2021 01:58:02 -0800 X-IronPort-AV: E=Sophos;i="5.87,254,1631602800"; d="scan'208";a="508886720" Received: from rmcdonax-mobl.ger.corp.intel.com (HELO localhost) ([10.252.19.217]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2021 01:57:59 -0800 From: Jani Nikula To: Anusha Srivatsa , intel-gfx@lists.freedesktop.org, Tvrtko Ursulin , "Syrjala, Ville" , rodrigo.vivi@intel.com, Joonas Lahtinen In-Reply-To: <20211120002921.1939452-4-anusha.srivatsa@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20211120002921.1939452-1-anusha.srivatsa@intel.com> <20211120002921.1939452-4-anusha.srivatsa@intel.com> Date: Mon, 22 Nov 2021 11:57:56 +0200 Message-ID: <87czmso6l7.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [v2 3/3] drm/i915/rpl-s: Enable guc submission by default 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, 19 Nov 2021, Anusha Srivatsa wrote: > Though, RPL-S is defined as subplatform of ADL-S, unlike > ADL-S, it has GuC submission by default. > > v2: Remove extra parenthesis (Jani) > > Cc: Jani Nikula > Cc: Swathi Dhanavanthri > Signed-off-by: Anusha Srivatsa > --- > drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c > index 2fef3b0bbe95..6aa843a1c25f 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c > @@ -35,7 +35,7 @@ static void uc_expand_default_options(struct intel_uc *uc) > } > > /* Intermediate platforms are HuC authentication only */ > - if (IS_ALDERLAKE_S(i915)) { > + if (IS_ALDERLAKE_S(i915) && !IS_RAPTORLAKE_S(i915)) { I know I looked through the previous version, but I only realized this now. The above just feels wrong. Like, if it's ADL-S it obviously can't be RPL-S, so why the check. We've had this type of thing before when IS_VALLEYVIEW() used to mean VLV || CHV, and you'd have these really confusing checks: if (IS_VALLEYVIEW() && !IS_CHERRYVIEW()) We had to change that later on, and it was pretty annoying. I'm really sorry I didn't spot this before, but I firmly believe adding a platform check macro IS_RAPTORLAKE_S() as a subplatform check is the wrong thing to do. I think there are maybe three options: 1) Add RPL-S as a full blown platform of its own. Convert IS_ALDERLAKE_S() checks to IS_ALDERLAKE_S() || IS_RAPTORLAKE_S(). If we think there's going to be more differences than just the guc submission, this is the way to go. 2) Add RPL-S as a subplatform of ADL-S like here, but then don't add a platform macro IS_RAPTORLAKE_S(). Make the check something that conveys the subplatform idea. See all the users of IS_SUBPLATFORM() in i915_drv.h; for example IS_DG2_G10(). It's obvious it's a DG2 but subtype G10. So maybe IS_ADLS_RPLS(), I don't know. 3) Add RPL-S PCI IDs as ADL-S with separate device info, but add a feature flag for the guc submission default. Then RPL-S does not exist as a platform or subplatform in code, rather as ADL-S, but the difference is recorded via flags. BR, Jani. > i915->params.enable_guc = ENABLE_GUC_LOAD_HUC; > return; > } -- Jani Nikula, Intel Open Source Graphics Center