Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2594722rdb; Wed, 15 Nov 2023 05:32:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYhcGvdILG6RVzRfOn5M+E7HFLhEA9jY0b3x4lsw839sDK1DA4nL/vmOdoaO4ved2qfXrP X-Received: by 2002:a17:902:efd3:b0:1cc:45f1:adf5 with SMTP id ja19-20020a170902efd300b001cc45f1adf5mr5351059plb.40.1700055137382; Wed, 15 Nov 2023 05:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700055137; cv=none; d=google.com; s=arc-20160816; b=Yr9JNLuTyXxEembW0cXzZ3pz/cN+8GcIcHY0dXmVW9oFkOdyYZwUMaRJv0NoZL36GO hWdm/ajQ1QgSsEOubD7Yvnmn6608wWN/yfBrSJoTVZNaeuh/MgSuLbV8ng5/3dDT9+C3 qzUFqPODTb5iTcOwX+WQxFCl+DTifEb34SIvw84DVudjSdc7MQsHc80unSfuJOkftATX K+P+to46UPH/3Xwsw0YEjWeWmdimzFjF4yLenYtdJYOU9HYmAUMI/Cp1QJVCJBSyGi11 mKmJvxIsLD/COBbn2HL1MwvGW0uJy73v9YyuriojlZDyltJ8UAgwjWrvevZunPyhwJyI qpyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=E/pn1TB7mXwqwobM/mV9NGfYfyZHPvxw4E8PSOXSuJQ=; fh=N0u6bBwu9Zftfi519obqNUhhwYJ0Ah1RPMLlWIU1Nik=; b=tFko5LEOGq0Rnljkf9Uy2XOcmRSEItSWOZVqPHCdaplNAlqcskBmZLKwvlTJyWZbDU uvGLZfo3e8gQS01gWVA7z+0V3Zc2vOICdlf/W0CugwvnB0eZ/fUjgyGN0JsCtd1/msGn VChpR4+7JGbuhNvS1yTZVK9YKicw5ncFA9M96lv5T0/61C2ikx91Y3395v9Y9mLMTsZY poc5TAYWjEJ+yfa00kGXMIp+Sglc9U2qXBD+IIqR/vu1ol62xtSbxqtNFOuk9iGGhjKv 6dBzaGEZi2q65hzmIThpwdp4SGFdaQjQo/wr4wG76dERwqh9uWM32Wn4EKGx8edht6rs asaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cipxx5Df; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d16-20020a170902b71000b001ce0b383c67si9678232pls.612.2023.11.15.05.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:32:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cipxx5Df; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 526FE8075B1E; Wed, 15 Nov 2023 05:32:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343943AbjKONbz (ORCPT + 99 others); Wed, 15 Nov 2023 08:31:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343919AbjKONby (ORCPT ); Wed, 15 Nov 2023 08:31:54 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DED5D11D for ; Wed, 15 Nov 2023 05:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700055110; x=1731591110; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Wq9K0biAJd+uWugvhnpqHht2TiqKoqsRdn7Q5piWNtY=; b=Cipxx5DfsRUYlgC99PORDKwrccvq1mXIipuIkosPNcaPNlHQlPECrryS Y3ezvhcTIfNwzJW5myOpik0snKptMwdYR64O1swel5Esbe+D0QIzA82eP XrpScf6xVwaxapyzZbHxv6K6OF12cm7NcmjRZEHxp1xlSdgt960LPL0Bt nCZVOu5juejWPkGhxlxlY3NZ0nYP4yjRMyw4uHUuXlpL476j6aQ0WEL/c aC4OoBXKRnTSK+XonaS4m/1G9zHCVCEzLzuZTmZcquBcSpNZxKaVhEJSM uPNHpbGe4sb3cjvoIRjBRcK4fV866y5sF6Nt+fzqnvWabb818ret7YmLx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="393731656" X-IronPort-AV: E=Sophos;i="6.03,305,1694761200"; d="scan'208";a="393731656" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 05:31:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="764977866" X-IronPort-AV: E=Sophos;i="6.03,305,1694761200"; d="scan'208";a="764977866" Received: from jcornall-mobl3.ger.corp.intel.com (HELO [10.213.211.209]) ([10.213.211.209]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 05:31:48 -0800 Message-ID: <02377290-cb5f-48ca-afe3-0e59b70a43de@linux.intel.com> Date: Wed, 15 Nov 2023 13:31:46 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-gfx] [char-misc-next 3/4] mei: pxp: re-enable client on errors Content-Language: en-US To: "Teres Alexis, Alan Previn" , "ville.syrjala@linux.intel.com" , "Winkler, Tomas" Cc: "gregkh@linuxfoundation.org" , "intel-gfx@lists.freedesktop.org" , "Usyskin, Alexander" , "linux-kernel@vger.kernel.org" , "Lubart, Vitaly" References: <20231011110157.247552-1-tomas.winkler@intel.com> <20231011110157.247552-4-tomas.winkler@intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 15 Nov 2023 05:32:05 -0800 (PST) On 14/11/2023 15:31, Teres Alexis, Alan Previn wrote: > On Tue, 2023-11-14 at 16:00 +0200, Ville Syrjälä wrote: >> On Wed, Oct 11, 2023 at 02:01:56PM +0300, Tomas Winkler wrote: >>> From: Alexander Usyskin >>> >>> Disable and enable mei-pxp client on errors to clean the internal state. >> >> This broke i915 on my Alderlake-P laptop. >> > > > Hi Alex, i just relooked at the series that got merged, and i noticed > that in patch #3 of the series, you had changed mei_pxp_send_message > to return bytes sent instead of zero on success. IIRC, we had > agreed to not effect the behavior of this component interface (other > than adding the timeout) - this was the intention of Patch #4 that i > was pushing for in order to spec the interface (which continues > to say zero on success). We should fix this to stay with the original > behavior - where mei-pxp should NOT send partial packets and > will only return zero in success case where success is sending of > the complete packets - so we don't need to get back the "bytes sent" > from mei_pxp_send_message. So i think this might be causing the problem. > > > Side note to Ville:, are you enabling PXP kernel config by default in > all MESA contexts? I recall that MESA folks were running some CI testing > with enable pxp contexts, but didn't realize this is being enabled by > default in all contexts. Please be aware that enabling pxp-contexts > would temporarily disabled runtime-pm during that contexts lifetime. > Also pxp contexts will be forced to be irrecoverable if it ever hangs. > The former is a hardware architecture requirement but doesn't do anything > if you're enabling display (which I beleive also blocks in ADL). The > latter was a requirement to comply with Vulkan. Regardless of the mei_pxp_send_message being temporarily broken, doesn't Ville's logs suggest the PXP detection is altogether messed up? AFAIR the plan was exactly to avoid stalls during Mesa init and new uapi was added to achieve that. But it doesn't seem to be working?! commit 3b918f4f0c8b5344af4058f1a12e2023363d0097 Author: Alan Previn Date: Wed Aug 2 11:25:50 2023 -0700 drm/i915/pxp: Optimize GET_PARAM:PXP_STATUS After recent discussions with Mesa folks, it was requested that we optimize i915's GET_PARAM for the PXP_STATUS without changing the UAPI spec. Add these additional optimizations: - If any PXP initializatoin flow failed, then ensure that we catch it so that we can change the returned PXP_STATUS from "2" (i.e. 'PXP is supported but not yet ready') to "-ENODEV". This typically should not happen and if it does, we have a platform configuration issue. - If a PXP arbitration session creation event failed due to incorrect firmware version or blocking SOC fusing or blocking BIOS configuration (platform reasons that won't change if we retry), then reflect that blockage by also returning -ENODEV in the GET_PARAM:PXP_STATUS. - GET_PARAM:PXP_STATUS should not wait at all if PXP is supported but non-i915 dependencies (component-driver / firmware) we are still pending to complete the init flows. In this case, just return "2" immediately (i.e. 'PXP is supported but not yet ready'). AFAIU is things failed there shouldn't be long waits, repeated/constant ones even less so. Regards, Tvrtko