Skip to content

Commit 5dc079d

Browse files
ashutoshxrodrigovivi
authored andcommitted
drm/xe/uapi: Use common drm_xe_ext_set_property extension
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. Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
1 parent bffb257 commit 5dc079d

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

drivers/gpu/drm/xe/xe_exec_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe,
418418
bool create)
419419
{
420420
u64 __user *address = u64_to_user_ptr(extension);
421-
struct drm_xe_ext_exec_queue_set_property ext;
421+
struct drm_xe_ext_set_property ext;
422422
int err;
423423
u32 idx;
424424

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ static int vm_user_ext_set_property(struct xe_device *xe, struct xe_vm *vm,
20672067
u64 extension)
20682068
{
20692069
u64 __user *address = u64_to_user_ptr(extension);
2070-
struct drm_xe_ext_vm_set_property ext;
2070+
struct drm_xe_ext_set_property ext;
20712071
int err;
20722072

20732073
err = __copy_from_user(&ext, address, sizeof(ext));

include/uapi/drm/xe_drm.h

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,11 @@ struct drm_xe_vm_bind_op_error_capture {
569569
__u64 size;
570570
};
571571

572-
/** struct drm_xe_ext_vm_set_property - VM set property extension */
573-
struct drm_xe_ext_vm_set_property {
572+
/** struct drm_xe_ext_set_property - XE set property extension */
573+
struct drm_xe_ext_set_property {
574574
/** @base: base user extension */
575575
struct xe_user_extension base;
576576

577-
#define XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS 0
578577
/** @property: property to set */
579578
__u32 property;
580579

@@ -590,6 +589,7 @@ struct drm_xe_ext_vm_set_property {
590589

591590
struct drm_xe_vm_create {
592591
#define XE_VM_EXTENSION_SET_PROPERTY 0
592+
#define XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS 0
593593
/** @extensions: Pointer to the first extension struct, if any */
594594
__u64 extensions;
595595

@@ -754,21 +754,6 @@ struct drm_xe_vm_bind {
754754
__u64 reserved[2];
755755
};
756756

757-
/** struct drm_xe_ext_exec_queue_set_property - exec queue set property extension */
758-
struct drm_xe_ext_exec_queue_set_property {
759-
/** @base: base user extension */
760-
struct xe_user_extension base;
761-
762-
/** @property: property to set */
763-
__u32 property;
764-
765-
/** @pad: MBZ */
766-
__u32 pad;
767-
768-
/** @value: property value */
769-
__u64 value;
770-
};
771-
772757
/**
773758
* struct drm_xe_exec_queue_set_property - exec queue set property
774759
*

0 commit comments

Comments
 (0)