From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: petri.latvala@intel.com, igt-dev@lists.freedesktop.org,
badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t v5 5/9] tools/intel_pm_rpm: Add an option to setup d3cold
Date: Mon, 9 May 2022 04:45:48 -0400 [thread overview]
Message-ID: <YnjUvN0aTmQ54UnI@intel.com> (raw)
In-Reply-To: <20220506154553.6146-6-anshuman.gupta@intel.com>
On Fri, May 06, 2022 at 09:15:49PM +0530, Anshuman Gupta wrote:
> Few PCI devices under DGFX card tree don't have any kernel driver.
> These devices will block D3cold state of gfx root port.
> Adding support to setup d3cold by enabling runtime PM for all PCI
> devices under the gfx root port.
> It will not save/restore pci devices power attributes.
> It will be useful to tune D3Cold after boot.
>
> v2:
> - Change naming convention from configure_autosuspend to
> setup-d3cold. [Rodrigo].
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> tools/intel_pm_rpm.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/tools/intel_pm_rpm.c b/tools/intel_pm_rpm.c
> index 909a2a34d..2703ac305 100644
> --- a/tools/intel_pm_rpm.c
> +++ b/tools/intel_pm_rpm.c
> @@ -45,15 +45,17 @@ 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\tPrepare dgfx gfx card to enter to D3Cold.\n"
thanks
so, as I told in the other patch I prefer this to use i915 autosuspend delay as reference
for the others or at least avoid touching the i915 one.
with that taken care:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> " --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'},
> {"force-d3cold-wait", 0, 0, 'f'},
> + {"setup-d3cold", 0, 0, 's'},
> {"help", 0, 0, 'h'},
> { 0, 0, 0, 0 }
> };
>
> -const char *optstr = "dfh";
> +const char *optstr = "dfsh";
>
> static void usage(const char *name)
> {
> @@ -72,6 +74,17 @@ static void disable_all_displays(data_t *data)
> }
> }
>
> +static void
> +setup_gfx_card_d3cold(data_t *data)
> +{
> + struct pci_device *root;
> +
> + root = igt_device_get_pci_root_port(data->drm_fd);
> + igt_pm_enable_pci_card_runtime_pm(root);
> + igt_info("Enabled pci devs runtime pm under Root port %04x:%02x:%02x.%01x\n",
> + root->domain, root->bus, root->dev, root->func);
> +}
> +
> static void force_gfx_card_d3cold(data_t *data)
> {
> struct pci_device *root;
> @@ -106,7 +119,7 @@ static void force_gfx_card_d3cold(data_t *data)
>
> int main(int argc, char *argv[])
> {
> - bool disable_display = false, force_d3cold = false;
> + bool disable_display = false, force_d3cold = false, setup_d3cold = false;
> struct igt_device_card card;
> char *env_device = NULL;
> int c, option_index = 0;
> @@ -144,6 +157,9 @@ int main(int argc, char *argv[])
> case 'f':
> force_d3cold = true;
> break;
> + case 's':
> + setup_d3cold = true;
> + break;
> default:
> case 'h':
> usage(argv[0]);
> @@ -196,6 +212,9 @@ int main(int argc, char *argv[])
> if (force_d3cold)
> force_gfx_card_d3cold(&data);
>
> + if (setup_d3cold)
> + setup_gfx_card_d3cold(&data);
> +
> exit:
> igt_restore_runtime_pm();
>
> --
> 2.26.2
>
next prev parent reply other threads:[~2022-05-09 8:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 15:45 [igt-dev] [PATCH i-g-t v5 0/9] D3Cold Tool & IGT Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 1/9] test/i915_pm_rpm: Add placement to gem-{mmap-type, execbuf} Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 2/9] lib/igt_device: Get gfx PCI card root port Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 3/9] lib/igt_pm: D3Cold runtime pm infrastructure Anshuman Gupta
2022-05-09 8:42 ` Rodrigo Vivi
2022-05-09 16:50 ` Gupta, Anshuman
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 4/9] tools: Add intel_pm_rpm tool Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 5/9] tools/intel_pm_rpm: Add an option to setup d3cold Anshuman Gupta
2022-05-09 8:45 ` Rodrigo Vivi [this message]
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 6/9] i915_pm_rpm: Add D3Cold basic subtest Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 7/9] i915_pm_rpm: Extend gem_exec_stress test with D3Cold Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 8/9] i915_pm_rpm: Extend gem_execbuf " Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 9/9] i915_pm_rpm: Extend gem-mmap-type " Anshuman Gupta
2022-05-06 16:26 ` [igt-dev] ✓ Fi.CI.BAT: success for D3Cold Tool & IGT (rev5) Patchwork
2022-05-06 18:57 ` [igt-dev] ✓ Fi.CI.IGT: " 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=YnjUvN0aTmQ54UnI@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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