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 69776C2BA1A for ; Wed, 19 Jun 2024 23:14:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33A3010E296; Wed, 19 Jun 2024 23:14:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RkZqhojI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B8E310E296 for ; Wed, 19 Jun 2024 23:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718838891; x=1750374891; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=hWIMxmeRHefYPPr+p9a2p4dBRFvC/lE9gBWjnmS7ri8=; b=RkZqhojILD13ZyKIra/evvwW/HRZSr9QYYvpREiV0wnbrJ2WEmP5KXfo 5YxpzROrKoPciJqYTzA34RB6JHNPzxItkNAhTYIQ/d+QREDBQQgzZ4VU9 9brtJ7WMxOhNFSrZtv6Qr1ptMCtU6/LsFNz4+nCgcgZQWgrJPWLmofSJT szlUp/zY5PNsipGx7W7+F09WRo253ADKseigfbe57jLpe6z0fvlsw2Qm9 2jOdbe0fglMi3/AroDyFQe4TDiAZCjdyqEotlP7Dn2pLnNcsmlT1c7tyP AKf7Yr/va8mYgWhwZ/BtINf0TnQojs6XON9HNbZ9w0CvWbBVaFt7HW/C+ w==; X-CSE-ConnectionGUID: hAVTqChDRK6x9/q1q6KogA== X-CSE-MsgGUID: GS5OtxrTTnqgNj3PiwoQdw== X-IronPort-AV: E=McAfee;i="6700,10204,11108"; a="15669752" X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="15669752" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 16:14:50 -0700 X-CSE-ConnectionGUID: 59N+gcgASKiFaIzsBKIuOA== X-CSE-MsgGUID: nwePXA0dRduBO2dwvxcEFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="47184975" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orviesa004.jf.intel.com with ESMTP; 19 Jun 2024 16:14:49 -0700 Received: from [10.246.25.139] (unknown [10.246.25.139]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 402FA2878B; Thu, 20 Jun 2024 00:14:35 +0100 (IST) Message-ID: Date: Thu, 20 Jun 2024 01:14:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 9/9] drm/xe/vf: Custom HuC initialization if VF To: Matthew Brost Cc: intel-xe@lists.freedesktop.org References: <20240619214557.905-1-michal.wajdeczko@intel.com> <20240619214557.905-10-michal.wajdeczko@intel.com> Content-Language: en-US From: Michal Wajdeczko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On 20.06.2024 01:11, Matthew Brost wrote: > On Wed, Jun 19, 2024 at 11:45:57PM +0200, Michal Wajdeczko wrote: >> The HuC firmware is loaded and initialized by the PF driver. Make >> sure VF driver performs only limited data structure initialization. >> >> Signed-off-by: Michal Wajdeczko >> --- >> drivers/gpu/drm/xe/xe_huc.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c >> index 6238fb354914..c88761fe31c9 100644 >> --- a/drivers/gpu/drm/xe/xe_huc.c >> +++ b/drivers/gpu/drm/xe/xe_huc.c >> @@ -21,6 +21,7 @@ >> #include "xe_guc.h" >> #include "xe_map.h" >> #include "xe_mmio.h" >> +#include "xe_sriov.h" >> #include "xe_uc_fw.h" >> >> static struct xe_gt * >> @@ -92,6 +93,9 @@ int xe_huc_init(struct xe_huc *huc) >> if (!xe_uc_fw_is_enabled(&huc->fw)) >> return 0; >> >> + if (IS_SRIOV_VF(xe)) >> + return 0; >> + > > With this change I assume the main part of xe_huc_auth is never called > on a VF? > > Does xe_uc_fw_is_loadable return false on a VF? yes, as on VF it is marked as PRELOADED, so: static inline bool xe_uc_fw_is_loadable(struct xe_uc_fw *uc_fw) { return __xe_uc_fw_status(uc_fw) >= XE_UC_FIRMWARE_LOADABLE && __xe_uc_fw_status(uc_fw) != XE_UC_FIRMWARE_PRELOADED; } returns false > > Matt > >> if (huc->fw.has_gsc_headers) { >> ret = huc_alloc_gsc_pkt(huc); >> if (ret) >> -- >> 2.43.0 >>