History

drm/msm: Add _NO_SHARE flag

Buffers that are not shared between contexts can share a single resv object. This way drm_gpuvm will not track them as external objects, and submit-time validating overhead will be O(1) for all N non-shared BOs, instead of O(n).

Rob Clark committed 1 year ago

Commit b58e12a1 parent 6a4d2874 files · +51 −0Browse files

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

Unified · Split

include/uapi/drm/msm_drm.h+14−0
@@ -140,6 +140,19 @@ struct drm_msm_param { · 139 unmodified lines
140140
141141 #define MSM_BO_SCANOUT 0x00000001 /* scanout capable */
142142 #define MSM_BO_GPU_READONLY 0x00000002
143+/* Private buffers do not need to be explicitly listed in the SUBMIT
144+ * ioctl, unless referenced by a drm_msm_gem_submit_cmd. Private
145+ * buffers may NOT be imported/exported or used for scanout (or any
146+ * other situation where buffers can be indefinitely pinned, but
147+ * cases other than scanout are all kernel owned BOs which are not
148+ * visible to userspace).
149+ *
150+ * In exchange for those constraints, all private BOs associated with
151+ * a single context (drm_file) share a single dma_resv, and if there
152+ * has been no eviction since the last submit, there are no per-BO
153+ * bookeeping to do, significantly cutting the SUBMIT overhead.
154+ */
155+#define MSM_BO_NO_SHARE 0x00000004
143156 #define MSM_BO_CACHE_MASK 0x000f0000
144157 /* cache modes */
145158 #define MSM_BO_CACHED 0x00010000
@@ -149,6 +162,7 @@ struct drm_msm_param { · 3 unmodified lines
149162
150163 #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \
151164 MSM_BO_GPU_READONLY | \
165+ MSM_BO_NO_SHARE | \
152166 MSM_BO_CACHE_MASK)
153167
154168 struct drm_msm_gem_new {

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