[PATCH 2/3] drm/xe/oa: Remove the drm device reference of oa_stream in xe_oa_destroy_locked()
José Roberto de Souza
jose.souza at intel.com
Thu Aug 15 16:27:57 UTC 2024
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 at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at 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
More information about the Intel-xe
mailing list