public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe/oa: Allow reading after disabling OA stream
@ 2026-03-13  5:36 Ashutosh Dixit
  2026-03-13  5:45 ` ✓ CI.KUnit: success for drm/xe/oa: Allow reading after disabling OA stream (rev2) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ashutosh Dixit @ 2026-03-13  5:36 UTC (permalink / raw)
  To: intel-xe; +Cc: Umesh Nerlige Ramappa

Some OA data might be present in the OA buffer when OA stream is
disabled. Allow UMD's to retrieve this data, so that all data till the
point when OA stream is disabled can be retrieved.

v2: Update tail pointer after disable (Umesh)

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

diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index dcd393b0931a2..2efc16c3a95df 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -543,8 +543,7 @@ static ssize_t xe_oa_read(struct file *file, char __user *buf,
 	size_t offset = 0;
 	int ret;
 
-	/* Can't read from disabled streams */
-	if (!stream->enabled || !stream->sample)
+	if (!stream->sample)
 		return -EINVAL;
 
 	if (!(file->f_flags & O_NONBLOCK)) {
@@ -1456,6 +1455,10 @@ static void xe_oa_stream_disable(struct xe_oa_stream *stream)
 
 	if (stream->sample)
 		hrtimer_cancel(&stream->poll_check_timer);
+
+	/* Update stream->oa_buffer.tail to allow any final reports to be read */
+	if (xe_oa_buffer_check_unlocked(stream))
+		wake_up(&stream->poll_wq);
 }
 
 static int xe_oa_enable_preempt_timeslice(struct xe_oa_stream *stream)
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-17 23:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13  5:36 [PATCH v2] drm/xe/oa: Allow reading after disabling OA stream Ashutosh Dixit
2026-03-13  5:45 ` ✓ CI.KUnit: success for drm/xe/oa: Allow reading after disabling OA stream (rev2) Patchwork
2026-03-13  6:27 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-14  7:00 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-17  4:42 ` [PATCH v2] drm/xe/oa: Allow reading after disabling OA stream Nerlige Ramappa, Umesh
2026-03-17 23:03   ` Dixit, Ashutosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox