From: Shekhar Chauhan <shekhar.chauhan@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>,
<intel-xe@lists.freedesktop.org>, <harish.chegondi@intel.com>
Cc: <matthew.brost@intel.com>
Subject: Re: [PATCH v8 6/8] drm/xe/oa: Take the runtime PM reference in xe_oa_destroy_locked()
Date: Fri, 20 Nov 2026 12:57:04 +0530 [thread overview]
Message-ID: <bd3b5dab-0073-4134-9abf-987723e264fd@intel.com> (raw)
In-Reply-To: <20261119002737.3899877-16-umesh.nerlige.ramappa@intel.com>
On 11/19/2026 5:57, Umesh Nerlige Ramappa wrote:
> Move the runtime PM get/put around stream destruction from
> xe_oa_release() into xe_oa_destroy_locked(), the only caller, so the
> reference is held just around the code that needs the device awake.
>
> This lets a following patch free a stream of a removed device without
> taking a runtime PM reference on it. No functional change.
"Following patch" isn't the best way to describe the patch, and it can
easily be shuffled while a rebase happens.
Since it's a minor change, I wouldn't want an entirely new series for
this, but if possible, maybe the person merging these patches can take
care of the wordings.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Patch in itself LGTM, and with that,
Reviewed-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
> ---
> drivers/gpu/drm/xe/xe_oa.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> index 72f173fb23cd..f3eceeb34e7b 100644
> --- a/drivers/gpu/drm/xe/xe_oa.c
> +++ b/drivers/gpu/drm/xe/xe_oa.c
> @@ -1760,6 +1760,8 @@ static long xe_oa_ioctl(struct file *file,
>
> static void xe_oa_destroy_locked(struct xe_oa_stream *stream)
> {
> + xe_pm_runtime_get(gt_to_xe(stream->gt));
> +
> if (stream->enabled)
> xe_oa_disable_locked(stream);
>
> @@ -1769,6 +1771,7 @@ static void xe_oa_destroy_locked(struct xe_oa_stream *stream)
> xe_exec_queue_put(stream->exec_q);
>
> drm_syncobj_put(stream->ufence_syncobj);
> + xe_pm_runtime_put(gt_to_xe(stream->gt));
> kfree(stream);
> }
>
> @@ -1777,11 +1780,9 @@ static int xe_oa_release(struct inode *inode, struct file *file)
> struct xe_oa_stream *stream = file->private_data;
> struct xe_gt *gt = stream->gt;
>
> - xe_pm_runtime_get(gt_to_xe(gt));
> mutex_lock(>->oa.gt_lock);
> xe_oa_destroy_locked(stream);
> mutex_unlock(>->oa.gt_lock);
> - xe_pm_runtime_put(gt_to_xe(gt));
>
> /* Release the reference the OA stream kept on the driver */
> drm_dev_put(>_to_xe(gt)->drm);
--
Shekhar Chauhan
Linux Graphics Software Engineer
Linux Platform Enabling
Intel Corporation
next prev parent reply other threads:[~2026-11-20 7:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 0:27 [PATCH v8 0/8] Cleanup OA stream on PCI unbind/remove Umesh Nerlige Ramappa
2026-11-19 0:27 ` [PATCH v8 1/8] drm/xe/oa: Ignore a HW tail pointer outside the OA buffer Umesh Nerlige Ramappa
2026-11-19 0:39 ` sashiko-bot
2026-11-20 20:14 ` Umesh Nerlige Ramappa
2026-11-20 7:21 ` Shekhar Chauhan
2026-11-20 20:07 ` Umesh Nerlige Ramappa
2026-11-19 0:27 ` [PATCH v8 2/8] drm/xe/oa: Use the drm device address_space for the OA stream fd Umesh Nerlige Ramappa
2026-11-19 0:39 ` sashiko-bot
2026-11-20 7:23 ` Shekhar Chauhan
2026-11-19 0:27 ` [PATCH v8 3/8] drm/xe/oa: Wait for in-flight OA batches before stream HW teardown Umesh Nerlige Ramappa
2026-11-20 7:24 ` Shekhar Chauhan
2026-11-19 0:27 ` [PATCH v8 4/8] drm/xe: Reject vm_ops->access on BO mappings of an unplugged device Umesh Nerlige Ramappa
2026-11-19 0:39 ` sashiko-bot
2026-11-19 22:36 ` Matthew Brost
2026-11-19 0:27 ` [PATCH v8 5/8] drm/xe/oa: Fence OA ioctls and mmap against device unplug and wedging Umesh Nerlige Ramappa
2026-11-20 7:25 ` Shekhar Chauhan
2026-11-19 0:27 ` [PATCH v8 6/8] drm/xe/oa: Take the runtime PM reference in xe_oa_destroy_locked() Umesh Nerlige Ramappa
2026-11-20 7:27 ` Shekhar Chauhan [this message]
2026-11-19 0:27 ` [PATCH v8 7/8] drm/xe/oa: Free the OA buffer and the stream after the stream destroy Umesh Nerlige Ramappa
2026-11-19 0:48 ` sashiko-bot
2026-11-20 7:29 ` Shekhar Chauhan
2026-11-19 0:27 ` [PATCH v8 8/8] drm/xe/oa: Quiesce OA streams on driver unbind and PCI reset Umesh Nerlige Ramappa
2026-11-19 1:11 ` sashiko-bot
2026-11-20 7:31 ` Shekhar Chauhan
2026-11-19 6:05 ` ✓ CI.KUnit: success for Cleanup OA stream on PCI unbind/remove (rev8) Patchwork
2026-11-19 6:46 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-20 9:31 ` ✗ Xe.CI.FULL: failure " 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=bd3b5dab-0073-4134-9abf-987723e264fd@intel.com \
--to=shekhar.chauhan@intel.com \
--cc=harish.chegondi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=umesh.nerlige.ramappa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.