public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sharma, Nishit" <nishit.sharma@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <saurabhg.gupta@intel.com>, <alex.zuo@intel.com>,
	<joonas.lahtinen@linux.intel.com>, <matthew.brost@intel.com>,
	<jianxun.zhang@intel.com>, <stuart.summers@intel.com>,
	<shuicheng.lin@intel.com>
Subject: Re: [PATCH v7 2/4] lib/xe/xe_ioctl: Add xe_vm_get_property helper function
Date: Tue, 31 Mar 2026 20:14:56 +0530	[thread overview]
Message-ID: <57d63dd1-e16b-424b-8d97-7bd9311e3b36@intel.com> (raw)
In-Reply-To: <20260325212208.85743-8-jonathan.cavitt@intel.com>


On 3/26/2026 2:52 AM, Jonathan Cavitt wrote:
> Add a helper function, xe_vm_get_property, that calls the
> drm_xe_vm_get_property ioctl.  Since the ioctl behaves similarly to an
> xe_query in that it needs to be called once to get the size of the
> return data and again to save the data, the helper function takes the
> ioctl structure as a parameter.
>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> ---
>   lib/xe/xe_ioctl.c | 5 +++++
>   lib/xe/xe_ioctl.h | 1 +
>   2 files changed, 6 insertions(+)
>
> diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
> index ea3f2fcaab..7a8444095f 100644
> --- a/lib/xe/xe_ioctl.c
> +++ b/lib/xe/xe_ioctl.c
> @@ -332,6 +332,11 @@ void xe_vm_unbind_sync(int fd, uint32_t vm, uint64_t offset,
>   	__xe_vm_bind_sync(fd, vm, 0, offset, addr, size, DRM_XE_VM_BIND_OP_UNMAP);
>   }
>   
> +void xe_vm_get_property(int fd, uint32_t vm, struct drm_xe_vm_get_property *query)
> +{
> +	igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_VM_GET_PROPERTY, query), 0);
> +}
> +
>   void xe_vm_destroy(int fd, uint32_t vm)
>   {
>   	struct drm_xe_vm_destroy destroy = {
> diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
> index b62d259fda..4ac526a8ec 100644
> --- a/lib/xe/xe_ioctl.h
> +++ b/lib/xe/xe_ioctl.h
> @@ -65,6 +65,7 @@ void xe_vm_bind_array(int fd, uint32_t vm, uint32_t exec_queue,
>   void xe_vm_unbind_all_async(int fd, uint32_t vm, uint32_t exec_queue,
>   			    uint32_t bo, struct drm_xe_sync *sync,
>   			    uint32_t num_syncs);
> +void xe_vm_get_property(int fd, uint32_t vm, struct drm_xe_vm_get_property *query);
>   void xe_vm_destroy(int fd, uint32_t vm);
>   uint32_t __xe_bo_create(int fd, uint32_t vm, uint64_t size, uint32_t placement,
>   			uint32_t flags, void *ext, uint32_t *handle);

LGTM:

Reviewed-by: Nishit Sharma <nishit.sharma@intel.com>


  parent reply	other threads:[~2026-03-31 14:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 21:22 [PATCH v7 0/4] tests/intel/xe_vm: Add drm_xe_vm_get_property tests Jonathan Cavitt
2026-03-25 21:22 ` [PATCH v7 1/4] drm-uapi/xe: Declare xe_vm_get_property_ioctl Jonathan Cavitt
2026-03-31 14:31   ` Cavitt, Jonathan
2026-03-31 14:43   ` Sharma, Nishit
2026-03-25 21:22 ` [PATCH v7 2/4] lib/xe/xe_ioctl: Add xe_vm_get_property helper function Jonathan Cavitt
2026-03-31 14:32   ` Cavitt, Jonathan
2026-03-31 14:44   ` Sharma, Nishit [this message]
2026-03-25 21:22 ` [PATCH v7 3/4] tests/intel/xe_vm: Add DRM_IOCTL_XE_VM_GET_PROPERTY validation tests Jonathan Cavitt
2026-03-31 15:00   ` Sharma, Nishit
2026-03-25 21:22 ` [PATCH v7 4/4] tests/intel/xe_vm: Test DRM_IOCTL_XE_VM_GET_PROPERTY fault reporting Jonathan Cavitt
2026-03-31 15:17   ` Sharma, Nishit
2026-03-26  4:01 ` ✓ Xe.CI.BAT: success for tests/intel/xe_vm: Add drm_xe_vm_get_property tests Patchwork
2026-03-26  4:18 ` ✓ i915.CI.BAT: " Patchwork
2026-03-26 16:39 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-26 19:43 ` ✓ i915.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=57d63dd1-e16b-424b-8d97-7bd9311e3b36@intel.com \
    --to=nishit.sharma@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jianxun.zhang@intel.com \
    --cc=jonathan.cavitt@intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=saurabhg.gupta@intel.com \
    --cc=shuicheng.lin@intel.com \
    --cc=stuart.summers@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