Intel-GFX Archive mirror
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/xe/xe_ggtt: No need to use xe_pm_runtime_get_noresume
Date: Mon, 29 Apr 2024 09:29:15 -0700	[thread overview]
Message-ID: <20240429162915.1831945-1-ashutosh.dixit@intel.com> (raw)

Switching from xe_device_mem_access_get/put to xe_pm_runtime_get/put
results in the following WARNING in xe_oa:

[11614.356168] xe 0000:00:02.0: Missing outer runtime PM protection
[11614.356187] WARNING: CPU: 1 PID: 13075 at drivers/gpu/drm/xe/xe_pm.c:549 xe_pm_runtime_get_noresume+0x60/0x80 [xe]
...
[11614.356377] Call Trace:
[11614.356379]  <TASK>
[11614.356381]  ? __warn+0x7e/0x180
[11614.356387]  ? xe_pm_runtime_get_noresume+0x60/0x80 [xe]
[11614.356507]  xe_ggtt_remove_node+0x22/0x80 [xe]
[11614.356546]  xe_ttm_bo_destroy+0xea/0xf0 [xe]
[11614.356579]  xe_oa_stream_destroy+0xf7/0x120 [xe]
[11614.356627]  xe_oa_release+0x35/0xc0 [xe]
[11614.356673]  __fput+0xa1/0x2d0
[11614.356679]  __x64_sys_close+0x37/0x80
[11614.356697]  do_syscall_64+0x6d/0x140
[11614.356700]  entry_SYSCALL_64_after_hwframe+0x71/0x79
[11614.356702] RIP: 0033:0x7f2b37314f67

There seems to be no reason to use xe_pm_runtime_get_noresume in xe_ggtt
functions. Just use xe_pm_runtime_get.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_ggtt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 0d541f55b4fc..8548a2eb3b32 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -404,7 +404,7 @@ static int __xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
 	if (err)
 		return err;
 
-	xe_pm_runtime_get_noresume(tile_to_xe(ggtt->tile));
+	xe_pm_runtime_get(tile_to_xe(ggtt->tile));
 	mutex_lock(&ggtt->lock);
 	err = drm_mm_insert_node_in_range(&ggtt->mm, &bo->ggtt_node, bo->size,
 					  alignment, 0, start, end, 0);
@@ -433,7 +433,7 @@ int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo)
 void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
 			 bool invalidate)
 {
-	xe_pm_runtime_get_noresume(tile_to_xe(ggtt->tile));
+	xe_pm_runtime_get(tile_to_xe(ggtt->tile));
 
 	mutex_lock(&ggtt->lock);
 	xe_ggtt_clear(ggtt, node->start, node->size);
-- 
2.41.0


             reply	other threads:[~2024-04-29 16:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 16:29 Ashutosh Dixit [this message]
2024-04-29 17:17 ` ✗ Fi.CI.SPARSE: warning for drm/xe/xe_ggtt: No need to use xe_pm_runtime_get_noresume Patchwork
2024-04-29 17:23 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-29 18:24 ` [PATCH] " Rodrigo Vivi
2024-04-29 21:19   ` Dixit, Ashutosh
2024-04-29 22:16 ` ✓ Fi.CI.IGT: success 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=20240429162915.1831945-1-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).