From: Riana Tauro <riana.tauro@intel.com>
To: Soham Purkait <soham.purkait@intel.com>,
<igt-dev@lists.freedesktop.org>, <vinay.belgaumkar@intel.com>
Cc: <anshuman.gupta@intel.com>, <lucas.demarchi@intel.com>,
<rodrigo.vivi@intel.com>
Subject: Re: [PATCH <i-g-t> v1 1/2] Add support for xe in runtime pm
Date: Mon, 17 Mar 2025 15:11:56 +0530 [thread overview]
Message-ID: <9bb07aba-6bc1-4026-b214-99b178090263@intel.com> (raw)
In-Reply-To: <20250317082823.1631744-2-soham.purkait@intel.com>
Hi Soham
You need to re-order the patches. The lib patch needs to be first.
Every patch has to compile successfully.
adding this patch first will cause an error.
Thanks
Riana
On 3/17/2025 1:58 PM, Soham Purkait wrote:
> Add support for runtime power management
> for Xe driver along with existing i915
> support
>
> v1 : Updated references from "i915" to
> "generic GPU driver" to include support
> for the xe driver, ensuring clarity and
> consistency
>
> Signed-off-by: Soham Purkait <soham.purkait@intel.com>
> ---
> tools/intel_pm_rpm.c | 28 ++++++++++++++++------------
> 1 file changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/tools/intel_pm_rpm.c b/tools/intel_pm_rpm.c
> index 08c25ca8a..8c4778e4f 100644
> --- a/tools/intel_pm_rpm.c
> +++ b/tools/intel_pm_rpm.c
> @@ -35,7 +35,7 @@
> #include "igt_pm.h"
>
> #define DONT_SET_AUTOSUSPEND_DELAY (1 << 0)
> -#define SET_I915_AUTOSUSPEND_DELAY (1 << 1)
> +#define SET_AUTOSUSPEND_DELAY (1 << 1)
>
> typedef struct {
> int drm_fd;
> @@ -47,8 +47,8 @@ typedef struct {
> const char *help_str =
> " --disable-display-wait\t\tDisable all screens and try to go into runtime pm.\n"
> " --force-d3cold-wait\t\tForce dgfx gfx card to enter runtime D3Cold.\n"
> - " --setup-d3cold\t\tEnable gfx card runtime pm and optionally set autosupend delay to"
> - " i915 autosuspend delay. Use --setup-d3cold=i915-auto-delay as optional argument.\n"
> + " --setup-d3cold\t\tEnable gfx card runtime pm and optionally set GPU driver's"
> + " autosuspend delay. Use --setup-d3cold=auto-delay as optional argument.\n"
> " --help\t\tProvide help. Provide card name with IGT_DEVICE=drm:/dev/dri/card*.";
> static struct option long_options[] = {
> {"disable-display-wait", 0, 0, 'd'},
> @@ -80,14 +80,14 @@ static void disable_all_displays(data_t *data)
> static void
> setup_gfx_card_d3cold(data_t *data, unsigned char setup_d3cold)
> {
> - struct pci_device *root, *i915;
> + struct pci_device *root, *gpu_device;
>
> root = igt_device_get_pci_root_port(data->drm_fd);
> if (setup_d3cold == DONT_SET_AUTOSUSPEND_DELAY) {
> igt_pm_enable_pci_card_runtime_pm(root, NULL);
> - } else if (setup_d3cold == SET_I915_AUTOSUSPEND_DELAY) {
> - i915 = igt_device_get_pci_device(data->drm_fd);
> - igt_pm_enable_pci_card_runtime_pm(root, i915);
> + } else if (setup_d3cold == SET_AUTOSUSPEND_DELAY) {
> + gpu_device = igt_device_get_pci_device(data->drm_fd);
> + igt_pm_enable_pci_card_runtime_pm(root, gpu_device);
> }
>
> igt_info("Enabled pci devs runtime pm under Root port %04x:%02x:%02x.%01x\n",
> @@ -151,7 +151,8 @@ int main(int argc, char *argv[])
> goto exit;
> }
> } else {
> - if (!igt_device_find_first_i915_discrete_card(&card)) {
> + if (!igt_device_find_first_i915_discrete_card(&card) &&
> + !igt_device_find_first_xe_discrete_card(&card)) {
> igt_warn("No discrete gpu found\n");
> ret = EXIT_FAILURE;
> goto exit;
> @@ -169,8 +170,8 @@ int main(int argc, char *argv[])
> break;
> case 's':
> if (optarg) {
> - if (!strcmp(optarg, "i915-auto-delay")) {
> - setup_d3cold = SET_I915_AUTOSUSPEND_DELAY;
> + if (!strcmp(optarg, "auto-delay")) {
> + setup_d3cold = SET_AUTOSUSPEND_DELAY;
> } else {
> usage(argv[0]);
> ret = EXIT_SUCCESS;
> @@ -203,7 +204,7 @@ int main(int argc, char *argv[])
> kmstest_set_vt_graphics_mode();
> igt_display_require(&data.display, data.drm_fd);
>
> - /* i915 disables RPM in case DMC is not loaded on kms supported cards */
> + /* GPU driver disables RPM in case DMC is not loaded on kms supported cards */
> if (!igt_pm_dmc_loaded(data.debugfs_fd)) {
> igt_warn("dmc fw is not loaded, no runtime pm\n");
> ret = EXIT_FAILURE;
> @@ -215,7 +216,10 @@ int main(int argc, char *argv[])
> igt_setup_runtime_pm(data.drm_fd);
> disable_all_displays(&data);
> if (!igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)) {
> - __igt_debugfs_dump(data.drm_fd, "i915_runtime_pm_status", IGT_LOG_INFO);
> + if (!strcmp("i915", card.driver))
> + __igt_debugfs_dump(data.drm_fd,
> + "i915_runtime_pm_status",
> + IGT_LOG_INFO);
> ret = EXIT_FAILURE;
> goto exit;
> }
next prev parent reply other threads:[~2025-03-17 9:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 8:28 [PATCH <i-g-t> v1 0/2] Add support for Xe in runtime-pm Soham Purkait
2025-03-17 8:28 ` [PATCH <i-g-t> v1 1/2] Add support for xe in runtime pm Soham Purkait
2025-03-17 9:41 ` Riana Tauro [this message]
2025-03-18 15:46 ` Kamil Konieczny
2025-03-24 6:43 ` Purkait, Soham
2025-03-18 16:05 ` Kamil Konieczny
2025-03-17 8:28 ` [PATCH <i-g-t> v1 2/2] lib/igt_device_scan: Add driver field to igt_device_card struct Soham Purkait
2025-03-19 6:34 ` ✓ Xe.CI.BAT: success for Add support for Xe in runtime-pm (rev2) Patchwork
2025-03-19 6:48 ` ✓ i915.CI.BAT: " Patchwork
2025-03-19 7:19 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-19 8:59 ` ✗ i915.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bb07aba-6bc1-4026-b214-99b178090263@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=soham.purkait@intel.com \
--cc=vinay.belgaumkar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox