Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1941231imi; Sun, 24 Jul 2022 01:31:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uIQaAaD82EzOje4dgSjBlLww2gd3rkh98yDZT3a9xtGNerlBVbzYl7b4d+D3XN1NOU+Cf3 X-Received: by 2002:a05:6402:50ce:b0:43a:c86a:b897 with SMTP id h14-20020a05640250ce00b0043ac86ab897mr7663686edb.321.1658651502336; Sun, 24 Jul 2022 01:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658651502; cv=none; d=google.com; s=arc-20160816; b=Lrjb/p7rt2c3zNpa9evrFLlR9/ufL4On3lj25rPsaLPTpuIsKJS11gVQfH1gUGczT1 NIa2UIz5l25pPX5caIiyB4aR/bVCMp6x+POuVMVoPkd5WFP6L7tQCjHnR5N2Hbnf09aQ u0Ztx1ATPkn9bP5IzdHMi9rel3WXxE1FaGWfLCj+78t72xcuLf4uaS8gUE7wXmaBBppd wNxO6TVZ6HtOkc3dqYbC4iN0LG0GXNX5vHGWds3RxoDmW+dLe3Qc+aiRN/z5+gyWCfe6 q6coZgzkkZT4CIa9pkbGNNXcFv8mT5tbC+n6SpPyxaU51a71z5kQyAFeu2kpACITE12c bj0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fjhp3z7+wzgmD3V0wNUQkIijVEuhGFZgcguPj514ass=; b=Jb7+Wg62BXSAcWMJE6YzeRXLuyfpcCv88dKB//6XU8R31ZXkrgJ73zQZedPYrAPHLc /NWSE8AjP+0Tk20ftogEMZEM7RlRaEwrQ70wLs1lJFmf+2jGj0pug4+Col+60NAJ4+tD gRm1WKFqJ8UnAfkApvhxG9XL8021fLbOJTcZwyzlpIZVN7ZD2Mnm4FZ5XmORQ1AGvugL GnZxJNknLbVjPTU2mFYy/5phUWeHcGde1Y7W5lx4IQkf2UpHFuqfTAJ9SUNwAbnGfuk4 KE0HojIElyKuvB2GkHVPBMZziJpqlfmuJZQaBRGgKjKPjUziWoan7cYEenOLamXF4auC lFxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="E5/0fv+l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020a170906440900b0072ee427f1e6si9369254ejo.934.2022.07.24.01.31.16; Sun, 24 Jul 2022 01:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="E5/0fv+l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233301AbiGXI0T (ORCPT + 99 others); Sun, 24 Jul 2022 04:26:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232490AbiGXIZp (ORCPT ); Sun, 24 Jul 2022 04:25:45 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 122271839C for ; Sun, 24 Jul 2022 01:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658651134; x=1690187134; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zgXW6g56cfZ9+X6oI75kHF9jUi+w24ZeOkTQZ7+mCHM=; b=E5/0fv+l7OE2ckoojIO77c0G5rR2KDr2OVe3izT/As8ig5WLQr7xRGwr JOKda6MJlp9dZHwHV+X1Uhnv2kqCMRkgdM95G3o1Eh1MPu3mRCWQJb53f R97lQyLkhYbPNChBLEmtIlde1Wc/d1XYX4My6t+DSpVCeEdI8qSJLRysO rbDDnnCnU9Z5d3xwmOlJ6V15yed50HtordX2eX21R7a+wOVysQhtGx7Ie F/D3YNwGbOW0vyYYZMOAZza/RHsHckrKKY75wAYe+WpYfwDEB/ztSn5xl Trww09lM6qQV4/M2oFfqwv+n/f/m1vx02OYSdf6HlJeWL8f+97DpIJITm g==; X-IronPort-AV: E=McAfee;i="6400,9594,10417"; a="288708514" X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="288708514" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:30 -0700 X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="657756420" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:27 -0700 From: Tomas Winkler To: Greg Kroah-Hartman , David Airlie , Daniel Vetter Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomas Winkler , Alexander Usyskin , Vitaly Lubart Subject: [PATCH v6 12/14] mei: debugfs: add pxp mode to devstate in debugfs Date: Sun, 24 Jul 2022 11:24:26 +0300 Message-Id: <20220724082428.218628-13-tomas.winkler@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220724082428.218628-1-tomas.winkler@intel.com> References: <20220724082428.218628-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add pxp mode devstate to debugfs to monitor pxp state machine progress. This is useful to debug issues in scenarios in which the pxp state needs to be re-initialized, like during power transitions such as suspend/resume. With this debugfs the state could be monitored to ensure that pxp is in the ready state. CC: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin --- drivers/misc/mei/debugfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c index 1ce61e9e24fc..4074fec866a6 100644 --- a/drivers/misc/mei/debugfs.c +++ b/drivers/misc/mei/debugfs.c @@ -86,6 +86,20 @@ static int mei_dbgfs_active_show(struct seq_file *m, void *unused) } DEFINE_SHOW_ATTRIBUTE(mei_dbgfs_active); +static const char *mei_dev_pxp_mode_str(enum mei_dev_pxp_mode state) +{ +#define MEI_PXP_MODE(state) case MEI_DEV_PXP_##state: return #state + switch (state) { + MEI_PXP_MODE(DEFAULT); + MEI_PXP_MODE(INIT); + MEI_PXP_MODE(SETUP); + MEI_PXP_MODE(READY); + default: + return "unknown"; + } +#undef MEI_PXP_MODE +} + static int mei_dbgfs_devstate_show(struct seq_file *m, void *unused) { struct mei_device *dev = m->private; @@ -112,6 +126,9 @@ static int mei_dbgfs_devstate_show(struct seq_file *m, void *unused) seq_printf(m, "pg: %s, %s\n", mei_pg_is_enabled(dev) ? "ENABLED" : "DISABLED", mei_pg_state_str(mei_pg_state(dev))); + + seq_printf(m, "pxp: %s\n", mei_dev_pxp_mode_str(dev->pxp_mode)); + return 0; } DEFINE_SHOW_ATTRIBUTE(mei_dbgfs_devstate); -- 2.35.3