Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: badal.nilawar@intel.com, rodrigo.vivi@intel.com
Subject: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_pm: Remove pci_system_{init, cleanup}
Date: Fri, 11 Aug 2023 16:40:25 +0530	[thread overview]
Message-ID: <20230811111026.1327273-2-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20230811111026.1327273-1-anshuman.gupta@intel.com>

From: Anshuamn Gupta <anshuman.gupta@intel.com>

As xe_pm igt test fixture is calling igt_device_get_pci_device()
that makes igt core library to initialize libpciaccess
pci_system_init() and register a exit handler for its cleanup.
Therefore remove these unnecessary calls from igt_pm lib.

v2:
- Commit log improvements. [Rodrigo]

Signed-off-by: Anshuamn Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 lib/igt_pm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/igt_pm.c b/lib/igt_pm.c
index 704acf7d1..d1d7be9a1 100644
--- a/lib/igt_pm.c
+++ b/lib/igt_pm.c
@@ -1140,9 +1140,6 @@ igt_pm_setup_pci_card_power_attrs(struct pci_device *pci_dev, bool save_attrs, i
 	ret = pci_device_get_bridge_buses(pci_dev, &primary, &secondary, &subordinate);
 	igt_assert(!ret);
 
-	ret = pci_system_init();
-	igt_assert(!ret);
-
 	match.domain = pci_dev->domain;
 	match.bus = PCI_MATCH_ANY;
 	match.dev = PCI_MATCH_ANY;
@@ -1185,7 +1182,6 @@ void igt_pm_enable_pci_card_runtime_pm(struct pci_device *root,
 		delay = igt_pm_get_autosuspend_delay(i915);
 
 	igt_pm_setup_pci_card_power_attrs(root, false, delay);
-	pci_system_cleanup();
 }
 
 /**
@@ -1289,7 +1285,6 @@ void igt_pm_restore_pci_card_runtime_pm(void)
 	}
 
 	memset(__pci_dev_pwrattr, 0, sizeof(__pci_dev_pwrattr));
-	pci_system_cleanup();
 }
 
 static void igt_pm_print_pci_dev_runtime_status(struct pci_device *pci_dev)
-- 
2.25.1

  reply	other threads:[~2023-08-11 11:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 11:10 [igt-dev] [PATCH i-g-t v2 0/2] Add vram_d3cold_threshold test Anshuman Gupta
2023-08-11 11:10 ` Anshuman Gupta [this message]
2023-08-11 11:10 ` [igt-dev] [PATCH i-g-t v2 2/2] test/xe_pm: Add vram_d3cold_threshold subtest Anshuman Gupta
2023-08-11 21:09   ` Rodrigo Vivi
2023-08-14  3:51     ` Gupta, Anshuman
2023-08-14  6:21   ` Anshuman Gupta
2023-08-11 11:20 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add vram_d3cold_threshold test (rev3) Patchwork
2023-08-11 11:47 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-11 11:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-12 15:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20230811111026.1327273-2-anshuman.gupta@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.vivi@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