From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Francois Dugast <francois.dugast@intel.com>
Cc: intel-xe@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-xe] [PATCH v3 15/16] drm/xe: Remove unused extension definition
Date: Fri, 01 Dec 2023 17:10:14 -0800 [thread overview]
Message-ID: <87o7f9if49.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20231130183955.7-16-francois.dugast@intel.com>
On Thu, 30 Nov 2023 10:39:54 -0800, Francois Dugast wrote:
>
> From: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> The vm_create ioctl function doesn't accept any extension.
> Remove this left over.
> A backward compatible change.
>
> Cc: Francois Dugast <francois.dugast@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> include/uapi/drm/xe_drm.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index 84a477009e85..ffd9fc1172e8 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -642,7 +642,6 @@ struct drm_xe_ext_set_property {
> };
>
> struct drm_xe_vm_create {
> -#define DRM_XE_VM_EXTENSION_SET_PROPERTY 0
> /** @extensions: Pointer to the first extension struct, if any */
> __u64 extensions;
I have another general comment on the use of these extensions (prompted by
John H's bringing up KLV's (key-length-value blobs) in an internal
chat). Here goes. Currently we have structs which are basically:
struct xyz {
/** @extensions: Pointer to the first extension struct, if any */
__u64 extensions;
/* Remaining struct fields */
};
A slightly different way of doing this would be:
struct root {
/** @extensions: Pointer to the first extension struct */
__u64 extensions;
};
struct xyz {
/** @base: base user extension */
struct xe_user_extension base;
/* Remaining struct fields */
};
So here the idea is the the first level struct ('struct root') does not
contain any real struct fields at all. It *always* points to a second level
struct ('struct xyz') which contain the real data to passed in.
Maybe what we have in Xe today is ok, but the second approach is closer to
KLV John brought up. If 'struct xyz' changes, we can just change
'extensions' in 'struct root' to point to say a new 'struct xyz_v2'.
What we have now in Xe is also ok, but we need a protocol for how to
interpret 'extensions', e.g. that if 'extensions' is 0, we will use the
first level struct, but if 'extensions' is not 0, we will follow the chain
and use the second level struct. As long as this protocol is clearly
defined we might be ok with what we have. But is the protocol defined
today? Is it the same behavior across all uapi's?
That's why the second approach seems a bit cleaner and unambiguous to me.
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2023-12-02 1:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 18:39 [Intel-xe] [PATCH v3 00/16] uAPI Alignment - Cleanup and future proof Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 01/16] drm/xe: Extend drm_xe_vm_bind_op Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 02/16] drm/xe/uapi: Separate bo_create placement from flags Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 03/16] drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof Francois Dugast
2023-11-30 20:32 ` Dixit, Ashutosh
2023-11-30 20:36 ` Souza, Jose
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 04/16] drm/xe/uapi: Reject bo creation of unaligned size Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 05/16] drm/xe/uapi: Align on a common way to return arrays (memory regions) Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 06/16] drm/xe/uapi: Align on a common way to return arrays (gt) Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 07/16] drm/xe/uapi: Align on a common way to return arrays (engines) Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 08/16] drm/xe/uapi: Split xe_sync types from flags Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 09/16] drm/xe/uapi: Kill tile_mask Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 10/16] drm/xe/uapi: Crystal Reference Clock updates Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 11/16] drm/xe/uapi: Add Tile ID information to the GT info query Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 12/16] drm/xe/uapi: Fix various struct padding for 64b alignment Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 13/16] drm/xe/uapi: Move xe_exec after xe_exec_queue Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 14/16] drm/xe/uapi: Use LR abbrev for long-running vms Francois Dugast
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 15/16] drm/xe: Remove unused extension definition Francois Dugast
2023-12-02 1:10 ` Dixit, Ashutosh [this message]
2023-11-30 18:39 ` [Intel-xe] [PATCH v3 16/16] drm/xe/uapi: Kill exec_queue_set_property Francois Dugast
2023-11-30 20:59 ` [Intel-xe] [PATCH v3 00/16] uAPI Alignment - Cleanup and future proof Souza, Jose
2023-11-30 23:27 ` [Intel-xe] ✓ CI.Patch_applied: success for uAPI Alignment - Cleanup and future proof (rev6) Patchwork
2023-11-30 23:27 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-11-30 23:29 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-30 23:36 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-30 23:36 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-11-30 23:38 ` [Intel-xe] ✓ CI.checksparse: success " Patchwork
2023-12-01 0:12 ` [Intel-xe] ✗ CI.BAT: 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=87o7f9if49.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=rodrigo.vivi@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