From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Ashutosh Dixit" <ashutosh.dixit@intel.com>,
"José Roberto de Souza" <jose.souza@intel.com>
Subject: [PATCH 2/3] drm/xe/oa: Remove the drm device reference of oa_stream in xe_oa_destroy_locked()
Date: Thu, 15 Aug 2024 09:27:57 -0700 [thread overview]
Message-ID: <20240815162758.36495-2-jose.souza@intel.com> (raw)
In-Reply-To: <20240815162758.36495-1-jose.souza@intel.com>
Basically no changes in behavior at this point but a future patch will
add another caller to xe_oa_destroy_locked() so it makes sense to have
the reference removed inside of xe_oa_destroy_locked().
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/gpu/drm/xe/xe_oa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index d6eec8caf4c51..4be722b92f90b 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -1192,6 +1192,9 @@ static void xe_oa_destroy_locked(struct xe_oa_stream *stream)
if (stream->enabled)
xe_oa_disable_locked(stream);
+ /* Release the reference the OA stream kept on the driver */
+ drm_dev_put(&stream->oa->xe->drm);
+
xe_oa_stream_destroy(stream);
if (stream->exec_q)
@@ -1209,9 +1212,6 @@ static int xe_oa_release(struct inode *inode, struct file *file)
xe_oa_destroy_locked(stream);
mutex_unlock(>->tile->xe->oa.streams_lock);
- /* Release the reference the OA stream kept on the driver */
- drm_dev_put(>_to_xe(gt)->drm);
-
return 0;
}
--
2.46.0
next prev parent reply other threads:[~2024-08-15 16:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 16:27 [PATCH 1/3] drm/xe/oa: Replace per GT oa mutex per a global one José Roberto de Souza
2024-08-15 16:27 ` José Roberto de Souza [this message]
2024-08-15 16:27 ` [PATCH 3/3] drm/xe/oa: Destroy dangling oa streams when xe_file is removed José Roberto de Souza
2024-08-15 18:17 ` Lucas De Marchi
2024-08-15 20:40 ` Dixit, Ashutosh
2024-08-15 16:33 ` ✓ CI.Patch_applied: success for series starting with [1/3] drm/xe/oa: Replace per GT oa mutex per a global one Patchwork
2024-08-15 16:33 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-15 16:34 ` ✓ CI.KUnit: success " Patchwork
2024-08-15 16:42 ` [PATCH 1/3] " Matthew Brost
2024-08-15 21:11 ` Dixit, Ashutosh
2024-08-15 16:46 ` ✓ CI.Build: success for series starting with [1/3] " Patchwork
2024-08-15 16:48 ` ✗ CI.Hooks: failure " Patchwork
2024-08-15 16:50 ` ✓ CI.checksparse: success " Patchwork
2024-08-15 17:34 ` ✗ CI.BAT: failure " Patchwork
2024-08-15 18:31 ` ✗ 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=20240815162758.36495-2-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@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