Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: igt-dev@lists.freedesktop.org, badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_pm: Remove pci_system_{init, cleanup}
Date: Tue, 8 Aug 2023 16:46:28 -0400	[thread overview]
Message-ID: <ZNKppCx1L72ohckE@intel.com> (raw)
In-Reply-To: <20230808115913.1064831-2-anshuman.gupta@intel.com>

On Tue, Aug 08, 2023 at 05:29:12PM +0530, Anshuman Gupta wrote:
> From: Anshuamn Gupta <anshuman.gupta@intel.com>
> 
> igt core library has already initialized libpciaccess
> pci_systeam_init() and registered a exit handler for its

           ^ typo

> cleanup, remove these unnecessary calls from igt_pm lib.

maybe worth mention that this is true because we are calling
igt_device_get_pci_device() on the desired cases.


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Anshuamn Gupta <anshuman.gupta@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-08 20:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 11:59 [igt-dev] [PATCH i-g-t 0/2] Add vram_d3cold_threshold test Anshuman Gupta
2023-08-08 11:59 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_pm: Remove pci_system_{init, cleanup} Anshuman Gupta
2023-08-08 20:46   ` Rodrigo Vivi [this message]
2023-08-09 11:50   ` [igt-dev] [PATCH i-g-t] " Anshuman Gupta
2023-08-08 11:59 ` [igt-dev] [PATCH i-g-t 2/2] test/xe_pm: Add vram_d3cold_threshold subtest Anshuman Gupta
2023-08-08 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add vram_d3cold_threshold test Patchwork
2023-08-08 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-08 17:39 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-08 23:08 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2023-08-09 13:24 ` [igt-dev] ✓ Fi.CI.BAT: success for Add vram_d3cold_threshold test (rev2) Patchwork
2023-08-09 13:29 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-10 13:30 ` [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=ZNKppCx1L72ohckE@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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