From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
"Purkait, Soham" <soham.purkait@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Tauro, Riana" <riana.tauro@intel.com>,
"Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH i-g-t v1] Add support for runtime pm for xe driver
Date: Thu, 6 Mar 2025 14:55:18 -0500 [thread overview]
Message-ID: <Z8n9pix0pglefdoA@intel.com> (raw)
In-Reply-To: <xrwfe4zfyiwwcpl7ak6vdvgueznly344jqnkkiuraozz45tec5@w2cldwxkb3bh>
On Thu, Mar 06, 2025 at 10:25:16AM -0600, Lucas De Marchi wrote:
> On Thu, Mar 06, 2025 at 10:06:01AM -0600, Gupta, Anshuman wrote:
> >
> >
> > > -----Original Message-----
> > > From: De Marchi, Lucas <lucas.demarchi@intel.com>
> > > Sent: Thursday, March 6, 2025 9:20 PM
> > > To: Kamil Konieczny <kamil.konieczny@linux.intel.com>; Purkait, Soham
> > > <soham.purkait@intel.com>; igt-dev@lists.freedesktop.org; Tauro, Riana
> > > <riana.tauro@intel.com>; Belgaumkar, Vinay <vinay.belgaumkar@intel.com>;
> > > Gupta, Anshuman <anshuman.gupta@intel.com>; Vivi, Rodrigo
> > > <rodrigo.vivi@intel.com>
> > > Subject: Re: [PATCH i-g-t v1] Add support for runtime pm for xe driver
> > >
> > > On Thu, Mar 06, 2025 at 02:51:00PM +0100, Kamil Konieczny wrote:
> > > >Hi Soham,
> > > >On 2025-03-06 at 16:57:54 +0530, Soham Purkait wrote:
> > > >
> > > >add prefix 'tools/intel_pm_rpm:' in subject, so it will be:
> > > >
> > > >[PATCH i-g-t v1] tools/intel_pm_rpm: Add support for Xe driver
> > > >
> > > >> Add support for runtime power management for Xe driver.
> > > >>
> > > >
> > > >Add here your s-o-b:
> > > >
> > > >Soham Purkait <soham.purkait@intel.com>
> > > >
> > > >Please use checkpatch.pl for some obvious corrections like this, you
> > > >can find this script in Linux kernel sources, also read CONTRIBUTING.md
> > > >in i-g-t sources for some options for checkpatch.
> > > >
> > > >> ---
> > > >> tools/intel_pm_rpm.c | 2 +-
> > > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >>
> > > >> diff --git a/tools/intel_pm_rpm.c b/tools/intel_pm_rpm.c index
> > > >> 08c25ca8a..945247d2e 100644
> > > >> --- a/tools/intel_pm_rpm.c
> > > >> +++ b/tools/intel_pm_rpm.c
> > > >> @@ -151,7 +151,7 @@ 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)) {
> > > >
> > > >Split this line:
> > > > if (!igt_device_find_first_i915_discrete_card(&card) &&
> > > > !igt_device_find_first_xe_discrete_card(&card)) {
> > >
> > > I'd rather stop spreading this. Particularly in **tools**.
> > > If env_device is NULL, why don 't we rather build a match string with the thing
> > > we want aka
> > >
> > > "pci:vendor=8086,device=discrete"
> > >
> > > I'd replace in tools the current uses of
> > > igt_device_find_first_i915_discrete_card() with:
> > >
> > > "pci:vendor=8086,device=discrete,driver=i915"
> > >
> > > ... and implement the driver= match in igt_device_scan if it's not there. Then if
> > > it works with either i915 or xe, we remove it.
> > >
> > > I also think the tool is being less than helpful by trying to work with discrete-
> > > only device.
> > This tool implemented with intention put the discrete cards in runtime d3cold as it requires to tune each pcie device in the topology.
> > As d3cold only supported on dgpu, we don't need this tool for igpu.
>
> ok, but should this be a check by discrete for each driver or checking
> power state and d3cold_allowed in the pci layer?
>
> What do you do if the user passed 00:02.0 as device?
This should be something similar we have on xe_pm for d3cold.
It should skip if we don't have the firmware_node/real_power_state.
But then if the goal is d3cold, we should also check this value to ensure
we are in d3cold.
So, something still seems off to me in this patch. Or we need a bigger
refactor in this test case here or improve the xe_pm with the missed case
*there* with what we are trying to cover with this patch here.
>
> Lucas De Marchi
>
> > Thanks,
> > Anshuman.
> > >
> > > It looks like SET_I915_AUTOSUSPEND_DELAY also needs to be abstracted?
> > >
> > >
> > > Lucas De Marchi
> > >
> > >
> > > >
> > > >Btw should we also add support for other cards in multi-GPU case? If
> > > >yes this is some more work for another patch.
> > > >
> > > >Regards,
> > > >Kamil
> > > >
> > > >> igt_warn("No discrete gpu found\n");
> > > >> ret = EXIT_FAILURE;
> > > >> goto exit;
> > > >> --
> > > >> 2.34.1
> > > >>
next prev parent reply other threads:[~2025-03-06 19:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 11:27 [PATCH i-g-t v1] Add support for runtime pm for xe driver Soham Purkait
2025-03-06 13:51 ` Kamil Konieczny
2025-03-06 15:49 ` Lucas De Marchi
2025-03-06 16:06 ` Gupta, Anshuman
2025-03-06 16:25 ` Lucas De Marchi
2025-03-06 19:55 ` Rodrigo Vivi [this message]
2025-03-06 16:10 ` Rodrigo Vivi
2025-03-06 16:45 ` Gupta, Anshuman
2025-03-06 19:38 ` Rodrigo Vivi
2025-03-07 2:07 ` ✓ i915.CI.BAT: success for " Patchwork
2025-03-07 2:14 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-07 4:25 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-07 11:44 ` ✗ Xe.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=Z8n9pix0pglefdoA@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=riana.tauro@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