History

drm/xe/uapi: Differentiate WAIT_OP from WAIT_MASK

On one hand the WAIT_OP represents the operation use for waiting such as ==, !=, > and so on. On the other hand, the mask is applied to the value used for comparision. Split those two to bring clarity to the uapi.

Rodrigo Vivi committed 3 years ago

Commit 4a349c81 parent 9ad74352 files · +18 −17Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/drm/xe_drm.h+11−10
@@ -915,12 +915,12 @@ struct drm_xe_wait_user_fence { · 914 unmodified lines
915915 */
916916 __u64 addr;
917917
918−#define DRM_XE_UFENCE_WAIT_EQ 0
919−#define DRM_XE_UFENCE_WAIT_NEQ 1
920−#define DRM_XE_UFENCE_WAIT_GT 2
921−#define DRM_XE_UFENCE_WAIT_GTE 3
922−#define DRM_XE_UFENCE_WAIT_LT 4
923−#define DRM_XE_UFENCE_WAIT_LTE 5
918+#define DRM_XE_UFENCE_WAIT_OP_EQ 0x0
919+#define DRM_XE_UFENCE_WAIT_OP_NEQ 0x1
920+#define DRM_XE_UFENCE_WAIT_OP_GT 0x2
921+#define DRM_XE_UFENCE_WAIT_OP_GTE 0x3
922+#define DRM_XE_UFENCE_WAIT_OP_LT 0x4
923+#define DRM_XE_UFENCE_WAIT_OP_LTE 0x5
924924 /** @op: wait operation (type of comparison) */
925925 __u16 op;
926926
@@ -935,12 +935,13 @@ struct drm_xe_wait_user_fence { · 8 unmodified lines
935935 /** @value: compare value */
936936 __u64 value;
937937
938−#define DRM_XE_UFENCE_WAIT_U8 0xffu
939−#define DRM_XE_UFENCE_WAIT_U16 0xffffu
940−#define DRM_XE_UFENCE_WAIT_U32 0xffffffffu
941−#define DRM_XE_UFENCE_WAIT_U64 0xffffffffffffffffu
938+#define DRM_XE_UFENCE_WAIT_MASK_U8 0xffu
939+#define DRM_XE_UFENCE_WAIT_MASK_U16 0xffffu
940+#define DRM_XE_UFENCE_WAIT_MASK_U32 0xffffffffu
941+#define DRM_XE_UFENCE_WAIT_MASK_U64 0xffffffffffffffffu
942942 /** @mask: comparison mask */
943943 __u64 mask;
944+
944945 /**
945946 * @timeout: how long to wait before bailing, value in nanoseconds.
946947 * Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t