From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Francois.Dugast@intel.com, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe/uapi: Use common drm_xe_ext_set_property extension
Date: Sat, 9 Sep 2023 11:15:20 -0400 [thread overview]
Message-ID: <ZPyMCEmR+v6Hjarb@intel.com> (raw)
In-Reply-To: <20230909052153.1669790-1-ashutosh.dixit@intel.com>
On Fri, Sep 08, 2023 at 10:21:53PM -0700, Ashutosh Dixit wrote:
> There really is no difference between 'struct drm_xe_ext_vm_set_property'
> and 'struct drm_xe_ext_exec_queue_set_property', they are extensions which
> specify a <property, value> pair. Replace the two extensions with a single
> common 'struct drm_xe_ext_set_property' extension. The rationale is that
> rather than have each XE module (including future modules) invent their own
> property/value extensions, all XE modules use a common set_property
> extension when possible.
What about just killing this entirely?
https://lore.kernel.org/all/20230908203302.449041-2-rodrigo.vivi@intel.com/
>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> drivers/gpu/drm/xe/xe_exec_queue.c | 2 +-
> drivers/gpu/drm/xe/xe_vm.c | 2 +-
> include/uapi/drm/xe_drm.h | 20 +++-----------------
> 3 files changed, 5 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index e44d71c679cc3..fc44249f13372 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -459,7 +459,7 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe,
> bool create)
> {
> u64 __user *address = u64_to_user_ptr(extension);
> - struct drm_xe_ext_exec_queue_set_property ext;
> + struct drm_xe_ext_set_property ext;
> int err;
> u32 idx;
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 1d9aa5c40659c..36c39589b0036 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -1915,7 +1915,7 @@ static int vm_user_ext_set_property(struct xe_device *xe, struct xe_vm *vm,
> u64 extension)
> {
> u64 __user *address = u64_to_user_ptr(extension);
> - struct drm_xe_ext_vm_set_property ext;
> + struct drm_xe_ext_set_property ext;
> int err;
>
> err = __copy_from_user(&ext, address, sizeof(ext));
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index 00d5cb4ef85e7..1338a64d42854 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -497,12 +497,11 @@ struct drm_xe_vm_bind_op_error_capture {
> __u64 size;
> };
>
> -/** struct drm_xe_ext_vm_set_property - VM set property extension */
> -struct drm_xe_ext_vm_set_property {
> +/** struct drm_xe_ext_set_property - XE set property extension */
> +struct drm_xe_ext_set_property {
> /** @base: base user extension */
> struct xe_user_extension base;
>
> -#define XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS 0
> /** @property: property to set */
> __u32 property;
>
> @@ -518,6 +517,7 @@ struct drm_xe_ext_vm_set_property {
>
> struct drm_xe_vm_create {
> #define XE_VM_EXTENSION_SET_PROPERTY 0
> +#define XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS 0
> /** @extensions: Pointer to the first extension struct, if any */
> __u64 extensions;
>
> @@ -681,20 +681,6 @@ struct drm_xe_vm_bind {
> };
>
> /** struct drm_xe_ext_exec_queue_set_property - exec queue set property extension */
> -struct drm_xe_ext_exec_queue_set_property {
> - /** @base: base user extension */
> - struct xe_user_extension base;
> -
> - /** @property: property to set */
> - __u32 property;
> -
> - /** @pad: MBZ */
> - __u32 pad;
> -
> - /** @value: property value */
> - __u64 value;
> -};
> -
> /**
> * struct drm_xe_exec_queue_set_property - exec queue set property
> *
> --
> 2.41.0
>
next prev parent reply other threads:[~2023-09-09 15:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 5:21 [Intel-xe] [PATCH] drm/xe/uapi: Use common drm_xe_ext_set_property extension Ashutosh Dixit
2023-09-09 5:24 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-09-09 5:24 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-09 5:25 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-09 5:32 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-09 5:33 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-09 5:34 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-09 6:07 ` [Intel-xe] ✓ CI.BAT: " Patchwork
2023-09-09 15:15 ` Rodrigo Vivi [this message]
2023-09-09 15:21 ` [Intel-xe] [PATCH] " Rodrigo Vivi
2023-09-09 15:59 ` Dixit, Ashutosh
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=ZPyMCEmR+v6Hjarb@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=Francois.Dugast@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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