From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Riana Tauro <riana.tauro@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/xe/pm: add debug logs for D3cold
Date: Tue, 6 Feb 2024 14:14:18 +0530 [thread overview]
Message-ID: <30bccff0-56d2-45a4-9709-34f3bd83ed9b@intel.com> (raw)
In-Reply-To: <20240206055917.2629027-1-riana.tauro@intel.com>
On 06-02-2024 11:29, Riana Tauro wrote:
> add additional debug logs for PME# capability and
^Add
> presence of ACPI _PR3 resources. This is to identify
> the reason why the card is not capable of D3cold.
>
> No functional changes
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pm.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index d5f219796d7e..3d55ff77f7c3 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -125,17 +125,26 @@ int xe_pm_resume(struct xe_device *xe)
> return 0;
> }
>
> -static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev)
> +static bool xe_pm_pci_d3cold_capable(struct xe_device *xe)
> {
> + struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> struct pci_dev *root_pdev;
>
> root_pdev = pcie_find_root_port(pdev);
> if (!root_pdev)
> return false;
>
> - /* D3Cold requires PME capability and _PR3 power resource */
> - if (!pci_pme_capable(root_pdev, PCI_D3cold) || !pci_pr3_present(root_pdev))
> + /* D3Cold requires PME capability */
> + if (!pci_pme_capable(root_pdev, PCI_D3cold)) {
> + drm_dbg(&xe->drm, "d3cold: PME# not supported\n");
> return false;
> + }
> +
> + /* D3Cold requires _PR3 power resource */
> + if (!pci_pr3_present(root_pdev)) {
> + drm_dbg(&xe->drm, "d3cold: ACPI _PR3 not present\n");
> + return false;
> + }
>
> return true;
> }
> @@ -171,15 +180,13 @@ void xe_pm_init_early(struct xe_device *xe)
>
> void xe_pm_init(struct xe_device *xe)
> {
> - struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> -
> /* For now suspend/resume is only allowed with GuC */
> if (!xe_device_uc_enabled(xe))
> return;
>
> drmm_mutex_init(&xe->drm, &xe->d3cold.lock);
>
> - xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
> + xe->d3cold.capable = xe_pm_pci_d3cold_capable(xe);
>
> if (xe->d3cold.capable) {
> xe_device_sysfs_init(xe);
next prev parent reply other threads:[~2024-02-06 8:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 5:59 [PATCH] drm/xe/pm: add debug logs for D3cold Riana Tauro
2024-02-06 5:52 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-06 5:52 ` ✓ CI.checkpatch: " Patchwork
2024-02-06 5:53 ` ✓ CI.KUnit: " Patchwork
2024-02-06 6:00 ` ✓ CI.Build: " Patchwork
2024-02-06 6:00 ` ✓ CI.Hooks: " Patchwork
2024-02-06 6:02 ` ✓ CI.checksparse: " Patchwork
2024-02-06 6:26 ` ✓ CI.BAT: " Patchwork
2024-02-06 8:44 ` Nilawar, Badal [this message]
2024-02-06 13:50 ` [PATCH] " Rodrigo Vivi
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=30bccff0-56d2-45a4-9709-34f3bd83ed9b@intel.com \
--to=badal.nilawar@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--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