From patchwork Wed Dec 21 22:54:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Previn X-Patchwork-Id: 13079256 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 55A1DC4332F for ; Wed, 21 Dec 2022 22:51:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C1CA10E116; Wed, 21 Dec 2022 22:51:52 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E64710E0F7 for ; Wed, 21 Dec 2022 22:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671663109; x=1703199109; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=4Z/WRtbjnOiJ0uHIyXAFMqHotG7OwAYBY2csoq/NDXs=; b=ZS2zDENmf27V98MCs4DpJ1KjeiT82swIvrcOzWWbwNUetH0TedL8ebJx liYyU1c1UiCOlZ9W1F3diigct4ELRo3XtkoJisN8U4ijw6RqulTKdZYrm O+EOOLS0R4jc54zYYESksdZBCNhweJJvHXBjwRYs0jJQJYC30N6I4Rh4H FvK1/qTrmJr5f6atAL4r1afnZ1L6Ol/pycXKZi7ERZvy3LXdtA1oxyvzo LvRj/21x4hOuo4IVCh/L0aL03/fyOSuAH4WmP82TaoR0XZNJfzCm0G20P XZLFDurJAqUOjqAzD/tdQWptrCIbU5xbPmk11CjNfZne04G2CugqA3l/c g==; X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="300328208" X-IronPort-AV: E=Sophos;i="5.96,263,1665471600"; d="scan'208";a="300328208" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2022 14:51:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10568"; a="682183968" X-IronPort-AV: E=Sophos;i="5.96,263,1665471600"; d="scan'208";a="682183968" Received: from aalteres-desk.fm.intel.com ([10.80.57.53]) by orsmga008.jf.intel.com with ESMTP; 21 Dec 2022 14:51:48 -0800 From: Alan Previn To: intel-gfx@lists.freedesktop.org Date: Wed, 21 Dec 2022 14:54:32 -0800 Message-Id: <20221221225439.2714575-1-alan.previn.teres.alexis@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221129004832.3735764-1-alan.previn.teres.alexis@intel.com> References: <20221129004832.3735764-1-alan.previn.teres.alexis@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v3 0/7] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown 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" A customer issue was recently discovered and in the process a gap in i915's PXP interaction with HW+FW architecure was also realized. This series adds those missing pieces. This fix includes changes where i915 calls into the mei component interface in order to submit requests to the security firmware during the i915's suspend_prepare flow. This change did expose a blocking issue in the mei component side that was discovered while testing in rev1. The issue being the mei-pxp component driver not being able to runtime-resume while being within the suspend_prepare callstack. Thus, we have now included the mei patches (from Alexander) that fixes that issue by adding a device-link based on the interface type to ensure mei side runtime resume during the i915's suspend_prepare call. That said, as per request from Alexander, we seek Greg's and Tomas' review for the mei patches (Patch 1, 2 and 3). Patch 2, although is a change in the i915 code, is the mei component device link change. The individual patches explain more details. Patch 7 can be ignored as it won't be merged and is only meant to ensure the CI run's the PXP subtests with PXP support enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_prepare by ensuring the init is done during i915s pm_resume_complete. v2: - Rebase on latest drm-tip after PXP subsytem was promoted to global. - Remove "INTEL_PXP_MAX_HWDRM_SESSIONS" unneeded (Juston Li). - Added mei patches that are dependencies for this series to successfully pass testing when PXP config is enabled. Alan Previn (3): drm/i915/pxp: Invalidate all PXP fw sessions during teardown drm/i915/pxp: Trigger the global teardown for before suspending drm/i915/pxp: Pxp hw init should be in resume_complete HAX: force enable PXP Kconfig Alexander Usyskin (3): mei: mei-me: resume device in prepare drm/i915/pxp: add device link between i915 and mei_pxp mei: clean pending read with vtag on bus drivers/gpu/drm/i915/Kconfig | 2 +- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 20 ++++++- drivers/gpu/drm/i915/pxp/intel_pxp.c | 60 ++++++++++++++++--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 2 + .../drm/i915/pxp/intel_pxp_cmd_interface_42.h | 15 +++++ .../i915/pxp/intel_pxp_cmd_interface_cmn.h | 3 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 4 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +- drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 11 +++- drivers/gpu/drm/i915/pxp/intel_pxp_session.h | 5 ++ drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 42 +++++++++++++ drivers/misc/mei/client.c | 4 +- drivers/misc/mei/pci-me.c | 13 ++++ drivers/misc/mei/pxp/Kconfig | 1 + 15 files changed, 168 insertions(+), 21 deletions(-) base-commit: cc44a1e87ea6b788868878295119398966f98a81