All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Francois Dugast <francois.dugast@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe: Extend drm_xe_vm_bind_op
Date: Thu, 7 Sep 2023 17:45:53 -0400	[thread overview]
Message-ID: <ZPpEkR47cLTO9NH0@intel.com> (raw)
In-Reply-To: <87zg1yay7a.fsf@mkuoppal-desk>

On Thu, Sep 07, 2023 at 04:51:21PM +0300, Mika Kuoppala wrote:
> Rodrigo Vivi <rodrigo.vivi@intel.com> writes:
> 
> > On Mon, Sep 04, 2023 at 05:46:44PM +0300, Mika Kuoppala wrote:
> >> The bind api is extensible but for a single bind op, there
> >> is not a mechanism to extend. Add extensions field to
> >> struct drm_xe_vm_bind_op.
> >
> > But why would you want to extend the operation?
> > Except for the destroy ones, every ioctl itself is extensible.
> >
> > So, DRM_IOCTL_XE_VM_BIND is extensible. Why would we need to get
> > prepared to extend the operations themselves? And if we extend
> > the operation, what to do with the extension at the ioctl level?
> > which one has precedence? how to organize that?
> >
> 
> The intent is to pass debugger metadata as part of particular
> vm bind operation. For example on MAP, we could associate
> ELF/ISA (relevant parts) as metadata for this bind range.
> 
> So in vector of binds, we want to tag specific one map (in between)
> with debugger metadata.
> 
> With extending the XE_VM_BIND itself, this could be possible too
> but would then need to deliver index into the vector instead
> of carrying the metadata as part of per operation.
> As atleast in this example, the extension is heavily tied
> into particular OP (map).
> 
> I take that you mean precedence of VM_BIND vs bind op?
> Excellent question and I dont know all the use cases the
> vm_bind have to cater. So I can only refer to example above,
> VM_BIND extensions would be only in scope to all operations
> and vm_bind_op extensions would be tightly coupled to per
> operation only.

So, maybe we should do the same union that we do with the
ops themselves and make the extension also an array of num_binds ?

> 
> Thanks for feedback!
> -Mika
> 
> >> 
> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> Cc: Matthew Brost <matthew.brost@intel.com>
> >> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> >> Cc: Francois Dugast <francois.dugast@intel.com>
> >> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> >> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> >> ---
> >>  include/uapi/drm/xe_drm.h | 3 +++
> >>  1 file changed, 3 insertions(+)
> >> 
> >> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> >> index 86f16d50e9cc..5c6c86f5e5fc 100644
> >> --- a/include/uapi/drm/xe_drm.h
> >> +++ b/include/uapi/drm/xe_drm.h
> >> @@ -552,6 +552,9 @@ struct drm_xe_vm_destroy {
> >>  };
> >>  
> >>  struct drm_xe_vm_bind_op {
> >> +	/** @extensions: Pointer to the first extension struct, if any */
> >> +	__u64 extensions;
> >> +
> >>  	/**
> >>  	 * @obj: GEM object to operate on, MBZ for MAP_USERPTR, MBZ for UNMAP
> >>  	 */
> >> -- 
> >> 2.34.1
> >> 

  reply	other threads:[~2023-09-07 21:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 12:36 [Intel-xe] [RFC PATCH 0/1] [UAPI]: Make bind op extensible Mika Kuoppala
2023-09-04 12:36 ` [Intel-xe] [RFC PATCH 1/1] drm/xe: Extend drm_xe_vm_bind_op Mika Kuoppala
2023-09-04 13:52 ` [Intel-xe] ✓ CI.Patch_applied: success for : Make bind op extensible Patchwork
2023-09-04 13:52 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-04 13:54 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-04 14:01 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-04 14:01 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-09-04 14:01 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-09-04 14:46 ` [Intel-xe] [PATCH] drm/xe: Extend drm_xe_vm_bind_op Mika Kuoppala
2023-09-06 17:18   ` Rodrigo Vivi
2023-09-07 13:51     ` Mika Kuoppala
2023-09-07 21:45       ` Rodrigo Vivi [this message]
2023-09-08  8:17         ` Joonas Lahtinen
2023-09-08 12:47           ` Vivi, Rodrigo
2023-09-08 13:06             ` Thomas Hellström

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=ZPpEkR47cLTO9NH0@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=mika.kuoppala@linux.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.