[PATCH v6 03/26] drm/gpuvm: Support flags in drm_gpuvm_map_req

Himal Prasad Ghimiray himal.prasad.ghimiray at intel.com
Thu Aug 7 16:43:15 UTC 2025


This change adds support for passing flags to drm_gpuvm_sm_map() and
sm_map_ops_create(), enabling future extensions that affect split/merge
logic in drm_gpuvm.

v2
- Move flag to drm_gpuvm_map_req

Cc: Danilo Krummrich <dakr at kernel.org>
Cc: Boris Brezillon <bbrezillon at kernel.org>
Cc: Caterina Shablia <caterina.shablia at collabora.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Cc: <dri-devel at lists.freedesktop.org>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
---
 include/drm/drm_gpuvm.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
index cbb9b6519462..116f77abd570 100644
--- a/include/drm/drm_gpuvm.h
+++ b/include/drm/drm_gpuvm.h
@@ -1049,6 +1049,13 @@ struct drm_gpuva_ops {
  */
 #define drm_gpuva_next_op(op) list_next_entry(op, entry)
 
+enum drm_gpuvm_sm_map_ops_flags {
+	 /**
+	  * %DRM_GPUVM_SM_MAP_OPS_FLAG_NONE: DEFAULT sm_map ops
+	  */
+	DRM_GPUVM_SM_MAP_OPS_FLAG_NONE = 0,
+};
+
 /**
  * struct drm_gpuvm_map_req - arguments passed to drm_gpuvm_sm_map[_ops_create]()
  */
@@ -1057,6 +1064,11 @@ struct drm_gpuvm_map_req {
 	 * @op_map: struct drm_gpuva_op_map
 	 */
 	struct drm_gpuva_op_map op_map;
+
+	/**
+	 * @flags: drm_gpuvm_sm_map_ops_flags for this mapping request
+	 */
+	enum drm_gpuvm_sm_map_ops_flags flags;
 };
 
 struct drm_gpuva_ops *
-- 
2.34.1



More information about the dri-devel mailing list