1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright 2024-2025 Tomeu Vizoso <tomeu@tomeuvizoso.net> */ 3 4 #ifndef __ROCKET_DRV_H__ 5 #define __ROCKET_DRV_H__ 6 7 #include <drm/drm_mm.h> 8 9 #include "rocket_device.h" 10 11 struct rocket_iommu_domain { 12 struct iommu_domain *domain; 13 struct kref kref; 14 }; 15 16 struct rocket_file_priv { 17 struct rocket_device *rdev; 18 19 struct rocket_iommu_domain *domain; 20 struct drm_mm mm; 21 struct mutex mm_lock; 22 }; 23 24 struct rocket_iommu_domain *rocket_iommu_domain_get(struct rocket_file_priv *rocket_priv); 25 void rocket_iommu_domain_put(struct rocket_iommu_domain *domain); 26 27 #endif 28