From patchwork Thu Aug 18 20:51:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinay Belgaumkar X-Patchwork-Id: 12947872 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 53E3AC00140 for ; Thu, 18 Aug 2022 20:51:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9D5810E104; Thu, 18 Aug 2022 20:51:45 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC9A110E104; Thu, 18 Aug 2022 20:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660855897; x=1692391897; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PD/S2Zg0O6+m6qqsX/1JLWLJL8R60hxAcWbT2Zi8MvQ=; b=Tkh46LDrqJmb/m3nWDkVQn85CDLVlVqzH2+ZeTBqX97bdH04EvyS7js4 PdyGz3oAYhIVOjjiKB313QY1SeXqMARenbDNpl+5tr+CCSCXPm/s1IwQK UwyiAXThl3zJiZBs6BU4npNq5h8CLS7MTB9/yG3vgrCuoYbd2gzhvuenY Ut+8RvZyOnMC1EwM+u+zwdqZiNZK3fEI9B0HXYBgYIPTyNHn6x3Y3vQw6 ihLHVSFmk+MZNkyzvkihwgd3YvlKR5/VUQvLZMFxNU3TXnnXgmk8uQMVB JwxLuiTKsmRqY8b53hpMiWz89UbWzTcTIgnd/lidYLEDG9TbORp41llt6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10443"; a="379162078" X-IronPort-AV: E=Sophos;i="5.93,247,1654585200"; d="scan'208";a="379162078" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2022 13:51:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,247,1654585200"; d="scan'208";a="750262748" Received: from vbelgaum-ubuntu.fm.intel.com ([10.1.27.27]) by fmsmga001.fm.intel.com with ESMTP; 18 Aug 2022 13:51:37 -0700 From: Vinay Belgaumkar To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org Date: Thu, 18 Aug 2022 13:51:13 -0700 Message-Id: <20220818205113.21212-1-vinay.belgaumkar@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] i915/guc: Disable i915_pm_rps when SLPC is enabled 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: , Cc: Rodrigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" These tests were specifically designed for host Turbo. Skip them when SLPC is enabled as they fail frequently. We will look to keep adding to SLPC test coverage with these scenarios. Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/3963 Bug: https://gitlab.freedesktop.org/drm/intel/issues/4016 Bug: https://gitlab.freedesktop.org/drm/intel/issues/5468 Bug: https://gitlab.freedesktop.org/drm/intel/issues/5831 Cc: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar --- lib/igt_pm.c | 15 +++++++++++++++ lib/igt_pm.h | 1 + tests/i915/i915_pm_rps.c | 29 ++++++++++++++++++++++++----- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/lib/igt_pm.c b/lib/igt_pm.c index 6ebbad33..79bd6e2a 100644 --- a/lib/igt_pm.c +++ b/lib/igt_pm.c @@ -1202,3 +1202,18 @@ void igt_pm_print_pci_card_runtime_status(void) igt_pm_print_pci_dev_runtime_status(__pci_dev_pwrattr[i].pci_dev); } } + +bool i915_is_slpc_enabled(int fd) +{ + int debugfs_fd = igt_debugfs_dir(fd); + char buf[4096]; + int len; + + igt_require(debugfs_fd != -1); + + len = igt_debugfs_simple_read(debugfs_fd, "gt/uc/guc_slpc_info", buf, sizeof(buf)); + if (len < 0) + return false; + else + return strstr(buf, "SLPC state: running"); +} diff --git a/lib/igt_pm.h b/lib/igt_pm.h index f28b6ebf..cbbde12b 100644 --- a/lib/igt_pm.h +++ b/lib/igt_pm.h @@ -79,5 +79,6 @@ void igt_pm_enable_pci_card_runtime_pm(struct pci_device *root, void igt_pm_setup_pci_card_runtime_pm(struct pci_device *pci_dev); void igt_pm_restore_pci_card_runtime_pm(void); void igt_pm_print_pci_card_runtime_status(void); +bool i915_is_slpc_enabled(int fd); #endif /* IGT_PM_H */ diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c index d06ade27..cce07009 100644 --- a/tests/i915/i915_pm_rps.c +++ b/tests/i915/i915_pm_rps.c @@ -914,35 +914,54 @@ igt_main igt_install_exit_handler(pm_rps_exit_handler); } - igt_subtest("basic-api") + igt_subtest("basic-api") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); min_max_config(basic_check, false); + } /* Verify the constraints, check if we can reach idle */ - igt_subtest("min-max-config-idle") + igt_subtest("min-max-config-idle") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); min_max_config(idle_check, true); + } /* Verify the constraints with high load, check if we can reach max */ igt_subtest("min-max-config-loaded") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); load_helper_run(HIGH); min_max_config(loaded_check, false); load_helper_stop(); } /* Checks if we achieve boost using gem_wait */ - igt_subtest("waitboost") + igt_subtest("waitboost") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); waitboost(drm_fd, false); + } igt_describe("Check if the order of fences does not affect waitboosting"); - igt_subtest("fence-order") + igt_subtest("fence-order") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); fence_order(drm_fd); + } igt_describe("Check if context reuse does not affect waitboosting"); - igt_subtest("engine-order") + igt_subtest("engine-order") { + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); engine_order(drm_fd); + } /* Test boost frequency after GPU reset */ igt_subtest("reset") { igt_hang_t hang = igt_allow_hang(drm_fd, 0, 0); + igt_skip_on_f(i915_is_slpc_enabled(drm_fd), + "This subtest is not supported when SLPC is enabled"); waitboost(drm_fd, true); igt_disallow_hang(drm_fd, hang); }