History

drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly

Currently, NO_PREFETCH is passed implicitly through drm_nouveau_gem_pushbuf_push::length and drm_nouveau_exec_push::va_len. Since this is a direct representation of how the HW is programmed it isn't really future proof for a uAPI. Hence, fix this up for the new uAPI and split up the va_len field of struct drm_nouveau_exec_push, such that we keep 32bit for va_len and 32bit for flags. For drm_nouveau_gem_pushbuf_push::length at least provide NOUVEAU_GEM_PUSHBUF_NO_PREFETCH to indicate the bit shift. While at it, fix up nv50_dma_push() as well, such that the caller doesn't need to encode the NO_PREFETCH flag into the length parameter.

Danilo Krummrich committed 3 years ago

Commit b715dcd1 parent b4e9fa95 files · +38 −10Browse files

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

Unified · Split

include/uapi/drm/nouveau_drm.h+7−1
@@ -138,6 +138,7 @@ struct drm_nouveau_gem_pushbuf_push { · 137 unmodified lines
138138 __u32 pad;
139139 __u64 offset;
140140 __u64 length;
141+#define NOUVEAU_GEM_PUSHBUF_NO_PREFETCH (1 << 23)
141142 };
142143
143144 struct drm_nouveau_gem_pushbuf {
@@ -338,7 +339,12 @@ struct drm_nouveau_exec_push { · 194 unmodified lines
338339 /**
339340 * @va_len: the length of the push buffer mapping
340341 */
341− __u64 va_len;
342+ __u32 va_len;
343+ /**
344+ * @flags: the flags for this push buffer mapping
345+ */
346+ __u32 flags;
347+#define DRM_NOUVEAU_EXEC_PUSH_NO_PREFETCH 0x1
342348 };
343349
344350 /**

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