Commit 9e4e9761 authored by Tejas Upadhyay's avatar Tejas Upadhyay Committed by Rodrigo Vivi
Browse files

drm/xe: Record each drm client with its VM



Enable accounting of indirect client memory usage.

Reviewed-by: default avatarHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: default avatarTejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent b27970f3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2058,6 +2058,7 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
	}

	args->vm_id = id;
	vm->xef = xef;

#if IS_ENABLED(CONFIG_DRM_XE_DEBUG_MEM)
	/* Warning: Security issue - never enable by default */
+2 −0
Original line number Diff line number Diff line
@@ -329,6 +329,8 @@ struct xe_vm {

	/** @batch_invalidate_tlb: Always invalidate TLB before batch start */
	bool batch_invalidate_tlb;
	/** @xef: XE file handle for tracking this VM's drm client */
	struct xe_file *xef;
};

/** struct xe_vma_op_map - VMA map operation */