From: Anshuman Gupta <anshuman.gupta@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: rodrigo.vivi@intel.com
Subject: [Intel-xe] [PATCH] drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device
Date: Wed, 2 Aug 2023 12:34:49 +0530 [thread overview]
Message-ID: <20230802070449.2426563-1-anshuman.gupta@intel.com> (raw)
Do not register vram_d3cold_threshold device sysfs universally
for each gfx device, only register sysfs and set the threshold
value for d3cold capable devices.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
drivers/gpu/drm/xe/xe_pm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 8bb8e154e5f8..0f06d8304e17 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -165,8 +165,11 @@ void xe_pm_init(struct xe_device *xe)
drmm_mutex_init(&xe->drm, &xe->d3cold.lock);
xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
- xe_device_sysfs_init(xe);
- xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
+
+ if (xe->d3cold.capable) {
+ xe_device_sysfs_init(xe);
+ xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
+ }
xe_pm_runtime_init(xe);
}
--
2.38.0
next reply other threads:[~2023-08-02 7:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 7:04 Anshuman Gupta [this message]
2023-08-02 7:08 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device Patchwork
2023-08-02 7:08 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-08-02 7:09 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-08-02 7:13 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-02 7:14 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-02 7:15 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-08-02 7:48 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-08-02 13:16 ` [Intel-xe] [PATCH] " Rodrigo Vivi
2023-08-04 7:40 ` [Intel-xe] ○ CI.BAT: info for " 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=20230802070449.2426563-1-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=intel-xe@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